org.jmol.modelset
Class ModelLoader
java.lang.Object
org.jmol.modelset.AtomCollection
org.jmol.modelset.BondCollection
org.jmol.modelset.ModelCollection
org.jmol.modelset.ModelSet
org.jmol.modelset.ModelLoader
public final class ModelLoader
- extends ModelSet
Fields inherited from class org.jmol.modelset.ModelCollection |
baseGroupIndex, bsAll, bsSymmetry, elementsPresent, frameTitles, groupCount, groups, haveBioClasses, isPDB, isXYZ, jbr, modelCount, modelFileNumbers, modelNames, modelNumbers, modelNumbersForAtomLabel, models, modelSetAuxiliaryInfo, modelSetName, modelSetProperties, moleculeCount, molecules, pdbRecords, proteinStructureTainted, someModelsHaveAromaticBonds, someModelsHaveFractionalCoordinates, someModelsHaveSymmetry, stateScripts, structuresDefinedInFile, symTemp, trajectories, unitCells |
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 |
Method Summary |
private void |
addAtom(int modelIndex,
java.util.BitSet atomSymmetry,
int atomSite,
java.lang.Object atomUid,
short atomicAndIsotopeNumber,
java.lang.String atomName,
int size,
int formalCharge,
float partialCharge,
java.lang.Object[] ellipsoid,
int occupancy,
float bfactor,
float x,
float y,
float z,
boolean isHetero,
int atomSerial,
char chainID,
java.lang.String group3,
int groupSequenceNumber,
char groupInsertionCode,
float vectorX,
float vectorY,
float vectorZ,
char alternateLocationID,
java.lang.Object clientAtomReference,
float radius)
|
private void |
addGroup(Chain chain,
Group group)
|
private void |
bondAtoms(java.lang.Object atomUid1,
java.lang.Object atomUid2,
short order)
|
private void |
checkNewGroup(int atomIndex,
int modelIndex,
char chainID,
java.lang.String group3,
int groupSequenceNumber,
char groupInsertionCode)
|
private void |
countGroup(int modelIndex,
java.lang.String code,
java.lang.String group3)
|
protected void |
defineStructure(int modelIndex,
java.lang.String structureType,
char startChainID,
int startSequenceNumber,
char startInsertionCode,
char endChainID,
int endSequenceNumber,
char endInsertionCode)
|
private void |
distinguishAndPropagateGroup(int groupIndex,
Chain chain,
java.lang.String group3,
int seqcode,
int firstAtomIndex,
int maxAtomIndex)
|
private void |
finalizeGroupBuild()
|
private void |
finalizeModels(int baseModelCount)
Model numbers are considerably more complicated in Jmol 11. |
private void |
finalizeShapes()
|
private void |
findElementsPresent()
|
private void |
freeze()
|
private Chain |
getOrAllocateChain(Model model,
char chainID)
|
private void |
growAtomArrays(int byHowMuch)
|
private void |
initializeAtomBondModelCounts()
|
private void |
initializeBonding()
|
private void |
initializeBuild(int atomCountEstimate)
|
private void |
initializeGroupBuild()
also from calculateStructures |
private void |
initializeInfo(java.lang.String name,
int nAtoms,
java.util.Properties properties,
java.util.Hashtable info)
|
private void |
initializeMerge()
|
private void |
initializeModelSet(JmolAdapter adapter,
java.lang.Object clientFile)
|
private void |
initializeUnitCellAndSymmetry()
|
private void |
iterateOverAllNewAtoms(JmolAdapter adapter,
java.lang.Object clientFile)
|
private void |
iterateOverAllNewBonds(JmolAdapter adapter,
java.lang.Object clientFile)
|
private void |
iterateOverAllNewModels(JmolAdapter adapter,
java.lang.Object clientFile)
|
private void |
iterateOverAllNewStructures(JmolAdapter adapter,
java.lang.Object clientFile)
Pull in all spans of helix, etc. |
private static byte |
lookupSpecialAtomID(java.lang.String atomName)
|
private void |
mergeModelArrays()
|
protected void |
releaseModelSet()
|
private void |
setAtomNamesAndNumbers()
|
(package private) boolean |
setModelNameNumberProperties(int modelIndex,
int trajectoryBaseIndex,
java.lang.String modelName,
int modelNumber,
java.util.Properties modelProperties,
java.util.Hashtable modelAuxiliaryInfo,
boolean isPDB,
java.lang.String jmolData)
|
Methods inherited from class org.jmol.modelset.ModelSet |
assignAromaticBonds, autoHbond, calculatePointGroup, calculateStructures, checkObjectClicked, checkObjectDragged, checkObjectHovered, deleteAllBonds, deleteAtoms, fillAtomData, findNearestAtomIndex, frankClicked, getAtomBits, getBitSetTrajectories, getDefinedState, getEchoStateActive, getModelNumberIndex, getModelSetTypeName, getPointGroupAsString, getPointGroupInfo, getSelectionHaloEnabled, getShape, getShapeIdFromObjectName, getShapeInfo, getShapeProperty, getState, getTrajectoryInfo, getVanderwaalsMar, includeAllRelatedFrames, loadShape, makeConnections, setEchoStateActive, setModelVisibility, setPdbConectBonding, setSelectionHaloEnabled, setShapeProperty, setShapeSize, setTrajectory, setTrajectory |
Methods inherited from class org.jmol.modelset.ModelCollection |
addBioPolymerToModel, addStateScript, autoBond, calcBoundBoxDimensions, calcHydrogenBonds, calcRotationRadius, calcRotationRadius, calcSelectedGroupsCount, calcSelectedMoleculesCount, calcSelectedMonomersCount, calculateMolecularDipole, calculatePolymers, calculateStraightness, calculateStructuresAllExcept, clearCalculatedHydrogenBonds, clearDataFrameReference, deleteAtoms, getAllAtomInfo, getAllBondInfo, getAllChainInfo, getAllPolymerInfo, getAltLocCountInModel, getAltLocIndexInModel, getAltLocListInModel, getAtomCountInModel, getAtomIdentityInfo, getAtomRecordMOL, getAtomsConnected, getAtomSetCenter, getAtomsWithin, getAtomsWithin, getAuxiliaryInfo, getAverageAtomPoint, getBboxVertices, getBioPolymerCount, getBioPolymerCountInModel, getBondCountInModel, getBondRecordMOL, getBoundBoxCenter, getBoundBoxCommand, getBoundBoxCornerVector, getBoundBoxInfo, getBoundBoxModels, getBoxInfo, getBranchBitSet, getCellInfos, getChainCount, getChainCountInModel, getChimeInfo, getElementsPresentBitSet, getFileHeader, getFrameTitle, getGroupCount, getGroupCountInModel, getHeteroList, getInsertionCodeIndexInModel, getInsertionCountInModel, getIterativeModels, getJmolDataFrameIndex, getJmolDataSourceFrame, getJmolFrameType, getModel, getModelAtomBitSet, getModelAuxiliaryInfo, getModelAuxiliaryInfo, getModelAuxiliaryInfoBoolean, getModelAuxiliaryInfoInt, getModelCellRange, getModelCount, getModelDipole, getModelExtract, getModelFileInfo, getModelFileName, getModelFileNumber, getModelFileType, getModelInfo, getModelInfoAsString, getModelName, getModelNumber, getModelNumberDotted, getModelNumberForAtomLabel, getModelOrientation, getModelProperties, getModelProperty, getModels, getModelSetAuxiliaryInfo, getModelSetAuxiliaryInfo, getModelSetAuxiliaryInfoBoolean, getModelSetAuxiliaryInfoInt, getModelSetName, getModelSetProperties, getModelSetProperty, getModelSymmetryCount, getModelSymmetryList, getModelTitle, getMoleculeBitSet, getMoleculeBitSet, getMoleculeCountInModel, getMoleculeIndex, getMoleculeInfo, getNotionalUnitcell, getPdbAtomData, getPdbData, getPDBHeader, getPolymerLeadMidPoints, getPolymerPointsAndVectors, getProteinStructureState, getSequenceBits, getSpaceGroupInfoText, getSymmetryInfoAsString, getSymmetryInfoAsString, getSymTemp, getTrajectoryCount, getTrajectoryIndex, getUnitCell, getUnitCellInfoText, getUnitCellOffset, getWithinAtomSetIterator, getWithinModelIterator, hasCalculatedHBonds, initializeBspf, initializeBspt, invertSelected, isJmolDataFrame, isTrajectory, isTrajectory, merge, modelFileNumberFromFloat, modelHasVibrationVectors, recalculateLeadMidpointsAndWingVectors, rotateAtoms, saveModelOrientation, selectDisplayedTrajectories, setAtomCoord, setAtomCoordRelative, setAtomProperty, setBoundBox, setConformation, setConformation, setCrystallographicDefaults, setFrameTitle, setJmolDataFrame, setModelAuxiliaryInfo, setModelSetAuxiliaryInfo, setModelSetProperties, setProteinType, setRotationRadius, setUnitCellOffset, setUnitCellOffset, toCartesian, toFractional, toUnitCell |
Methods inherited from class org.jmol.modelset.BondCollection |
addHydrogenBond, assignAromaticBonds, assignAromaticBonds, bondAtoms, bondMutually, checkValencesAndBond, 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, 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 |
mergeModelSet
private ModelLoader mergeModelSet
merging
private boolean merging
jmolData
private java.lang.String jmolData
specialAtomIndexes
private final int[] specialAtomIndexes
group3Lists
private java.lang.String[] group3Lists
group3Counts
private int[][] group3Counts
someModelsHaveUnitcells
private boolean someModelsHaveUnitcells
isTrajectory
private boolean isTrajectory
fileHeader
private java.lang.String fileHeader
ATOM_GROWTH_INCREMENT
private static final int ATOM_GROWTH_INCREMENT
- See Also:
- Constant Field Values
htAtomMap
private final java.util.Hashtable htAtomMap
defaultGroupCount
private static final int defaultGroupCount
- See Also:
- Constant Field Values
chainOf
private Chain[] chainOf
group3Of
private java.lang.String[] group3Of
seqcodes
private int[] seqcodes
firstAtomIndexes
private int[] firstAtomIndexes
currentModelIndex
private int currentModelIndex
currentModel
private Model currentModel
currentChainID
private char currentChainID
currentChain
private Chain currentChain
currentGroupSequenceNumber
private int currentGroupSequenceNumber
currentGroupInsertionCode
private char currentGroupInsertionCode
currentGroup3
private java.lang.String currentGroup3
nullGroup
Group nullGroup
baseModelIndex
private int baseModelIndex
baseModelCount
private int baseModelCount
baseAtomIndex
private int baseAtomIndex
baseTrajectoryCount
private int baseTrajectoryCount
appendNew
private boolean appendNew
adapterModelCount
private int adapterModelCount
adapterTrajectoryCount
private int adapterTrajectoryCount
htAtom
private static java.util.Hashtable htAtom
ModelLoader
public ModelLoader(Viewer viewer,
java.lang.String name)
ModelLoader
public ModelLoader(Viewer viewer,
JmolAdapter adapter,
java.lang.Object clientFile,
ModelLoader mergeModelSet,
java.lang.String modelSetName)
initializeInfo
private void initializeInfo(java.lang.String name,
int nAtoms,
java.util.Properties properties,
java.util.Hashtable info)
initializeBuild
private void initializeBuild(int atomCountEstimate)
initializeGroupBuild
private void initializeGroupBuild()
- also from calculateStructures
initializeModelSet
private void initializeModelSet(JmolAdapter adapter,
java.lang.Object clientFile)
releaseModelSet
protected void releaseModelSet()
- Overrides:
releaseModelSet
in class ModelSet
mergeModelArrays
private void mergeModelArrays()
initializeAtomBondModelCounts
private void initializeAtomBondModelCounts()
initializeMerge
private void initializeMerge()
iterateOverAllNewModels
private void iterateOverAllNewModels(JmolAdapter adapter,
java.lang.Object clientFile)
setModelNameNumberProperties
boolean setModelNameNumberProperties(int modelIndex,
int trajectoryBaseIndex,
java.lang.String modelName,
int modelNumber,
java.util.Properties modelProperties,
java.util.Hashtable modelAuxiliaryInfo,
boolean isPDB,
java.lang.String jmolData)
finalizeModels
private void finalizeModels(int baseModelCount)
- Model numbers are considerably more complicated in Jmol 11.
int modelNumber
The adapter gives us a modelNumber, but that is not necessarily
what the user accesses. If a single files is loaded this is:
a) single file context:
1) the sequential number of the model in the file , or
2) if a PDB file and "MODEL" record is present, that model number
b) multifile context:
always 1000000 * (fileIndex + 1) + (modelIndexInFile + 1)
int fileIndex
The 0-based reference to the file containing this model. Used
when doing "select model=3.2" in a multifile context
int modelFileNumber
An integer coding both the file and the model:
file * 1000000 + modelInFile (1-based)
Used all over the place. Note that if there is only one file,
then modelFileNumber < 1000000.
String modelNumberDotted
A number the user can use "1.3"
String modelNumberForAtomLabel
Either the dotted number or the PDB MODEL number, if there is only one file
- Parameters:
baseModelCount
-
iterateOverAllNewAtoms
private void iterateOverAllNewAtoms(JmolAdapter adapter,
java.lang.Object clientFile)
addAtom
private void addAtom(int modelIndex,
java.util.BitSet atomSymmetry,
int atomSite,
java.lang.Object atomUid,
short atomicAndIsotopeNumber,
java.lang.String atomName,
int size,
int formalCharge,
float partialCharge,
java.lang.Object[] ellipsoid,
int occupancy,
float bfactor,
float x,
float y,
float z,
boolean isHetero,
int atomSerial,
char chainID,
java.lang.String group3,
int groupSequenceNumber,
char groupInsertionCode,
float vectorX,
float vectorY,
float vectorZ,
char alternateLocationID,
java.lang.Object clientAtomReference,
float radius)
lookupSpecialAtomID
private static byte lookupSpecialAtomID(java.lang.String atomName)
checkNewGroup
private void checkNewGroup(int atomIndex,
int modelIndex,
char chainID,
java.lang.String group3,
int groupSequenceNumber,
char groupInsertionCode)
getOrAllocateChain
private Chain getOrAllocateChain(Model model,
char chainID)
growAtomArrays
private void growAtomArrays(int byHowMuch)
iterateOverAllNewBonds
private void iterateOverAllNewBonds(JmolAdapter adapter,
java.lang.Object clientFile)
bondAtoms
private void bondAtoms(java.lang.Object atomUid1,
java.lang.Object atomUid2,
short order)
iterateOverAllNewStructures
private void iterateOverAllNewStructures(JmolAdapter adapter,
java.lang.Object clientFile)
- Pull in all spans of helix, etc. in the file(s)
We do turn first, because sometimes a group is defined
twice, and this way it gets marked as helix or sheet
if it is both one of those and turn.
- Parameters:
adapter
- clientFile
-
defineStructure
protected void defineStructure(int modelIndex,
java.lang.String structureType,
char startChainID,
int startSequenceNumber,
char startInsertionCode,
char endChainID,
int endSequenceNumber,
char endInsertionCode)
- Overrides:
defineStructure
in class ModelCollection
initializeUnitCellAndSymmetry
private void initializeUnitCellAndSymmetry()
initializeBonding
private void initializeBonding()
finalizeGroupBuild
private void finalizeGroupBuild()
distinguishAndPropagateGroup
private void distinguishAndPropagateGroup(int groupIndex,
Chain chain,
java.lang.String group3,
int seqcode,
int firstAtomIndex,
int maxAtomIndex)
addGroup
private void addGroup(Chain chain,
Group group)
countGroup
private void countGroup(int modelIndex,
java.lang.String code,
java.lang.String group3)
freeze
private void freeze()
setAtomNamesAndNumbers
private void setAtomNamesAndNumbers()
findElementsPresent
private void findElementsPresent()
finalizeShapes
private void finalizeShapes()