org.jmol.modelset
Class ModelCollection

java.lang.Object
  extended by org.jmol.modelset.AtomCollection
      extended by org.jmol.modelset.BondCollection
          extended by org.jmol.modelset.ModelCollection
Direct Known Subclasses:
ModelSet

public abstract class ModelCollection
extends BondCollection


Nested Class Summary
protected static class ModelCollection.StateScript
           
(package private) static class ModelCollection.Structure
           
 
Field Summary
private  javax.vecmath.Point3f averageAtomPoint
           
protected  int baseGroupIndex
           
private  java.util.BitSet bboxAtoms
           
private  java.util.BitSet bboxModels
           
private  BoxInfo boxInfo
           
protected  java.util.BitSet bsAll
           
protected  java.util.BitSet bsSymmetry
           
private  java.util.BitSet bsTemp
           
protected  java.util.BitSet[] elementsPresent
           
(package private)  java.lang.String[] frameTitles
           
protected  int groupCount
           
protected  Group[] groups
           
protected  boolean haveBioClasses
           
private  boolean isBbcageDefault
           
protected  boolean isPDB
           
protected  boolean isXYZ
           
protected  JmolBioResolver jbr
           
private  javax.vecmath.Matrix3f matInv
           
private  javax.vecmath.Matrix3f matTemp
           
protected  int modelCount
           
(package private)  int[] modelFileNumbers
           
(package private)  java.lang.String[] modelNames
           
(package private)  int[] modelNumbers
           
(package private)  java.lang.String[] modelNumbersForAtomLabel
           
protected  Model[] models
           
(package private)  java.util.Hashtable modelSetAuxiliaryInfo
           
protected  java.lang.String modelSetName
           
(package private)  java.util.Properties modelSetProperties
           
protected  int moleculeCount
           
protected  Molecule[] molecules
           
(package private) static java.lang.String[] pdbRecords
           
(package private)  boolean proteinStructureTainted
           
private  javax.vecmath.Point3f ptTemp
           
private  int selectedMoleculeCount
           
private  java.util.BitSet selectedMolecules
           
protected  boolean someModelsHaveAromaticBonds
           
protected  boolean someModelsHaveFractionalCoordinates
           
protected  boolean someModelsHaveSymmetry
           
protected  java.util.Vector stateScripts
           
private  int structureCount
           
private  ModelCollection.Structure[] structures
           
protected  java.util.BitSet structuresDefinedInFile
           
(package private)  SymmetryInterface symTemp
           
private  int thisStateModel
           
protected  java.util.Vector trajectories
           
(package private)  SymmetryInterface[] unitCells
           
private  AtomIteratorWithinSet withinAtomSetIterator
           
private  AtomIteratorWithinModel withinModelIterator
           
 
Fields inherited from class org.jmol.modelset.BondCollection
bondCount, bonds, bsAromatic, bsPseudoHBonds, defaultCovalentMad, freeBonds, MAX_BONDS_LENGTH_TO_CACHE, MAX_NUM_TO_CACHE, numCached
 
Fields inherited from class org.jmol.modelset.AtomCollection
atomCount, atomNames, atoms, atomSerials, bfactor100s, bsEmpty, bsFoundRectangle, bspf, clientAtomReferences, ellipsoids, g3d, maxBondingRadius, occupancies, partialCharges, showRebondTimes, specialAtomIDs, surfaceDistance100s, TAINT_COORD, TAINT_MAX, tainted, vibrationVectors, viewer
 
Constructor Summary
ModelCollection()
           
 
Method Summary
protected  void addBioPolymerToModel(Polymer polymer, Model model)
           
 void addStateScript(java.lang.String script1, java.util.BitSet bsBonds, java.util.BitSet bsAtoms1, java.util.BitSet bsAtoms2, java.lang.String script2, boolean addFrameNumber, boolean postDefinitions)
           
 int autoBond(java.util.BitSet bsA, java.util.BitSet bsB, java.util.BitSet bsExclude, java.util.BitSet bsBonds)
           
private  int[] autoBond(short order, java.util.BitSet bsA, java.util.BitSet bsB, java.util.BitSet bsBonds, boolean isBonds, boolean matchHbond)
           
private  int calcAtomsMinMax(java.util.BitSet bs, BoxInfo boxInfo)
           
 void calcBoundBoxDimensions(java.util.BitSet bs)
           
 void calcHydrogenBonds(java.util.BitSet bsA, java.util.BitSet bsB)
           
 float calcRotationRadius(java.util.BitSet bs)
           
 float calcRotationRadius(int modelIndex, javax.vecmath.Point3f center)
           
 void calcSelectedGroupsCount(java.util.BitSet bsSelected)
           
 void calcSelectedMoleculesCount(java.util.BitSet bsSelected)
           
 void calcSelectedMonomersCount(java.util.BitSet bsSelected)
           
 javax.vecmath.Vector3f calculateMolecularDipole(int modelIndex)
           
protected  void calculatePolymers(java.util.BitSet alreadyDefined)
           
 void calculateStraightness()
           
(package private)  void calculateStructuresAllExcept(java.util.BitSet alreadyDefined, boolean addFileData)
          allows rebuilding of PDB structures; also accessed by ModelManager from Eval
private  void calcUnitCellMinMax()
           
 void clearCalculatedHydrogenBonds(int baseIndex, java.util.BitSet bsAtoms)
           
protected  void clearDataFrameReference(int modelIndex)
           
protected  void defineStructure(int modelIndex, java.lang.String structureType, char startChainID, int startSequenceNumber, char startInsertionCode, char endChainID, int endSequenceNumber, char endInsertionCode)
           
 void deleteAtoms(int modelIndex, int firstAtomIndex, int nAtoms, java.util.BitSet bsAtoms, java.util.BitSet bsBonds)
           
private  void freezeModels()
           
 java.util.Vector getAllAtomInfo(java.util.BitSet bs)
           
 java.util.Vector getAllBondInfo(java.util.BitSet bs)
           
 java.util.Hashtable getAllChainInfo(java.util.BitSet bs)
           
 java.util.Hashtable getAllPolymerInfo(java.util.BitSet bs)
           
 int getAltLocCountInModel(int modelIndex)
           
 int getAltLocIndexInModel(int modelIndex, char alternateLocationID)
           
 java.lang.String getAltLocListInModel(int modelIndex)
           
 java.util.BitSet getAtomBits(int tokType, java.lang.Object specInfo)
          general unqualified lookup of atom set type
 int getAtomCountInModel(int modelIndex)
           
 void getAtomIdentityInfo(int i, java.util.Hashtable info)
           
private  java.util.Hashtable getAtomInfoLong(int i)
           
(package private)  void getAtomRecordMOL(java.lang.StringBuffer s, int i)
           
 java.util.BitSet getAtomsConnected(float min, float max, int intType, java.util.BitSet bs)
           
 javax.vecmath.Point3f getAtomSetCenter(java.util.BitSet bs)
           
 java.util.BitSet getAtomsWithin(float distance, java.util.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
 java.util.BitSet getAtomsWithin(float distance, javax.vecmath.Point3f coord)
           
 java.util.Hashtable getAuxiliaryInfo(java.util.BitSet bsModels)
           
 javax.vecmath.Point3f getAverageAtomPoint()
           
 javax.vecmath.Point3f[] getBboxVertices()
           
 int getBioPolymerCount()
           
 int getBioPolymerCountInModel(int modelIndex)
           
 int getBondCountInModel(int modelIndex)
          for general use
private  java.util.Hashtable getBondInfo(int i)
           
(package private)  void getBondRecordMOL(java.lang.StringBuffer s, int i, int[] atomMap)
           
 javax.vecmath.Point3f getBoundBoxCenter(int modelIndex)
           
 java.lang.String getBoundBoxCommand(boolean withOptions)
           
 javax.vecmath.Vector3f getBoundBoxCornerVector()
           
 java.util.Hashtable getBoundBoxInfo()
           
 java.util.BitSet getBoundBoxModels()
           
 BoxInfo getBoxInfo(java.util.BitSet bs)
           
 java.util.BitSet getBranchBitSet(int atomIndex, int atomIndexNot)
           
 SymmetryInterface[] getCellInfos()
           
 int getChainCount(boolean addWater)
           
 int getChainCountInModel(int modelIndex, boolean countWater)
           
private  java.util.Vector getChainInfo(int modelIndex, java.util.BitSet bs)
           
 java.lang.String getChimeInfo(int tok, java.util.BitSet bs)
           
private  void getCovalentlyConnectedBitSet(Atom atom, java.util.BitSet bs, java.util.BitSet bsToTest)
           
 java.util.BitSet getElementsPresentBitSet(int modelIndex)
           
 java.lang.String getFileHeader(int modelIndex)
           
 java.lang.String getFrameTitle(int modelIndex)
           
private  java.lang.String getFullPDBHeader(int modelIndex)
           
 int getGroupCount()
           
 int getGroupCountInModel(int modelIndex)
           
 java.util.Hashtable getHeteroList(int modelIndex)
           
 int getInsertionCodeIndexInModel(int modelIndex, char insertionCode)
           
 int getInsertionCountInModel(int modelIndex)
           
private  java.lang.String getInsertionListInModel(int modelIndex)
           
 java.util.BitSet getIterativeModels(boolean allowJmolData)
          only some models can be iterated through.
 int getJmolDataFrameIndex(int modelIndex, java.lang.String type)
           
 int getJmolDataSourceFrame(int modelIndex)
           
 java.lang.String getJmolFrameType(int modelIndex)
           
(package private)  Model getModel(int modelIndex)
           
 java.util.BitSet getModelAtomBitSet(int modelIndex, boolean asCopy)
           
 java.util.Hashtable getModelAuxiliaryInfo(int modelIndex)
           
 java.lang.Object getModelAuxiliaryInfo(int modelIndex, java.lang.String key)
           
protected  boolean getModelAuxiliaryInfoBoolean(int modelIndex, java.lang.String keyName)
           
protected  int getModelAuxiliaryInfoInt(int modelIndex, java.lang.String keyName)
           
 int[] getModelCellRange(int modelIndex)
           
 int getModelCount()
           
 javax.vecmath.Vector3f getModelDipole(int modelIndex)
           
 java.lang.String getModelExtract(java.util.BitSet bs)
           
 java.lang.String getModelFileInfo(java.util.BitSet frames)
           
 java.lang.String getModelFileName(int modelIndex)
           
 int getModelFileNumber(int modelIndex)
           
 java.lang.String getModelFileType(int modelIndex)
           
 java.util.Hashtable getModelInfo(java.util.BitSet bsModels)
           
 java.lang.String getModelInfoAsString()
           
 java.lang.String getModelName(int modelIndex)
           
 int getModelNumber(int modelIndex)
           
 java.lang.String getModelNumberDotted(int modelIndex)
           
 java.lang.String getModelNumberForAtomLabel(int modelIndex)
           
 StateManager.Orientation getModelOrientation(int modelIndex)
           
 java.util.Properties getModelProperties(int modelIndex)
           
 java.lang.String getModelProperty(int modelIndex, java.lang.String property)
           
 Model[] getModels()
           
 java.util.Hashtable getModelSetAuxiliaryInfo()
           
 java.lang.Object getModelSetAuxiliaryInfo(java.lang.String keyName)
           
(package private)  boolean getModelSetAuxiliaryInfoBoolean(java.lang.String keyName)
           
(package private)  int getModelSetAuxiliaryInfoInt(java.lang.String keyName)
           
 java.lang.String getModelSetName()
           
 java.util.Properties getModelSetProperties()
           
 java.lang.String getModelSetProperty(java.lang.String propertyName)
           
 int getModelSymmetryCount(int modelIndex)
           
protected  java.lang.String getModelSymmetryList(int modelIndex)
           
 java.lang.String getModelTitle(int modelIndex)
           
 java.util.BitSet getMoleculeBitSet(java.util.BitSet bs)
           
 java.util.BitSet getMoleculeBitSet(int atomIndex)
           
 int getMoleculeCountInModel(int modelIndex)
           
 int getMoleculeIndex(int atomIndex)
           
 java.util.Vector getMoleculeInfo(java.util.BitSet bsAtoms)
           
private  void getMolecules()
           
 float[] getNotionalUnitcell()
          deprecated due to multimodel issues, but required by an interface -- do NOT remove.
 java.lang.String getPdbAtomData(java.util.BitSet bs)
           
 java.lang.String getPdbData(int modelIndex, java.lang.String type, java.util.BitSet bsSelected, boolean addHeader)
           
 java.lang.String getPDBHeader(int modelIndex)
           
 javax.vecmath.Point3f[] getPolymerLeadMidPoints(int iModel, int iPolymer)
           
 void getPolymerPointsAndVectors(java.util.BitSet bs, java.util.Vector vList)
           
 java.lang.String getProteinStructureState(java.util.BitSet bsAtoms, boolean taintedOnly, boolean needPhiPsi)
           
 java.util.BitSet getSequenceBits(java.lang.String specInfo, java.util.BitSet bs)
           
 java.lang.String getSpaceGroupInfoText(java.lang.String spaceGroup)
           
 java.lang.String getSymmetryInfoAsString()
           
(package private)  java.lang.String getSymmetryInfoAsString(int modelIndex)
           
(package private)  SymmetryInterface getSymTemp()
           
protected  int getTrajectoryCount()
           
 int getTrajectoryIndex(int modelIndex)
           
 SymmetryInterface getUnitCell(int modelIndex)
           
 java.lang.String getUnitCellInfoText()
           
 javax.vecmath.Point3f getUnitCellOffset(int modelIndex)
           
 AtomIndexIterator getWithinAtomSetIterator(int atomIndex, float distance, java.util.BitSet bsSelected, boolean isGreaterOnly, boolean modelZeroBased)
           
 AtomIndexIterator getWithinModelIterator(Atom atomCenter, float radius)
           
private  AtomIndexIterator getWithinModelIterator(int modelIndex, javax.vecmath.Point3f center, float radius)
           
 boolean hasCalculatedHBonds(java.util.BitSet bsAtoms)
           
protected  void initializeBspf()
           
protected  void initializeBspt(int modelIndex)
           
 void invertSelected(javax.vecmath.Point3f pt, javax.vecmath.Point4f plane, java.util.BitSet bs)
           
private  boolean isJmolDataFrame(Atom atom)
           
 boolean isJmolDataFrame(int modelIndex)
           
 boolean isTrajectory(int modelIndex)
           
 boolean isTrajectory(int[] countPlusIndices)
           
protected  int[] makeConnections(float minDistance, float maxDistance, short order, int connectOperation, java.util.BitSet bsA, java.util.BitSet bsB, java.util.BitSet bsBonds, boolean isBonds)
           
(package private)  void merge(ModelSet modelSet)
          initial transfer of model data from old to new model set.
static int modelFileNumberFromFloat(float fDotM)
           
 boolean modelHasVibrationVectors(int modelIndex)
           
private  void propagateSecondaryStructure()
           
 void recalculateLeadMidpointsAndWingVectors(int modelIndex)
           
protected  void releaseModelSet()
           
 void rotateAtoms(javax.vecmath.Matrix3f mNew, javax.vecmath.Matrix3f matrixRotate, java.util.BitSet bsAtoms, boolean fullMolecule, javax.vecmath.Point3f center, boolean isInternal)
           
 void saveModelOrientation(int modelIndex, StateManager.Orientation orientation)
           
 void selectDisplayedTrajectories(java.util.BitSet bs)
           
 void setAtomCoord(java.util.BitSet bs, int tokType, java.lang.Object xyzValues)
           
 void setAtomCoordRelative(javax.vecmath.Point3f offset, java.util.BitSet bs)
           
 void setAtomProperty(java.util.BitSet bs, int tok, int iValue, float fValue, float[] values)
           
 void setBoundBox(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, boolean byCorner)
           
 java.util.BitSet setConformation(int modelIndex, java.util.BitSet bsConformation)
           
 java.util.BitSet setConformation(int modelIndex, int conformationIndex)
           
 boolean setCrystallographicDefaults()
           
 void setFrameTitle(int modelIndex, java.lang.String title)
           
 void setJmolDataFrame(java.lang.String type, int modelIndex, int modelDataIndex)
           
 void setModelAuxiliaryInfo(int modelIndex, java.lang.Object key, java.lang.Object value)
           
(package private)  void setModelSetAuxiliaryInfo(java.util.Hashtable modelSetAuxiliaryInfo)
           
(package private)  void setModelSetProperties(java.util.Properties modelSetProperties)
           
 void setProteinType(java.util.BitSet bs, byte iType)
           
 boolean setRotationRadius(int modelIndex, float angstroms)
           
 boolean setUnitCellOffset(int modelIndex, int nnn)
           
 boolean setUnitCellOffset(int modelIndex, javax.vecmath.Point3f pt)
           
 void toCartesian(int modelIndex, javax.vecmath.Point3f pt)
           
 void toFractional(int modelIndex, javax.vecmath.Point3f pt)
           
 void toUnitCell(int modelIndex, javax.vecmath.Point3f pt, javax.vecmath.Point3f offset)
           
 
Methods inherited from class org.jmol.modelset.BondCollection
addHydrogenBond, assignAromaticBonds, assignAromaticBonds, autoHbond, bondAtoms, bondMutually, checkValencesAndBond, deleteAllBonds, deleteBonds, deleteConnections, getBondAt, getBondAtom1, getBondAtom2, getBondColix1, getBondColix2, getBondCount, getBondIterator, getBondIterator, getBondModelIndex, getBondOrder, getBondOrder, getBondRadius, getBonds, getBondsForSelectedAtoms, getBondsForSelectedAtoms, getDefaultMadFromOrder, resetAromatic, setBond
 
Methods inherited from class org.jmol.modelset.AtomCollection
calculateSurface, clearBfactorRange, deleteAtoms, fillAtomData, findAtomsInRectangle, findMaxRadii, findNearestAtomIndex, getAdditionalHydrogens, getAtomAt, getAtomChain, getAtomColix, getAtomCount, getAtomicPropertyState, getAtomicPropertyState, getAtomIndexFromAtomNumber, getAtomIndices, getAtomInfo, getAtomInfoXYZ, getAtomModelIndex, getAtomName, getAtomNames, getAtomNumber, getAtomPoint3f, getAtomRadius, getAtoms, getAtomSequenceCode, getAtomsWithin, getAtomVdwRadius, getAtomX, getAtomY, getAtomZ, getBfactor100Hi, getBfactor100Lo, getBFactors, getChainBits, getClickableSet, getElementName, getElementNumber, getElementSymbol, getEllipsoid, getHybridizationAndAxes, getMaxVanderwaalsRadius, getModelBitSet, getPartialCharges, getQuaternion, getRadiusVdwJmol, getSeqcodeBits, getSurfaceDistance100, getSurfaceDistanceMax, getTaintedAtoms, getUserSettableType, getVibrationCoord, getVibrationVector, getVisibleSet, isAtomHidden, isAtomNameMatch, isCursorOnTopOf, isInLatticeCell, loadData, merge, modelSetHasVibrationVectors, setAtomCoord, setAtomCoordRelative, setAtomCoordRelative, setBFactor, setBsHidden, setEllipsoid, setFormalCharges, setOccupancy, setPartialCharge, setTaintedAtoms, setVibrationVector, taint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bsSymmetry

protected java.util.BitSet bsSymmetry

modelSetName

protected java.lang.String modelSetName

models

protected Model[] models

modelCount

protected int modelCount

unitCells

SymmetryInterface[] unitCells

modelNumbers

int[] modelNumbers

modelFileNumbers

int[] modelFileNumbers

modelNumbersForAtomLabel

java.lang.String[] modelNumbersForAtomLabel

modelNames

java.lang.String[] modelNames

frameTitles

java.lang.String[] frameTitles

elementsPresent

protected java.util.BitSet[] elementsPresent

isXYZ

protected boolean isXYZ

isPDB

protected boolean isPDB

modelSetProperties

java.util.Properties modelSetProperties

modelSetAuxiliaryInfo

java.util.Hashtable modelSetAuxiliaryInfo

groups

protected Group[] groups

groupCount

protected int groupCount

baseGroupIndex

protected int baseGroupIndex

structureCount

private int structureCount

structures

private ModelCollection.Structure[] structures

haveBioClasses

protected boolean haveBioClasses

jbr

protected JmolBioResolver jbr

structuresDefinedInFile

protected java.util.BitSet structuresDefinedInFile

someModelsHaveSymmetry

protected boolean someModelsHaveSymmetry

someModelsHaveAromaticBonds

protected boolean someModelsHaveAromaticBonds

someModelsHaveFractionalCoordinates

protected boolean someModelsHaveFractionalCoordinates

molecules

protected Molecule[] molecules

moleculeCount

protected int moleculeCount

matTemp

private final javax.vecmath.Matrix3f matTemp

matInv

private final javax.vecmath.Matrix3f matInv

ptTemp

private final javax.vecmath.Point3f ptTemp

averageAtomPoint

private final javax.vecmath.Point3f averageAtomPoint

isBbcageDefault

private boolean isBbcageDefault

bboxModels

private java.util.BitSet bboxModels

bboxAtoms

private java.util.BitSet bboxAtoms

boxInfo

private final BoxInfo boxInfo

stateScripts

protected java.util.Vector stateScripts

thisStateModel

private int thisStateModel

trajectories

protected java.util.Vector trajectories

pdbRecords

static final java.lang.String[] pdbRecords

bsTemp

private java.util.BitSet bsTemp

selectedMolecules

private java.util.BitSet selectedMolecules

selectedMoleculeCount

private int selectedMoleculeCount

withinModelIterator

private AtomIteratorWithinModel withinModelIterator

withinAtomSetIterator

private AtomIteratorWithinSet withinAtomSetIterator

bsAll

protected java.util.BitSet bsAll

proteinStructureTainted

boolean proteinStructureTainted

symTemp

SymmetryInterface symTemp
Constructor Detail

ModelCollection

public ModelCollection()
Method Detail

merge

void merge(ModelSet modelSet)
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.

Overrides:
merge in class BondCollection
Parameters:
modelSet -

releaseModelSet

protected void releaseModelSet()
Overrides:
releaseModelSet in class BondCollection

getModelSetName

public java.lang.String getModelSetName()

getModels

public Model[] getModels()

getModelCount

public int getModelCount()

getCellInfos

public SymmetryInterface[] getCellInfos()

getUnitCell

public SymmetryInterface getUnitCell(int modelIndex)

getModelName

public java.lang.String getModelName(int modelIndex)

getModelTitle

public java.lang.String getModelTitle(int modelIndex)

getModelFileName

public java.lang.String getModelFileName(int modelIndex)

setFrameTitle

public void setFrameTitle(int modelIndex,
                          java.lang.String title)

getFrameTitle

public java.lang.String getFrameTitle(int modelIndex)

getModelNumberForAtomLabel

public java.lang.String getModelNumberForAtomLabel(int modelIndex)

calculatePolymers

protected void calculatePolymers(java.util.BitSet alreadyDefined)

addBioPolymerToModel

protected void addBioPolymerToModel(Polymer polymer,
                                    Model model)

getNotionalUnitcell

public float[] getNotionalUnitcell()
deprecated due to multimodel issues, but required by an interface -- do NOT remove.

Returns:
just the first unit cell

setCrystallographicDefaults

public boolean setCrystallographicDefaults()

getAverageAtomPoint

public javax.vecmath.Point3f getAverageAtomPoint()

getBoundBoxCenter

public javax.vecmath.Point3f getBoundBoxCenter(int modelIndex)

getBoundBoxCornerVector

public javax.vecmath.Vector3f getBoundBoxCornerVector()

getBboxVertices

public javax.vecmath.Point3f[] getBboxVertices()

getBoundBoxInfo

public java.util.Hashtable getBoundBoxInfo()

getBoundBoxModels

public java.util.BitSet getBoundBoxModels()

setBoundBox

public void setBoundBox(javax.vecmath.Point3f pt1,
                        javax.vecmath.Point3f pt2,
                        boolean byCorner)

getBoundBoxCommand

public java.lang.String getBoundBoxCommand(boolean withOptions)

setRotationRadius

public boolean setRotationRadius(int modelIndex,
                                 float angstroms)

calcRotationRadius

public float calcRotationRadius(int modelIndex,
                                javax.vecmath.Point3f center)

calcBoundBoxDimensions

public void calcBoundBoxDimensions(java.util.BitSet bs)

getBoxInfo

public BoxInfo getBoxInfo(java.util.BitSet bs)

calcAtomsMinMax

private int calcAtomsMinMax(java.util.BitSet bs,
                            BoxInfo boxInfo)

calcUnitCellMinMax

private void calcUnitCellMinMax()

calcRotationRadius

public float calcRotationRadius(java.util.BitSet bs)

getAtomSetCenter

public javax.vecmath.Point3f getAtomSetCenter(java.util.BitSet bs)

setAtomProperty

public void setAtomProperty(java.util.BitSet bs,
                            int tok,
                            int iValue,
                            float fValue,
                            float[] values)
Overrides:
setAtomProperty in class AtomCollection

addStateScript

public void addStateScript(java.lang.String script1,
                           java.util.BitSet bsBonds,
                           java.util.BitSet bsAtoms1,
                           java.util.BitSet bsAtoms2,
                           java.lang.String script2,
                           boolean addFrameNumber,
                           boolean postDefinitions)

defineStructure

protected void defineStructure(int modelIndex,
                               java.lang.String structureType,
                               char startChainID,
                               int startSequenceNumber,
                               char startInsertionCode,
                               char endChainID,
                               int endSequenceNumber,
                               char endInsertionCode)

calculateStructuresAllExcept

void calculateStructuresAllExcept(java.util.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

setProteinType

public void setProteinType(java.util.BitSet bs,
                           byte iType)

freezeModels

private void freezeModels()

setConformation

public java.util.BitSet setConformation(int modelIndex,
                                        java.util.BitSet bsConformation)

setConformation

public java.util.BitSet setConformation(int modelIndex,
                                        int conformationIndex)

getHeteroList

public java.util.Hashtable getHeteroList(int modelIndex)

setModelSetProperties

void setModelSetProperties(java.util.Properties modelSetProperties)

setModelSetAuxiliaryInfo

void setModelSetAuxiliaryInfo(java.util.Hashtable modelSetAuxiliaryInfo)

getModelSetProperties

public java.util.Properties getModelSetProperties()

getModelSetAuxiliaryInfo

public java.util.Hashtable getModelSetAuxiliaryInfo()

getModelSetProperty

public java.lang.String getModelSetProperty(java.lang.String propertyName)

getModelSetAuxiliaryInfo

public java.lang.Object getModelSetAuxiliaryInfo(java.lang.String keyName)

getModelSetAuxiliaryInfoBoolean

boolean getModelSetAuxiliaryInfoBoolean(java.lang.String keyName)

getModelSetAuxiliaryInfoInt

int getModelSetAuxiliaryInfoInt(java.lang.String keyName)

getTrajectoryCount

protected int getTrajectoryCount()

getTrajectoryIndex

public int getTrajectoryIndex(int modelIndex)

isTrajectory

public boolean isTrajectory(int modelIndex)

isTrajectory

public boolean isTrajectory(int[] countPlusIndices)

getIterativeModels

public java.util.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

selectDisplayedTrajectories

public void selectDisplayedTrajectories(java.util.BitSet bs)

getModelNumberDotted

public java.lang.String getModelNumberDotted(int modelIndex)

getModelNumber

public int getModelNumber(int modelIndex)

getModelFileNumber

public int getModelFileNumber(int modelIndex)

getModelProperties

public java.util.Properties getModelProperties(int modelIndex)

getModelProperty

public java.lang.String getModelProperty(int modelIndex,
                                         java.lang.String property)

getModelAuxiliaryInfo

public java.util.Hashtable getModelAuxiliaryInfo(int modelIndex)

setModelAuxiliaryInfo

public void setModelAuxiliaryInfo(int modelIndex,
                                  java.lang.Object key,
                                  java.lang.Object value)

getModelAuxiliaryInfo

public java.lang.Object getModelAuxiliaryInfo(int modelIndex,
                                              java.lang.String key)

getModelAuxiliaryInfoBoolean

protected boolean getModelAuxiliaryInfoBoolean(int modelIndex,
                                               java.lang.String keyName)

getModelAuxiliaryInfoInt

protected int getModelAuxiliaryInfoInt(int modelIndex,
                                       java.lang.String keyName)

getModel

Model getModel(int modelIndex)

getInsertionCountInModel

public int getInsertionCountInModel(int modelIndex)

getModelFileType

public java.lang.String getModelFileType(int modelIndex)

modelFileNumberFromFloat

public static int modelFileNumberFromFloat(float fDotM)

getAltLocCountInModel

public int getAltLocCountInModel(int modelIndex)

propagateSecondaryStructure

private void propagateSecondaryStructure()

getChainCount

public int getChainCount(boolean addWater)

getBioPolymerCount

public int getBioPolymerCount()

getBioPolymerCountInModel

public int getBioPolymerCountInModel(int modelIndex)

getPolymerPointsAndVectors

public void getPolymerPointsAndVectors(java.util.BitSet bs,
                                       java.util.Vector vList)

recalculateLeadMidpointsAndWingVectors

public void recalculateLeadMidpointsAndWingVectors(int modelIndex)

getPolymerLeadMidPoints

public javax.vecmath.Point3f[] getPolymerLeadMidPoints(int iModel,
                                                       int iPolymer)

getChainCountInModel

public int getChainCountInModel(int modelIndex,
                                boolean countWater)

getGroupCount

public int getGroupCount()

getGroupCountInModel

public int getGroupCountInModel(int modelIndex)

calcSelectedGroupsCount

public void calcSelectedGroupsCount(java.util.BitSet bsSelected)

calcSelectedMonomersCount

public void calcSelectedMonomersCount(java.util.BitSet bsSelected)

calcHydrogenBonds

public void calcHydrogenBonds(java.util.BitSet bsA,
                              java.util.BitSet bsB)

calculateStraightness

public void calculateStraightness()

getPdbAtomData

public java.lang.String getPdbAtomData(java.util.BitSet bs)

getPdbData

public java.lang.String getPdbData(int modelIndex,
                                   java.lang.String type,
                                   java.util.BitSet bsSelected,
                                   boolean addHeader)

isJmolDataFrame

public boolean isJmolDataFrame(int modelIndex)

isJmolDataFrame

private boolean isJmolDataFrame(Atom atom)

setJmolDataFrame

public void setJmolDataFrame(java.lang.String type,
                             int modelIndex,
                             int modelDataIndex)

getJmolDataFrameIndex

public int getJmolDataFrameIndex(int modelIndex,
                                 java.lang.String type)

clearDataFrameReference

protected void clearDataFrameReference(int modelIndex)

getJmolFrameType

public java.lang.String getJmolFrameType(int modelIndex)

getJmolDataSourceFrame

public int getJmolDataSourceFrame(int modelIndex)

saveModelOrientation

public void saveModelOrientation(int modelIndex,
                                 StateManager.Orientation orientation)

getModelOrientation

public StateManager.Orientation getModelOrientation(int modelIndex)

getFullPDBHeader

private java.lang.String getFullPDBHeader(int modelIndex)

getPDBHeader

public java.lang.String getPDBHeader(int modelIndex)

getFileHeader

public java.lang.String getFileHeader(int modelIndex)

getModelInfo

public java.util.Hashtable getModelInfo(java.util.BitSet bsModels)

getAltLocIndexInModel

public int getAltLocIndexInModel(int modelIndex,
                                 char alternateLocationID)

getInsertionCodeIndexInModel

public int getInsertionCodeIndexInModel(int modelIndex,
                                        char insertionCode)

getAltLocListInModel

public java.lang.String getAltLocListInModel(int modelIndex)

getInsertionListInModel

private java.lang.String getInsertionListInModel(int modelIndex)

getModelSymmetryList

protected java.lang.String getModelSymmetryList(int modelIndex)

getModelSymmetryCount

public int getModelSymmetryCount(int modelIndex)

getModelCellRange

public int[] getModelCellRange(int modelIndex)

modelHasVibrationVectors

public boolean modelHasVibrationVectors(int modelIndex)

getElementsPresentBitSet

public java.util.BitSet getElementsPresentBitSet(int modelIndex)

getSymmetryInfoAsString

java.lang.String getSymmetryInfoAsString(int modelIndex)

toCartesian

public void toCartesian(int modelIndex,
                        javax.vecmath.Point3f pt)

toFractional

public void toFractional(int modelIndex,
                         javax.vecmath.Point3f pt)

toUnitCell

public void toUnitCell(int modelIndex,
                       javax.vecmath.Point3f pt,
                       javax.vecmath.Point3f offset)

getUnitCellOffset

public javax.vecmath.Point3f getUnitCellOffset(int modelIndex)

setUnitCellOffset

public boolean setUnitCellOffset(int modelIndex,
                                 javax.vecmath.Point3f pt)

setUnitCellOffset

public boolean setUnitCellOffset(int modelIndex,
                                 int nnn)

getMoleculeInfo

public java.util.Vector getMoleculeInfo(java.util.BitSet bsAtoms)

getMoleculeIndex

public int getMoleculeIndex(int atomIndex)

rotateAtoms

public void rotateAtoms(javax.vecmath.Matrix3f mNew,
                        javax.vecmath.Matrix3f matrixRotate,
                        java.util.BitSet bsAtoms,
                        boolean fullMolecule,
                        javax.vecmath.Point3f center,
                        boolean isInternal)

getMoleculeBitSet

public java.util.BitSet getMoleculeBitSet(java.util.BitSet bs)

getMoleculeBitSet

public java.util.BitSet getMoleculeBitSet(int atomIndex)

invertSelected

public void invertSelected(javax.vecmath.Point3f pt,
                           javax.vecmath.Point4f plane,
                           java.util.BitSet bs)

getModelDipole

public javax.vecmath.Vector3f getModelDipole(int modelIndex)

calculateMolecularDipole

public javax.vecmath.Vector3f calculateMolecularDipole(int modelIndex)

getMoleculeCountInModel

public int getMoleculeCountInModel(int modelIndex)

calcSelectedMoleculesCount

public void calcSelectedMoleculesCount(java.util.BitSet bsSelected)

getMolecules

private void getMolecules()

getBranchBitSet

public java.util.BitSet getBranchBitSet(int atomIndex,
                                        int atomIndexNot)

getCovalentlyConnectedBitSet

private void getCovalentlyConnectedBitSet(Atom atom,
                                          java.util.BitSet bs,
                                          java.util.BitSet bsToTest)

hasCalculatedHBonds

public boolean hasCalculatedHBonds(java.util.BitSet bsAtoms)

clearCalculatedHydrogenBonds

public void clearCalculatedHydrogenBonds(int baseIndex,
                                         java.util.BitSet bsAtoms)

initializeBspf

protected void initializeBspf()

initializeBspt

protected void initializeBspt(int modelIndex)

getWithinAtomSetIterator

public AtomIndexIterator getWithinAtomSetIterator(int atomIndex,
                                                  float distance,
                                                  java.util.BitSet bsSelected,
                                                  boolean isGreaterOnly,
                                                  boolean modelZeroBased)

getWithinModelIterator

public AtomIndexIterator getWithinModelIterator(Atom atomCenter,
                                                float radius)

getWithinModelIterator

private AtomIndexIterator getWithinModelIterator(int modelIndex,
                                                 javax.vecmath.Point3f center,
                                                 float radius)

getBondCountInModel

public int getBondCountInModel(int modelIndex)
Description copied from class: BondCollection
for general use

Overrides:
getBondCountInModel in class BondCollection
Parameters:
modelIndex - the model of interest or -1 for all
Returns:
the actual number of connections

setAtomCoordRelative

public void setAtomCoordRelative(javax.vecmath.Point3f offset,
                                 java.util.BitSet bs)

setAtomCoord

public void setAtomCoord(java.util.BitSet bs,
                         int tokType,
                         java.lang.Object xyzValues)
Overrides:
setAtomCoord in class AtomCollection

getAtomCountInModel

public int getAtomCountInModel(int modelIndex)
Overrides:
getAtomCountInModel in class AtomCollection

getModelAtomBitSet

public java.util.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

getAtomBits

public java.util.BitSet getAtomBits(int tokType,
                                    java.lang.Object specInfo)
general unqualified lookup of atom set type

Overrides:
getAtomBits in class BondCollection
Parameters:
tokType -
specInfo -
Returns:
BitSet; or null if we mess up the type

getAtomsWithin

public java.util.BitSet getAtomsWithin(float distance,
                                       java.util.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

getAtomsWithin

public java.util.BitSet getAtomsWithin(float distance,
                                       javax.vecmath.Point3f coord)

getSequenceBits

public java.util.BitSet getSequenceBits(java.lang.String specInfo,
                                        java.util.BitSet bs)

makeConnections

protected int[] makeConnections(float minDistance,
                                float maxDistance,
                                short order,
                                int connectOperation,
                                java.util.BitSet bsA,
                                java.util.BitSet bsB,
                                java.util.BitSet bsBonds,
                                boolean isBonds)

autoBond

public int autoBond(java.util.BitSet bsA,
                    java.util.BitSet bsB,
                    java.util.BitSet bsExclude,
                    java.util.BitSet bsBonds)

autoBond

private int[] autoBond(short order,
                       java.util.BitSet bsA,
                       java.util.BitSet bsB,
                       java.util.BitSet bsBonds,
                       boolean isBonds,
                       boolean matchHbond)

getProteinStructureState

public java.lang.String getProteinStructureState(java.util.BitSet bsAtoms,
                                                 boolean taintedOnly,
                                                 boolean needPhiPsi)

getModelInfoAsString

public java.lang.String getModelInfoAsString()

getSymmetryInfoAsString

public java.lang.String getSymmetryInfoAsString()

getAtomsConnected

public java.util.BitSet getAtomsConnected(float min,
                                          float max,
                                          int intType,
                                          java.util.BitSet bs)

getModelExtract

public java.lang.String getModelExtract(java.util.BitSet bs)

getAtomRecordMOL

void getAtomRecordMOL(java.lang.StringBuffer s,
                      int i)

getBondRecordMOL

void getBondRecordMOL(java.lang.StringBuffer s,
                      int i,
                      int[] atomMap)

getChimeInfo

public java.lang.String getChimeInfo(int tok,
                                     java.util.BitSet bs)
Overrides:
getChimeInfo in class AtomCollection

getModelFileInfo

public java.lang.String getModelFileInfo(java.util.BitSet frames)

getAuxiliaryInfo

public java.util.Hashtable getAuxiliaryInfo(java.util.BitSet bsModels)

getAllAtomInfo

public java.util.Vector getAllAtomInfo(java.util.BitSet bs)

getAtomIdentityInfo

public void getAtomIdentityInfo(int i,
                                java.util.Hashtable info)

getAtomInfoLong

private java.util.Hashtable getAtomInfoLong(int i)

getAllBondInfo

public java.util.Vector getAllBondInfo(java.util.BitSet bs)

getBondInfo

private java.util.Hashtable getBondInfo(int i)

getAllChainInfo

public java.util.Hashtable getAllChainInfo(java.util.BitSet bs)

getChainInfo

private java.util.Vector getChainInfo(int modelIndex,
                                      java.util.BitSet bs)

getAllPolymerInfo

public java.util.Hashtable getAllPolymerInfo(java.util.BitSet bs)

getUnitCellInfoText

public java.lang.String getUnitCellInfoText()

getSpaceGroupInfoText

public java.lang.String getSpaceGroupInfoText(java.lang.String spaceGroup)

getSymTemp

SymmetryInterface getSymTemp()

deleteAtoms

public void deleteAtoms(int modelIndex,
                        int firstAtomIndex,
                        int nAtoms,
                        java.util.BitSet bsAtoms,
                        java.util.BitSet bsBonds)