org.jmol.modelset

Class ModelLoader

public final class ModelLoader extends ModelSet

Field Summary
static intATOM_GROWTH_INCREMENT
intadapterModelCount
intadapterTrajectoryCount
booleanappendNew
intbaseAtomIndex
intbaseBondIndex
intbaseModelCount
intbaseModelIndex
intbaseTrajectoryCount
Chain[]chainOf
ChaincurrentChain
charcurrentChainID
StringcurrentGroup3
charcurrentGroupInsertionCode
intcurrentGroupSequenceNumber
ModelcurrentModel
intcurrentModelIndex
static intdefaultGroupCount
StringfileHeader
int[]firstAtomIndexes
int[][]group3Counts
String[]group3Lists
String[]group3Of
static HashtablehtAtom
HashtablehtAtomMap
booleanisMultiFile
booleanisTrajectory
StringjmolData
ModelLoadermergeModelSet
booleanmerging
GroupnullGroup
int[]seqcodes
booleansomeModelsHaveUnitcells
int[]specialAtomIndexes
Constructor Summary
ModelLoader(Viewer viewer, String name)
ModelLoader(Viewer viewer, JmolAdapter adapter, Object clientFile, ModelLoader mergeModelSet, String modelSetName)
Method Summary
voidaddAtom(int modelIndex, BitSet atomSymmetry, int atomSite, Object atomUid, short atomicAndIsotopeNumber, String atomName, int size, int formalCharge, float partialCharge, Object[] ellipsoid, int occupancy, float bfactor, float x, float y, float z, boolean isHetero, int atomSerial, char chainID, String group3, int groupSequenceNumber, char groupInsertionCode, float vectorX, float vectorY, float vectorZ, char alternateLocationID, Object clientAtomReference, float radius)
voidaddGroup(Chain chain, Group group)
voidbondAtoms(Object atomUid1, Object atomUid2, short order)
voidcheckNewGroup(int atomIndex, int modelIndex, char chainID, String group3, int groupSequenceNumber, char groupInsertionCode)
voidcountGroup(int modelIndex, String code, String group3)
protected voiddefineStructure(int modelIndex, String structureType, char startChainID, int startSequenceNumber, char startInsertionCode, char endChainID, int endSequenceNumber, char endInsertionCode)
voiddistinguishAndPropagateGroup(int groupIndex, Chain chain, String group3, int seqcode, int firstAtomIndex, int maxAtomIndex)
voidfinalizeGroupBuild()
voidfinalizeModels(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.
voidfinalizeShapes()
voidfindElementsPresent()
voidfreeze()
ChaingetOrAllocateChain(Model model, char chainID)
voidgrowAtomArrays(int byHowMuch)
voidinitializeAtomBondModelCounts()
voidinitializeBonding()
voidinitializeBuild(int atomCountEstimate)
voidinitializeGroupBuild()
also from calculateStructures
voidinitializeInfo(String name, int nAtoms, Properties properties, Hashtable info)
voidinitializeMerge()
voidinitializeModelSet(JmolAdapter adapter, Object clientFile)
voidinitializeUnitCellAndSymmetry()
voiditerateOverAllNewAtoms(JmolAdapter adapter, Object clientFile)
voiditerateOverAllNewBonds(JmolAdapter adapter, Object clientFile)
voiditerateOverAllNewModels(JmolAdapter adapter, Object clientFile)
voiditerateOverAllNewStructures(JmolAdapter adapter, 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.
static bytelookupSpecialAtomID(String atomName)
voidmergeModelArrays()
protected voidreleaseModelSet()
voidsetAtomNamesAndNumbers()
booleansetModelNameNumberProperties(int modelIndex, int trajectoryBaseIndex, String modelName, int modelNumber, Properties modelProperties, Hashtable modelAuxiliaryInfo, boolean isPDB, String jmolData)

Field Detail

ATOM_GROWTH_INCREMENT

private static final int ATOM_GROWTH_INCREMENT

adapterModelCount

private int adapterModelCount

adapterTrajectoryCount

private int adapterTrajectoryCount

appendNew

private boolean appendNew

baseAtomIndex

private int baseAtomIndex

baseBondIndex

private int baseBondIndex

baseModelCount

private int baseModelCount

baseModelIndex

private int baseModelIndex

baseTrajectoryCount

private int baseTrajectoryCount

chainOf

private Chain[] chainOf

currentChain

private Chain currentChain

currentChainID

private char currentChainID

currentGroup3

private String currentGroup3

currentGroupInsertionCode

private char currentGroupInsertionCode

currentGroupSequenceNumber

private int currentGroupSequenceNumber

currentModel

private Model currentModel

currentModelIndex

private int currentModelIndex

defaultGroupCount

private static final int defaultGroupCount

fileHeader

private String fileHeader

firstAtomIndexes

private int[] firstAtomIndexes

group3Counts

private int[][] group3Counts

group3Lists

private String[] group3Lists

group3Of

private String[] group3Of

htAtom

private static Hashtable htAtom

htAtomMap

private final Hashtable htAtomMap

isMultiFile

private boolean isMultiFile

isTrajectory

private boolean isTrajectory

jmolData

private String jmolData

mergeModelSet

private ModelLoader mergeModelSet

merging

private boolean merging

nullGroup

Group nullGroup

seqcodes

private int[] seqcodes

someModelsHaveUnitcells

private boolean someModelsHaveUnitcells

specialAtomIndexes

private final int[] specialAtomIndexes

Constructor Detail

ModelLoader

public ModelLoader(Viewer viewer, String name)

ModelLoader

public ModelLoader(Viewer viewer, JmolAdapter adapter, Object clientFile, ModelLoader mergeModelSet, String modelSetName)

Method Detail

addAtom

private void addAtom(int modelIndex, BitSet atomSymmetry, int atomSite, Object atomUid, short atomicAndIsotopeNumber, String atomName, int size, int formalCharge, float partialCharge, Object[] ellipsoid, int occupancy, float bfactor, float x, float y, float z, boolean isHetero, int atomSerial, char chainID, String group3, int groupSequenceNumber, char groupInsertionCode, float vectorX, float vectorY, float vectorZ, char alternateLocationID, Object clientAtomReference, float radius)

addGroup

private void addGroup(Chain chain, Group group)

bondAtoms

private void bondAtoms(Object atomUid1, Object atomUid2, short order)

checkNewGroup

private void checkNewGroup(int atomIndex, int modelIndex, char chainID, String group3, int groupSequenceNumber, char groupInsertionCode)

countGroup

private void countGroup(int modelIndex, String code, String group3)

defineStructure

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

distinguishAndPropagateGroup

private void distinguishAndPropagateGroup(int groupIndex, Chain chain, String group3, int seqcode, int firstAtomIndex, int maxAtomIndex)

finalizeGroupBuild

private void finalizeGroupBuild()

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

finalizeShapes

private void finalizeShapes()

findElementsPresent

private void findElementsPresent()

freeze

private void freeze()

getOrAllocateChain

private Chain getOrAllocateChain(Model model, char chainID)

growAtomArrays

private void growAtomArrays(int byHowMuch)

initializeAtomBondModelCounts

private void initializeAtomBondModelCounts()

initializeBonding

private void initializeBonding()

initializeBuild

private void initializeBuild(int atomCountEstimate)

initializeGroupBuild

private void initializeGroupBuild()
also from calculateStructures

initializeInfo

private void initializeInfo(String name, int nAtoms, Properties properties, Hashtable info)

initializeMerge

private void initializeMerge()

initializeModelSet

private void initializeModelSet(JmolAdapter adapter, Object clientFile)

initializeUnitCellAndSymmetry

private void initializeUnitCellAndSymmetry()

iterateOverAllNewAtoms

private void iterateOverAllNewAtoms(JmolAdapter adapter, Object clientFile)

iterateOverAllNewBonds

private void iterateOverAllNewBonds(JmolAdapter adapter, Object clientFile)

iterateOverAllNewModels

private void iterateOverAllNewModels(JmolAdapter adapter, Object clientFile)

iterateOverAllNewStructures

private void iterateOverAllNewStructures(JmolAdapter adapter, 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

lookupSpecialAtomID

private static byte lookupSpecialAtomID(String atomName)

mergeModelArrays

private void mergeModelArrays()

releaseModelSet

protected void releaseModelSet()

setAtomNamesAndNumbers

private void setAtomNamesAndNumbers()

setModelNameNumberProperties

boolean setModelNameNumberProperties(int modelIndex, int trajectoryBaseIndex, String modelName, int modelNumber, Properties modelProperties, Hashtable modelAuxiliaryInfo, boolean isPDB, String jmolData)