Package org.jmol.adapter.readers.cif
Class CifReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.cif.CifReader
- All Implemented Interfaces:
javajs.api.GenericLineReader
- Direct Known Subclasses:
Cif2Reader
,MMCifReader
A true line-free CIF file reader for CIF files.
Subclasses of CIF -- mmCIF/PDBx (pre-initialized) and msCIF (initialized
here)
Note that a file can be a PDB file without being
Added nonstandard mCIF (magnetic_ tags) 5/2/2014 note that PRELIM keys can be
removed at some later time
http://www.iucr.org/iucr-top/cif/ http://www.iucr.org/iucr-top/cif/standard/cifstd5.html
- Author:
- Miguel, Egon, and Bob (hansonr@stolaf.edu) symmetry added by Bob Hanson: setSpaceGroupName() setSymmetryOperator() setUnitCellItem() setFractionalCoordinates() setAtomCoord() applySymmetryAndSetTrajectory()
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface
Allows checking specific blocks e.g. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
private static final byte
private boolean
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private String
private static final byte
private static final byte
private static final byte
private static final byte
private static final String[]
private float[]
private Atom[]
private static final String[]
private String
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private javajs.util.Lst<Object[]>
private javajs.util.BS
private javajs.util.BS[]
private javajs.util.BS
private javajs.util.BS
private javajs.util.BS[]
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
protected static final String
protected static final String
private String
(package private) javajs.api.GenericCifDataParser
private static final byte
private static final String[]
(package private) int[]
private int
private int
(package private) String
private static final byte
private static final byte
private String
private static final byte
protected static final String
private static final String
(package private) String
private boolean
private int
protected char
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final String[]
private static final byte
private boolean
(package private) boolean
private boolean
(package private) boolean
protected boolean
private static final byte
private boolean
protected boolean
protected boolean
private boolean
protected boolean
protected boolean
(package private) String
(package private) String
(package private) int[]
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private char
protected String
private String
private String
private javajs.util.Lst<float[]>
private javajs.util.Lst<String>
protected int
private static final byte
private MSCifParser
private boolean
private String
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
protected int
protected int
private int
protected static final byte
private static final byte
protected String
private final javajs.util.P3
private boolean
private static final byte
protected boolean
(package private) CifReader.Parser
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
private static final String[]
javajs.util.Lst<String>
private static final byte
protected String
private String
private String
private int
private static final String
private static final String[]
private static final byte
private static final byte
protected boolean
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addedData, addedDataKey, addVibrations, allow_a_len_1, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, baseBondIndex, binaryDoc, bsFilter, bsModels, calculationType, CELL_TYPE_CONVENTIONAL, CELL_TYPE_PRIMITIVE, centroidPacked, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCentroidUnitCell, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterAllHetero, filterCased, filterHetero, fixJavaFloat, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, is2D, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isTrajectory, latticeCells, latticeScaling, latticeType, line, lstNCS, matUnitCellOrientation, merging, modDim, modelNumber, ms, mustFinalizeModelSet, next, noHydrogens, noPack, optimize2D, out, packingError, paramsCentroid, paramsLattice, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, slabXY, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, ucItems, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addCellType
(String type, String data, boolean isFrom) (magnetic CIF or LOAD ...protected boolean
addCifAtom
(Atom atom, String id, String componentId, String strChain) protected void
private void
private void
addModelTitle
(String key) private void
addMore()
private void
addNewBond
(int i, int j, int order) add the bond and mark it for molecular processingvoid
protected boolean
checkAllFieldsPresent
(String[] keys, int lastKey, boolean critical) private boolean
checkBondDistance
(Atom a, Atom b, float distance, float dx) protected int
checkPDBModelField
(int modelField, int currentModelNo) protected boolean
private boolean
continueWith
(String key) private boolean
createBonds
(boolean doInit) Use the site bitset to check for atoms that are within +/-dx Angstroms of the specified distances in GEOM_BOND where dx is determined by the uncertainty (dx) in the record.private void
disableField
(int fieldIndex) used for turning off fractional or nonfractional coord.void
protected int
fieldProperty
(int i) protected boolean
filterCIFAtom
(Atom atom, String componentId) protected boolean
protected void
optional reader-specific method run first.protected void
finalizeSubclassSymmetry
(boolean haveSymmetry) private void
fixAtomForBonding
(javajs.util.P3 pt, int i) private Atom
From GEOM_BOND, check first for an exact match.int
getBondOrder
(String field) protected javajs.api.GenericCifDataParser
private boolean
getData()
protected String
getField
(byte type) private MSCifParser
private CifReader.Parser
private MSCifParser
void
protected void
protected boolean
protected void
newModel
(int modelNo) protected void
(package private) void
parseLoopParameters
(String[] fields) sets up arrays and variables for tokenizer.getData()(package private) void
parseLoopParametersFor
(String key, String[] fields) (package private) boolean
processAtomSiteLoopBlock
(boolean isLigand) reads atom data in any orderprivate void
reads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.private void
unit cell parameters -- two options, so we use MOD 6private String
processChemicalInfo
(String type) reads some of the more interesting info into specific atomSetAuxiliaryInfo elementsprivate void
private void
initialize a new atom setprivate void
reads bond data -- N_ijk symmetry business is ignored, so we only indicate bonds within the unit cell to just the original set of atoms.protected void
processes loop_ blocks of interest or skips the dataprotected boolean
processSubclassAtom
(Atom atom, String assemblyId, String strChain) protected void
protected boolean
private void
retrieves symmetry operationsprivate void
done by AtomSetCollectionReaderprivate void
(magnetic CIF only) Process the unit cell transformation as indicated by _parent_space_group or _space_group_magn (or older _magentic_space_group)private void
the PDB transformation matrix cartesian --> fractionalprivate boolean
private void
private void
(1) If GEOM_BOND records are present, we (a) use them to generate bonds (b) add H atoms to bonds if necessary (c) turn off autoBonding ("hasBonds") (2) If MOLECULAR, then we (a) use {1 1 1} if lattice is not defined (b) use asc.bonds[] to construct a preliminary molecule and connect as we go (c) check symmetry for connections to molecule in any one of the 27 3x3 adjacent cells (d) move those atoms and their connected branch set (e) iterate as necessary to get all atoms desired (f) delete unselected atoms (g) set all coordinates as Cartesians (h) remove all unit cell informationprivate void
iteratively run through connected atoms, adding them to the setprivate void
private boolean
protected void
skipLoop
(boolean doReport) Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymTrajASCR, checkAndRemoveFilterKey, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLine, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, fill3x3, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFilterWithCase, getFortranFormatLengths, getInterface, getNewSymmetry, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, parseToken, parseTokenNext, parseTokenRange, parseTokenStr, processBinaryDocument, processDOM, rd, read3Vectors, readDataObject, readLines, readNextLine, rejectAtomName, RL, set2D, setAtomCoord, setAtomCoordScaled, setAtomCoordTokens, setAtomCoordXYZ, setChainID, setElementAndIsotope, setFilter, setFilterAtomTypeStr, setFractionalCoordinates, setIsPDB, setLoadNote, setModelPDB, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR
-
Field Details
-
CELL_TYPE_MAGNETIC_PARENT
- See Also:
-
CELL_TYPE_MAGNETIC_STANDARD
- See Also:
-
subParser
CifReader.Parser subParser -
titleRecords
- See Also:
-
modr
-
cifParser
javajs.api.GenericCifDataParser cifParser -
isAFLOW
private boolean isAFLOW -
filterAssembly
private boolean filterAssembly -
allowRotations
private boolean allowRotations -
readIdeal
private boolean readIdeal -
configurationPtr
private int configurationPtr -
useAuthorChainID
protected boolean useAuthorChainID -
thisDataSetName
-
lastDataSetName
-
chemicalName
-
thisStructuralFormula
-
thisFormula
-
iHaveDesiredModel
protected boolean iHaveDesiredModel -
isMMCIF
protected boolean isMMCIF -
isLigand
protected boolean isLigand -
isMagCIF
protected boolean isMagCIF -
haveHAtoms
boolean haveHAtoms -
molecularType
-
lastAltLoc
private char lastAltLoc -
haveAromatic
private boolean haveAromatic -
conformationIndex
private int conformationIndex -
nMolecular
private int nMolecular -
appendedData
-
skipping
protected boolean skipping -
nAtoms
protected int nAtoms -
ac
protected int ac -
auditBlockCode
-
lastSpaceGroupName
-
modulated
private boolean modulated -
isCourseGrained
protected boolean isCourseGrained -
haveCellWaveVector
boolean haveCellWaveVector -
htGroup1
-
nAtoms0
protected int nAtoms0 -
titleAtomSet
private int titleAtomSet -
htCellTypes
-
modelMap
-
haveGlobalDummy
private boolean haveGlobalDummy -
htAudit
-
symops
-
pdbID
-
TransformFields
-
key
String key -
key0
String key0 -
data
String data -
isLoop
private boolean isLoop -
col2key
int[] col2key -
key2col
int[] key2col -
field
String field -
firstChar
protected char firstChar -
htOxStates
-
bondTypes
-
disorderAssembly
-
lastDisorderAssembly
-
lattvecs
private javajs.util.Lst<float[]> lattvecs -
magCenterings
-
maxSerial
protected int maxSerial -
ATOM_TYPE_SYMBOL
private static final byte ATOM_TYPE_SYMBOL- See Also:
-
ATOM_TYPE_OXIDATION_NUMBER
private static final byte ATOM_TYPE_OXIDATION_NUMBER- See Also:
-
ATOM_TYPE_RADIUS_BOND
private static final byte ATOM_TYPE_RADIUS_BOND- See Also:
-
atomTypeFields
-
NONE
protected static final byte NONE- See Also:
-
TYPE_SYMBOL
private static final byte TYPE_SYMBOL- See Also:
-
LABEL
private static final byte LABEL- See Also:
-
AUTH_ATOM_ID
private static final byte AUTH_ATOM_ID- See Also:
-
FRACT_X
private static final byte FRACT_X- See Also:
-
FRACT_Y
private static final byte FRACT_Y- See Also:
-
FRACT_Z
private static final byte FRACT_Z- See Also:
-
CARTN_X
private static final byte CARTN_X- See Also:
-
CARTN_Y
private static final byte CARTN_Y- See Also:
-
CARTN_Z
private static final byte CARTN_Z- See Also:
-
OCCUPANCY
private static final byte OCCUPANCY- See Also:
-
B_ISO
private static final byte B_ISO- See Also:
-
AUTH_COMP_ID
private static final byte AUTH_COMP_ID- See Also:
-
AUTH_ASYM_ID
private static final byte AUTH_ASYM_ID- See Also:
-
AUTH_SEQ_ID
private static final byte AUTH_SEQ_ID- See Also:
-
INS_CODE
private static final byte INS_CODE- See Also:
-
ALT_ID
private static final byte ALT_ID- See Also:
-
GROUP_PDB
private static final byte GROUP_PDB- See Also:
-
MODEL_NO
private static final byte MODEL_NO- See Also:
-
DUMMY_ATOM
private static final byte DUMMY_ATOM- See Also:
-
DISORDER_GROUP
private static final byte DISORDER_GROUP- See Also:
-
ANISO_LABEL
private static final byte ANISO_LABEL- See Also:
-
ANISO_MMCIF_ID
private static final byte ANISO_MMCIF_ID- See Also:
-
ANISO_U11
private static final byte ANISO_U11- See Also:
-
ANISO_U22
private static final byte ANISO_U22- See Also:
-
ANISO_U33
private static final byte ANISO_U33- See Also:
-
ANISO_U12
private static final byte ANISO_U12- See Also:
-
ANISO_U13
private static final byte ANISO_U13- See Also:
-
ANISO_U23
private static final byte ANISO_U23- See Also:
-
ANISO_MMCIF_U11
private static final byte ANISO_MMCIF_U11- See Also:
-
ANISO_MMCIF_U22
private static final byte ANISO_MMCIF_U22- See Also:
-
ANISO_MMCIF_U33
private static final byte ANISO_MMCIF_U33- See Also:
-
ANISO_MMCIF_U12
private static final byte ANISO_MMCIF_U12- See Also:
-
ANISO_MMCIF_U13
private static final byte ANISO_MMCIF_U13- See Also:
-
ANISO_MMCIF_U23
private static final byte ANISO_MMCIF_U23- See Also:
-
U_ISO_OR_EQUIV
private static final byte U_ISO_OR_EQUIV- See Also:
-
ANISO_B11
private static final byte ANISO_B11- See Also:
-
ANISO_B22
private static final byte ANISO_B22- See Also:
-
ANISO_B33
private static final byte ANISO_B33- See Also:
-
ANISO_B12
private static final byte ANISO_B12- See Also:
-
ANISO_B13
private static final byte ANISO_B13- See Also:
-
ANISO_B23
private static final byte ANISO_B23- See Also:
-
ANISO_BETA_11
private static final byte ANISO_BETA_11- See Also:
-
ANISO_BETA_22
private static final byte ANISO_BETA_22- See Also:
-
ANISO_BETA_33
private static final byte ANISO_BETA_33- See Also:
-
ANISO_BETA_12
private static final byte ANISO_BETA_12- See Also:
-
ANISO_BETA_13
private static final byte ANISO_BETA_13- See Also:
-
ANISO_BETA_23
private static final byte ANISO_BETA_23- See Also:
-
ADP_TYPE
private static final byte ADP_TYPE- See Also:
-
CC_COMP_ID
private static final byte CC_COMP_ID- See Also:
-
CC_ATOM_ID
private static final byte CC_ATOM_ID- See Also:
-
CC_ATOM_SYM
private static final byte CC_ATOM_SYM- See Also:
-
CC_ATOM_CHARGE
private static final byte CC_ATOM_CHARGE- See Also:
-
CC_ATOM_X
private static final byte CC_ATOM_X- See Also:
-
CC_ATOM_Y
private static final byte CC_ATOM_Y- See Also:
-
CC_ATOM_Z
private static final byte CC_ATOM_Z- See Also:
-
CC_ATOM_X_IDEAL
private static final byte CC_ATOM_X_IDEAL- See Also:
-
CC_ATOM_Y_IDEAL
private static final byte CC_ATOM_Y_IDEAL- See Also:
-
CC_ATOM_Z_IDEAL
private static final byte CC_ATOM_Z_IDEAL- See Also:
-
DISORDER_ASSEMBLY
private static final byte DISORDER_ASSEMBLY- See Also:
-
LABEL_ASYM_ID
private static final byte LABEL_ASYM_ID- See Also:
-
SUBSYS_ID
private static final byte SUBSYS_ID- See Also:
-
SITE_MULT
private static final byte SITE_MULT- See Also:
-
THERMAL_TYPE
private static final byte THERMAL_TYPE- See Also:
-
MOMENT_LABEL
private static final byte MOMENT_LABEL- See Also:
-
MOMENT_PRELIM_X
private static final byte MOMENT_PRELIM_X- See Also:
-
MOMENT_PRELIM_Y
private static final byte MOMENT_PRELIM_Y- See Also:
-
MOMENT_PRELIM_Z
private static final byte MOMENT_PRELIM_Z- See Also:
-
MOMENT_X
private static final byte MOMENT_X- See Also:
-
MOMENT_Y
private static final byte MOMENT_Y- See Also:
-
MOMENT_Z
private static final byte MOMENT_Z- See Also:
-
ATOM_ID
private static final byte ATOM_ID- See Also:
-
LABEL_SEQ_ID
private static final byte LABEL_SEQ_ID- See Also:
-
LABEL_COMP_ID
private static final byte LABEL_COMP_ID- See Also:
-
LABEL_ATOM_ID
private static final byte LABEL_ATOM_ID- See Also:
-
FAMILY_ATOM
- See Also:
-
atomFields
-
CITATION_TITLE
private static final byte CITATION_TITLE- See Also:
-
citationFields
-
SYM_XYZ
private static final byte SYM_XYZ- See Also:
-
SYM_MAGN_XYZ
private static final byte SYM_MAGN_XYZ- See Also:
-
SYM_SSG_ALG
private static final byte SYM_SSG_ALG- See Also:
-
SYM_MAGN_SSG_ALG
private static final byte SYM_MAGN_SSG_ALG- See Also:
-
SYM_EQ_XYZ
private static final byte SYM_EQ_XYZ- See Also:
-
SYM_SSG_EQ_XYZ
private static final byte SYM_SSG_EQ_XYZ- See Also:
-
SYM_MAGN_REV
private static final byte SYM_MAGN_REV- See Also:
-
SYM_MAGN_SSG_REV
private static final byte SYM_MAGN_SSG_REV- See Also:
-
SYM_MAGN_REV_PRELIM
private static final byte SYM_MAGN_REV_PRELIM- See Also:
-
SYM_MAGN_CENTERING
private static final byte SYM_MAGN_CENTERING- See Also:
-
SYM_MAGN_SSG_CENTERING
private static final byte SYM_MAGN_SSG_CENTERING- See Also:
-
SYM_MAGN_SSG_CENT_XYZ
private static final byte SYM_MAGN_SSG_CENT_XYZ- See Also:
-
FAMILY_SGOP
- See Also:
-
symmetryOperationsFields
-
GEOM_BOND_ATOM_SITE_LABEL_1
private static final byte GEOM_BOND_ATOM_SITE_LABEL_1- See Also:
-
GEOM_BOND_ATOM_SITE_LABEL_2
private static final byte GEOM_BOND_ATOM_SITE_LABEL_2- See Also:
-
GEOM_BOND_DISTANCE
private static final byte GEOM_BOND_DISTANCE- See Also:
-
CCDC_GEOM_BOND_TYPE
private static final byte CCDC_GEOM_BOND_TYPE- See Also:
-
geomBondFields
-
atomRadius
private float[] atomRadius -
bsConnected
private javajs.util.BS[] bsConnected -
bsSets
private javajs.util.BS[] bsSets -
ptOffset
private final javajs.util.P3 ptOffset -
bsMolecule
private javajs.util.BS bsMolecule -
bsExclude
private javajs.util.BS bsExclude -
firstAtom
private int firstAtom -
atoms
-
bsBondDuplicates
private javajs.util.BS bsBondDuplicates
-
-
Constructor Details
-
CifReader
public CifReader()
-
-
Method Details
-
initializeReader
- Overrides:
initializeReader
in classAtomSetCollectionReader
- Throws:
Exception
-
initSubclass
protected void initSubclass() -
readCifData
- Throws:
Exception
-
continueWith
-
getCifDataParser
protected javajs.api.GenericCifDataParser getCifDataParser() -
readAllData
- Throws:
Exception
-
skipKey
-
addModelTitle
-
processSubclassEntry
- Throws:
Exception
-
processUnitCellTransform
private void processUnitCellTransform()(magnetic CIF only) Process the unit cell transformation as indicated by _parent_space_group or _space_group_magn (or older _magentic_space_group) -
addCellType
(magnetic CIF or LOAD ... SUPERCELL) Add a cell type such as "conventional"- Parameters:
type
-data
- if starting with "!" then "opposite of"isFrom
- TRUE for SUPERCELL or "_from_parent" or "child_transform"
-
getModulationReader
- Throws:
Exception
-
initializeMSCIF
- Throws:
Exception
-
newModel
- Throws:
Exception
-
finalizeSubclassReader
Description copied from class:AtomSetCollectionReader
optional reader-specific method run first.- Overrides:
finalizeSubclassReader
in classAtomSetCollectionReader
- Throws:
Exception
-
setOxidationStates
private void setOxidationStates() -
addHeader
protected void addHeader() -
finalizeSubclass
- Throws:
Exception
-
doPreSymmetry
- Overrides:
doPreSymmetry
in classAtomSetCollectionReader
- Throws:
Exception
-
applySymmetryAndSetTrajectory
- Overrides:
applySymmetryAndSetTrajectory
in classAtomSetCollectionReader
- Throws:
Exception
-
finalizeSubclassSymmetry
- Overrides:
finalizeSubclassSymmetry
in classAtomSetCollectionReader
- Throws:
Exception
-
processDataParameter
private void processDataParameter()initialize a new atom set -
nextAtomSet
protected void nextAtomSet() -
processChemicalInfo
reads some of the more interesting info into specific atomSetAuxiliaryInfo elements- Parameters:
type
- "name" "formula" etc.- Returns:
- data
- Throws:
Exception
-
processSymmetrySpaceGroupName
done by AtomSetCollectionReader- Throws:
Exception
-
addLatticeVectors
private void addLatticeVectors() -
processCellParameter
unit cell parameters -- two options, so we use MOD 6- Throws:
Exception
-
processUnitCellTransformMatrix
the PDB transformation matrix cartesian --> fractional- Throws:
Exception
-
getData
- Returns:
- TRUE if data, even if ''; FALSE if '.' or '?' or eof.
- Throws:
Exception
-
processLoopBlock
processes loop_ blocks of interest or skips the data- Throws:
Exception
-
processSubclassLoopBlock
- Throws:
Exception
-
getTopologyParser
-
addMore
private void addMore() -
fieldProperty
protected int fieldProperty(int i) -
parseLoopParameters
sets up arrays and variables for tokenizer.getData()- Parameters:
fields
-- Throws:
Exception
-
parseLoopParametersFor
- Throws:
Exception
-
disableField
private void disableField(int fieldIndex) used for turning off fractional or nonfractional coord.- Parameters:
fieldIndex
-
-
processAtomTypeLoopBlock
reads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.- Throws:
Exception
-
processAtomSiteLoopBlock
reads atom data in any order- Parameters:
isLigand
-- Returns:
- TRUE if successful; FALS if EOF encountered
- Throws:
Exception
-
addCifAtom
-
checkPDBModelField
- Parameters:
modelField
-currentModelNo
-- Returns:
- new currentModelNo
- Throws:
Exception
-
processSubclassAtom
- Parameters:
atom
-assemblyId
-strChain
-- Returns:
- true if valid atom
-
filterCIFAtom
-
processCitationListBlock
- Throws:
Exception
-
processSymmetryOperationsLoopBlock
retrieves symmetry operations- Throws:
Exception
-
getBondOrder
-
processGeomBondLoopBlock
reads bond data -- N_ijk symmetry business is ignored, so we only indicate bonds within the unit cell to just the original set of atoms. "connect" script or "set forceAutoBond" will override these values, but see below.- Throws:
Exception
-
getAtomFromNameCheckCase
From GEOM_BOND, check first for an exact match. If that is not found, add all-caps keys and try again with all upper case. This should solve the problem of GEOM_BOND_* using the wrong case while still preserving functionality when H15a and H15A are both present (COD 7700953 https://www.crystallography.net/cod/7700953.html)- Parameters:
name
-- Returns:
- atom
-
setBondingAndMolecules
private void setBondingAndMolecules()(1) If GEOM_BOND records are present, we (a) use them to generate bonds (b) add H atoms to bonds if necessary (c) turn off autoBonding ("hasBonds") (2) If MOLECULAR, then we (a) use {1 1 1} if lattice is not defined (b) use asc.bonds[] to construct a preliminary molecule and connect as we go (c) check symmetry for connections to molecule in any one of the 27 3x3 adjacent cells (d) move those atoms and their connected branch set (e) iterate as necessary to get all atoms desired (f) delete unselected atoms (g) set all coordinates as Cartesians (h) remove all unit cell information -
fixAtomForBonding
private void fixAtomForBonding(javajs.util.P3 pt, int i) -
createBonds
private boolean createBonds(boolean doInit) Use the site bitset to check for atoms that are within +/-dx Angstroms of the specified distances in GEOM_BOND where dx is determined by the uncertainty (dx) in the record. Note that this also "connects" the atoms that might have been moved in a previous iteration. Also connect H atoms based on a distance <= 1.1 Angstrom from a nearby atom. Then create molecules.- Parameters:
doInit
-- Returns:
- TRUE if need to continue
-
checkBondDistance
-
addNewBond
private void addNewBond(int i, int j, int order) add the bond and mark it for molecular processing- Parameters:
i
-j
-order
-
-
setBs
iteratively run through connected atoms, adding them to the set- Parameters:
atoms
-iatom
-bsBonds
-bs
-
-
checkSubclassSymmetry
protected boolean checkSubclassSymmetry() -
checkAllFieldsPresent
-
getField
-
isNull
-
skipLoop
- Throws:
Exception
-