org.jmol.modelset
Class ModelCollection
public abstract
class
ModelCollection
extends BondCollection
Method Summary |
protected void | addBioPolymerToModel(Polymer polymer, Model model) |
void | addStateScript(String script1, BitSet bsBonds, BitSet bsAtoms1, BitSet bsAtoms2, String script2, boolean addFrameNumber, boolean postDefinitions) |
int | autoBond(BitSet bsA, BitSet bsB, BitSet bsExclude, BitSet bsBonds) |
int[] | autoBond(short order, BitSet bsA, BitSet bsB, BitSet bsBonds, boolean isBonds, boolean matchHbond) |
int | calcAtomsMinMax(BitSet bs, BoxInfo boxInfo) |
void | calcBoundBoxDimensions(BitSet bs) |
void | calcHydrogenBonds(BitSet bsA, BitSet bsB) |
float | calcRotationRadius(int modelIndex, Point3f center) |
float | calcRotationRadius(BitSet bs) |
void | calcSelectedGroupsCount(BitSet bsSelected) |
void | calcSelectedMoleculesCount(BitSet bsSelected) |
void | calcSelectedMonomersCount(BitSet bsSelected) |
Vector3f | calculateMolecularDipole(int modelIndex) |
protected void | calculatePolymers(BitSet alreadyDefined) |
void | calculateStraightness() |
void | calculateStructuresAllExcept(BitSet alreadyDefined, boolean addFileData)
allows rebuilding of PDB structures;
also accessed by ModelManager from Eval
|
void | calcUnitCellMinMax() |
void | clearCalculatedHydrogenBonds(int baseIndex, BitSet bsAtoms) |
protected void | clearDataFrameReference(int modelIndex) |
protected void | defineStructure(int modelIndex, String structureType, char startChainID, int startSequenceNumber, char startInsertionCode, char endChainID, int endSequenceNumber, char endInsertionCode) |
void | deleteAtoms(int modelIndex, int firstAtomIndex, int nAtoms, BitSet bsAtoms, BitSet bsBonds) |
void | freezeModels() |
Vector | getAllAtomInfo(BitSet bs) |
Vector | getAllBondInfo(BitSet bs) |
Hashtable | getAllChainInfo(BitSet bs) |
Hashtable | getAllPolymerInfo(BitSet bs) |
int | getAltLocCountInModel(int modelIndex) |
int | getAltLocIndexInModel(int modelIndex, char alternateLocationID) |
String | getAltLocListInModel(int modelIndex) |
BitSet | getAtomBits(int tokType, Object specInfo)
general unqualified lookup of atom set type |
int | getAtomCountInModel(int modelIndex) |
void | getAtomIdentityInfo(int i, Hashtable info) |
Hashtable | getAtomInfoLong(int i) |
void | getAtomRecordMOL(StringBuffer s, int i) |
BitSet | getAtomsConnected(float min, float max, int intType, BitSet bs) |
BitSet | getAtomsWithin(float distance, BitSet bs, boolean withinAllModels)
Get atoms within a specific distance of any atom in a specific set of
atoms either within all models or within just the model(s) of those atoms
|
BitSet | getAtomsWithin(float distance, Point3f coord) |
Point3f | getAtomSetCenter(BitSet bs) |
Hashtable | getAuxiliaryInfo(BitSet bsModels) |
Point3f | getAverageAtomPoint() |
Point3f[] | getBboxVertices() |
int | getBioPolymerCount() |
int | getBioPolymerCountInModel(int modelIndex) |
int | getBondCountInModel(int modelIndex) |
Hashtable | getBondInfo(int i) |
void | getBondRecordMOL(StringBuffer s, int i, int[] atomMap) |
Point3f | getBoundBoxCenter(int modelIndex) |
String | getBoundBoxCommand(boolean withOptions) |
Vector3f | getBoundBoxCornerVector() |
Hashtable | getBoundBoxInfo() |
BitSet | getBoundBoxModels() |
BoxInfo | getBoxInfo(BitSet bs) |
BitSet | getBranchBitSet(int atomIndex, int atomIndexNot) |
SymmetryInterface[] | getCellInfos() |
int | getChainCount(boolean addWater) |
int | getChainCountInModel(int modelIndex, boolean countWater) |
Vector | getChainInfo(int modelIndex, BitSet bs) |
String | getChimeInfo(int tok, BitSet bs) |
void | getCovalentlyConnectedBitSet(Atom atom, BitSet bs, BitSet bsToTest) |
BitSet | getElementsPresentBitSet(int modelIndex) |
String | getFileHeader(int modelIndex) |
String | getFrameTitle(int modelIndex) |
String | getFullPDBHeader(int modelIndex) |
int | getGroupCount() |
int | getGroupCountInModel(int modelIndex) |
Hashtable | getHeteroList(int modelIndex) |
int | getInsertionCodeIndexInModel(int modelIndex, char insertionCode) |
int | getInsertionCountInModel(int modelIndex) |
String | getInsertionListInModel(int modelIndex) |
BitSet | getIterativeModels(boolean allowJmolData)
only some models can be iterated through.
models for which trajectoryBaseIndexes[i] ! |
int | getJmolDataFrameIndex(int modelIndex, String type) |
int | getJmolDataSourceFrame(int modelIndex) |
String | getJmolFrameType(int modelIndex) |
Model | getModel(int modelIndex) |
BitSet | getModelAtomBitSet(int modelIndex, boolean asCopy)
|
Hashtable | getModelAuxiliaryInfo(int modelIndex) |
Object | getModelAuxiliaryInfo(int modelIndex, String key) |
protected boolean | getModelAuxiliaryInfoBoolean(int modelIndex, String keyName) |
protected int | getModelAuxiliaryInfoInt(int modelIndex, String keyName) |
int[] | getModelCellRange(int modelIndex) |
int | getModelCount() |
Vector3f | getModelDipole(int modelIndex) |
String | getModelExtract(BitSet bs) |
String | getModelFileInfo(BitSet frames) |
String | getModelFileName(int modelIndex) |
int | getModelFileNumber(int modelIndex) |
String | getModelFileType(int modelIndex) |
Hashtable | getModelInfo(BitSet bsModels) |
String | getModelInfoAsString() |
String | getModelName(int modelIndex) |
int | getModelNumber(int modelIndex) |
String | getModelNumberDotted(int modelIndex) |
String | getModelNumberForAtomLabel(int modelIndex) |
StateManager.Orientation | getModelOrientation(int modelIndex) |
Properties | getModelProperties(int modelIndex) |
String | getModelProperty(int modelIndex, String property) |
Model[] | getModels() |
Hashtable | getModelSetAuxiliaryInfo() |
Object | getModelSetAuxiliaryInfo(String keyName) |
boolean | getModelSetAuxiliaryInfoBoolean(String keyName) |
int | getModelSetAuxiliaryInfoInt(String keyName) |
String | getModelSetName() |
Properties | getModelSetProperties() |
String | getModelSetProperty(String propertyName) |
int | getModelSymmetryCount(int modelIndex) |
protected String | getModelSymmetryList(int modelIndex) |
String | getModelTitle(int modelIndex) |
BitSet | getMoleculeBitSet(BitSet bs) |
BitSet | getMoleculeBitSet(int atomIndex) |
int | getMoleculeCountInModel(int modelIndex) |
int | getMoleculeIndex(int atomIndex) |
Vector | getMoleculeInfo(BitSet bsAtoms) |
void | getMolecules() |
float[] | getNotionalUnitcell()
deprecated due to multimodel issues,
but required by an interface -- do NOT remove.
|
String | getPdbAtomData(BitSet bs) |
String | getPdbData(int modelIndex, String type, BitSet bsSelected, boolean addHeader) |
String | getPDBHeader(int modelIndex) |
Point3f[] | getPolymerLeadMidPoints(int iModel, int iPolymer) |
void | getPolymerPointsAndVectors(BitSet bs, Vector vList) |
String | getProteinStructureState(BitSet bsAtoms, boolean taintedOnly, boolean needPhiPsi) |
BitSet | getSequenceBits(String specInfo, BitSet bs) |
String | getSpaceGroupInfoText(String spaceGroup) |
String | getSymmetryInfoAsString(int modelIndex) |
String | getSymmetryInfoAsString() |
SymmetryInterface | getSymTemp() |
protected int | getTrajectoryCount() |
int | getTrajectoryIndex(int modelIndex) |
SymmetryInterface | getUnitCell(int modelIndex) |
String | getUnitCellInfoText() |
Point3f | getUnitCellOffset(int modelIndex) |
AtomIndexIterator | getWithinAtomSetIterator(int atomIndex, float distance, BitSet bsSelected, boolean isGreaterOnly, boolean modelZeroBased) |
AtomIndexIterator | getWithinModelIterator(Atom atomCenter, float radius) |
AtomIndexIterator | getWithinModelIterator(int modelIndex, Point3f center, float radius) |
boolean | hasCalculatedHBonds(BitSet bsAtoms) |
protected void | initializeBspf() |
protected void | initializeBspt(int modelIndex) |
void | invertSelected(Point3f pt, Point4f plane, BitSet bs) |
boolean | isJmolDataFrame(int modelIndex) |
boolean | isJmolDataFrame(Atom atom) |
boolean | isTrajectory(int modelIndex) |
boolean | isTrajectory(int[] countPlusIndices) |
protected int[] | makeConnections(float minDistance, float maxDistance, short order, int connectOperation, BitSet bsA, BitSet bsB, BitSet bsBonds, boolean isBonds) |
void | merge(ModelSet modelSet)
initial transfer of model data from old to new model set.
|
static int | modelFileNumberFromFloat(float fDotM) |
boolean | modelHasVibrationVectors(int modelIndex) |
void | propagateSecondaryStructure() |
void | recalculateLeadMidpointsAndWingVectors(int modelIndex) |
protected void | releaseModelSet() |
void | rotateAtoms(Matrix3f mNew, Matrix3f matrixRotate, BitSet bsAtoms, boolean fullMolecule, Point3f center, boolean isInternal) |
void | saveModelOrientation(int modelIndex, StateManager.Orientation orientation) |
void | selectDisplayedTrajectories(BitSet bs) |
void | setAtomCoord(BitSet bs, int tokType, Object xyzValues) |
void | setAtomCoordRelative(Point3f offset, BitSet bs) |
void | setAtomProperty(BitSet bs, int tok, int iValue, float fValue, float[] values) |
void | setBoundBox(Point3f pt1, Point3f pt2, boolean byCorner) |
BitSet | setConformation(int modelIndex, BitSet bsConformation) |
BitSet | setConformation(int modelIndex, int conformationIndex) |
boolean | setCrystallographicDefaults() |
void | setFrameTitle(int modelIndex, String title) |
void | setJmolDataFrame(String type, int modelIndex, int modelDataIndex) |
void | setModelAuxiliaryInfo(int modelIndex, Object key, Object value) |
void | setModelSetAuxiliaryInfo(Hashtable modelSetAuxiliaryInfo) |
void | setModelSetProperties(Properties modelSetProperties) |
void | setProteinType(BitSet bs, byte iType) |
boolean | setRotationRadius(int modelIndex, float angstroms) |
boolean | setUnitCellOffset(int modelIndex, Point3f pt) |
boolean | setUnitCellOffset(int modelIndex, int nnn) |
void | toCartesian(int modelIndex, Point3f pt) |
void | toFractional(int modelIndex, Point3f pt) |
void | toUnitCell(int modelIndex, Point3f pt, Point3f offset) |
private final Point3f averageAtomPoint
protected int baseGroupIndex
private BitSet bboxAtoms
private BitSet bboxModels
protected BitSet bsAll
protected BitSet bsSymmetry
private BitSet bsTemp
protected BitSet[] elementsPresent
String[] frameTitles
protected int groupCount
protected boolean haveBioClasses
private boolean isBbcageDefault
protected boolean isPDB
protected boolean isXYZ
private final Matrix3f matInv
private final Matrix3f matTemp
protected int modelCount
int[] modelFileNumbers
String[] modelNames
int[] modelNumbers
String[] modelNumbersForAtomLabel
Hashtable modelSetAuxiliaryInfo
protected String modelSetName
Properties modelSetProperties
protected int moleculeCount
static final String[] pdbRecords
boolean proteinStructureTainted
private final Point3f ptTemp
private int selectedMoleculeCount
private BitSet selectedMolecules
protected boolean someModelsHaveAromaticBonds
protected boolean someModelsHaveFractionalCoordinates
protected boolean someModelsHaveSymmetry
protected Vector stateScripts
private int structureCount
protected BitSet structuresDefinedInFile
private int thisStateModel
protected Vector trajectories
protected void addBioPolymerToModel(
Polymer polymer,
Model model)
public void addStateScript(String script1, BitSet bsBonds, BitSet bsAtoms1, BitSet bsAtoms2, String script2, boolean addFrameNumber, boolean postDefinitions)
public int autoBond(BitSet bsA, BitSet bsB, BitSet bsExclude, BitSet bsBonds)
private int[] autoBond(short order, BitSet bsA, BitSet bsB, BitSet bsBonds, boolean isBonds, boolean matchHbond)
private int calcAtomsMinMax(BitSet bs,
BoxInfo boxInfo)
public void calcBoundBoxDimensions(BitSet bs)
public void calcHydrogenBonds(BitSet bsA, BitSet bsB)
public float calcRotationRadius(int modelIndex, Point3f center)
public float calcRotationRadius(BitSet bs)
public void calcSelectedGroupsCount(BitSet bsSelected)
public void calcSelectedMoleculesCount(BitSet bsSelected)
public void calcSelectedMonomersCount(BitSet bsSelected)
public Vector3f calculateMolecularDipole(int modelIndex)
protected void calculatePolymers(BitSet alreadyDefined)
public void calculateStraightness()
void calculateStructuresAllExcept(BitSet alreadyDefined, boolean addFileData)
allows rebuilding of PDB structures;
also accessed by ModelManager from Eval
Parameters: alreadyDefined set to skip calculation addFileData in the case of loading, we add the PDB data
private void calcUnitCellMinMax()
public void clearCalculatedHydrogenBonds(int baseIndex, BitSet bsAtoms)
protected void clearDataFrameReference(int modelIndex)
protected void defineStructure(int modelIndex, String structureType, char startChainID, int startSequenceNumber, char startInsertionCode, char endChainID, int endSequenceNumber, char endInsertionCode)
public void deleteAtoms(int modelIndex, int firstAtomIndex, int nAtoms, BitSet bsAtoms, BitSet bsBonds)
private void freezeModels()
public Vector getAllAtomInfo(BitSet bs)
public Vector getAllBondInfo(BitSet bs)
public Hashtable getAllChainInfo(BitSet bs)
public Hashtable getAllPolymerInfo(BitSet bs)
public int getAltLocCountInModel(int modelIndex)
public int getAltLocIndexInModel(int modelIndex, char alternateLocationID)
public String getAltLocListInModel(int modelIndex)
public BitSet getAtomBits(int tokType, Object specInfo)
general unqualified lookup of atom set type
Parameters: tokType specInfo
Returns: BitSet; or null if we mess up the type
public int getAtomCountInModel(int modelIndex)
public void getAtomIdentityInfo(int i, Hashtable info)
private Hashtable getAtomInfoLong(int i)
void getAtomRecordMOL(StringBuffer s, int i)
public BitSet getAtomsConnected(float min, float max, int intType, BitSet bs)
public BitSet getAtomsWithin(float distance, BitSet bs, boolean withinAllModels)
Get atoms within a specific distance of any atom in a specific set of
atoms either within all models or within just the model(s) of those atoms
Parameters: distance bs withinAllModels
Returns: the set of atoms
public BitSet getAtomsWithin(float distance, Point3f coord)
public Point3f getAtomSetCenter(BitSet bs)
public Hashtable getAuxiliaryInfo(BitSet bsModels)
public Point3f getAverageAtomPoint()
public Point3f[] getBboxVertices()
public int getBioPolymerCount()
public int getBioPolymerCountInModel(int modelIndex)
public int getBondCountInModel(int modelIndex)
private Hashtable getBondInfo(int i)
void getBondRecordMOL(StringBuffer s, int i, int[] atomMap)
public Point3f getBoundBoxCenter(int modelIndex)
public String getBoundBoxCommand(boolean withOptions)
public Vector3f getBoundBoxCornerVector()
public Hashtable getBoundBoxInfo()
public BitSet getBoundBoxModels()
public
BoxInfo getBoxInfo(BitSet bs)
public BitSet getBranchBitSet(int atomIndex, int atomIndexNot)
public int getChainCount(boolean addWater)
public int getChainCountInModel(int modelIndex, boolean countWater)
private Vector getChainInfo(int modelIndex, BitSet bs)
public String getChimeInfo(int tok, BitSet bs)
private void getCovalentlyConnectedBitSet(
Atom atom, BitSet bs, BitSet bsToTest)
public BitSet getElementsPresentBitSet(int modelIndex)
public String getFileHeader(int modelIndex)
public String getFrameTitle(int modelIndex)
private String getFullPDBHeader(int modelIndex)
public int getGroupCount()
public int getGroupCountInModel(int modelIndex)
public Hashtable getHeteroList(int modelIndex)
public int getInsertionCodeIndexInModel(int modelIndex, char insertionCode)
public int getInsertionCountInModel(int modelIndex)
private String getInsertionListInModel(int modelIndex)
public BitSet getIterativeModels(boolean allowJmolData)
only some models can be iterated through.
models for which trajectoryBaseIndexes[i] != i are trajectories only
Parameters: allowJmolData
Returns: bitset of models
public int getJmolDataFrameIndex(int modelIndex, String type)
public int getJmolDataSourceFrame(int modelIndex)
public String getJmolFrameType(int modelIndex)
Model getModel(int modelIndex)
public BitSet getModelAtomBitSet(int modelIndex, boolean asCopy)
Parameters: modelIndex asCopy MUST BE TRUE IF THE BITSET IS GOING TO BE MODIFIED!
Returns: either the actual bitset or a copy
public Hashtable getModelAuxiliaryInfo(int modelIndex)
public Object getModelAuxiliaryInfo(int modelIndex, String key)
protected boolean getModelAuxiliaryInfoBoolean(int modelIndex, String keyName)
protected int getModelAuxiliaryInfoInt(int modelIndex, String keyName)
public int[] getModelCellRange(int modelIndex)
public int getModelCount()
public Vector3f getModelDipole(int modelIndex)
public String getModelExtract(BitSet bs)
public String getModelFileInfo(BitSet frames)
public String getModelFileName(int modelIndex)
public int getModelFileNumber(int modelIndex)
public String getModelFileType(int modelIndex)
public Hashtable getModelInfo(BitSet bsModels)
public String getModelInfoAsString()
public String getModelName(int modelIndex)
public int getModelNumber(int modelIndex)
public String getModelNumberDotted(int modelIndex)
public String getModelNumberForAtomLabel(int modelIndex)
public Properties getModelProperties(int modelIndex)
public String getModelProperty(int modelIndex, String property)
public
Model[] getModels()
public Hashtable getModelSetAuxiliaryInfo()
public Object getModelSetAuxiliaryInfo(String keyName)
boolean getModelSetAuxiliaryInfoBoolean(String keyName)
int getModelSetAuxiliaryInfoInt(String keyName)
public String getModelSetName()
public Properties getModelSetProperties()
public String getModelSetProperty(String propertyName)
public int getModelSymmetryCount(int modelIndex)
protected String getModelSymmetryList(int modelIndex)
public String getModelTitle(int modelIndex)
public BitSet getMoleculeBitSet(BitSet bs)
public BitSet getMoleculeBitSet(int atomIndex)
public int getMoleculeCountInModel(int modelIndex)
public int getMoleculeIndex(int atomIndex)
public Vector getMoleculeInfo(BitSet bsAtoms)
private void getMolecules()
public float[] getNotionalUnitcell()
deprecated due to multimodel issues,
but required by an interface -- do NOT remove.
Returns: just the first unit cell
public String getPdbAtomData(BitSet bs)
public String getPdbData(int modelIndex, String type, BitSet bsSelected, boolean addHeader)
public String getPDBHeader(int modelIndex)
public Point3f[] getPolymerLeadMidPoints(int iModel, int iPolymer)
public void getPolymerPointsAndVectors(BitSet bs, Vector vList)
public String getProteinStructureState(BitSet bsAtoms, boolean taintedOnly, boolean needPhiPsi)
public BitSet getSequenceBits(String specInfo, BitSet bs)
public String getSpaceGroupInfoText(String spaceGroup)
String getSymmetryInfoAsString(int modelIndex)
public String getSymmetryInfoAsString()
protected int getTrajectoryCount()
public int getTrajectoryIndex(int modelIndex)
public String getUnitCellInfoText()
public Point3f getUnitCellOffset(int modelIndex)
public
AtomIndexIterator getWithinAtomSetIterator(int atomIndex, float distance, BitSet bsSelected, boolean isGreaterOnly, boolean modelZeroBased)
private
AtomIndexIterator getWithinModelIterator(int modelIndex, Point3f center, float radius)
public boolean hasCalculatedHBonds(BitSet bsAtoms)
protected void initializeBspf()
protected void initializeBspt(int modelIndex)
public void invertSelected(Point3f pt, Point4f plane, BitSet bs)
public boolean isJmolDataFrame(int modelIndex)
private boolean isJmolDataFrame(
Atom atom)
public boolean isTrajectory(int modelIndex)
public boolean isTrajectory(int[] countPlusIndices)
protected int[] makeConnections(float minDistance, float maxDistance, short order, int connectOperation, BitSet bsA, BitSet bsB, BitSet bsBonds, boolean isBonds)
initial transfer of model data from old to new model set.
Note that all new models are added later, AFTER the old ones. This is
very important, because all of the old atom numbers must map onto the
same numbers in the new model set, or the state script will not run
properly, among other problems.
We subclass these just for sanity sake.
Parameters: modelSet
public static int modelFileNumberFromFloat(float fDotM)
public boolean modelHasVibrationVectors(int modelIndex)
private void propagateSecondaryStructure()
public void recalculateLeadMidpointsAndWingVectors(int modelIndex)
protected void releaseModelSet()
public void rotateAtoms(Matrix3f mNew, Matrix3f matrixRotate, BitSet bsAtoms, boolean fullMolecule, Point3f center, boolean isInternal)
public void selectDisplayedTrajectories(BitSet bs)
public void setAtomCoord(BitSet bs, int tokType, Object xyzValues)
public void setAtomCoordRelative(Point3f offset, BitSet bs)
public void setAtomProperty(BitSet bs, int tok, int iValue, float fValue, float[] values)
public void setBoundBox(Point3f pt1, Point3f pt2, boolean byCorner)
public BitSet setConformation(int modelIndex, BitSet bsConformation)
public BitSet setConformation(int modelIndex, int conformationIndex)
public boolean setCrystallographicDefaults()
public void setFrameTitle(int modelIndex, String title)
public void setJmolDataFrame(String type, int modelIndex, int modelDataIndex)
public void setModelAuxiliaryInfo(int modelIndex, Object key, Object value)
void setModelSetAuxiliaryInfo(Hashtable modelSetAuxiliaryInfo)
void setModelSetProperties(Properties modelSetProperties)
public void setProteinType(BitSet bs, byte iType)
public boolean setRotationRadius(int modelIndex, float angstroms)
public boolean setUnitCellOffset(int modelIndex, Point3f pt)
public boolean setUnitCellOffset(int modelIndex, int nnn)
public void toCartesian(int modelIndex, Point3f pt)
public void toFractional(int modelIndex, Point3f pt)
public void toUnitCell(int modelIndex, Point3f pt, Point3f offset)