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
public class CifReader extends AtomSetCollectionReader
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 timehttp://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 Classes Modifier and Type Class Description (package private) static interface
CifReader.Parser
Allows checking specific blocks e.g.
-
Field Summary
Fields Modifier and Type Field Description protected int
ac
private static byte
ADP_TYPE
private boolean
allowRotations
private static byte
ALT_ID
private static byte
ANISO_B11
private static byte
ANISO_B12
private static byte
ANISO_B13
private static byte
ANISO_B22
private static byte
ANISO_B23
private static byte
ANISO_B33
private static byte
ANISO_BETA_11
private static byte
ANISO_BETA_12
private static byte
ANISO_BETA_13
private static byte
ANISO_BETA_22
private static byte
ANISO_BETA_23
private static byte
ANISO_BETA_33
private static byte
ANISO_LABEL
private static byte
ANISO_MMCIF_ID
private static byte
ANISO_MMCIF_U11
private static byte
ANISO_MMCIF_U12
private static byte
ANISO_MMCIF_U13
private static byte
ANISO_MMCIF_U22
private static byte
ANISO_MMCIF_U23
private static byte
ANISO_MMCIF_U33
private static byte
ANISO_U11
private static byte
ANISO_U12
private static byte
ANISO_U13
private static byte
ANISO_U22
private static byte
ANISO_U23
private static byte
ANISO_U33
private java.lang.String
appendedData
private static byte
ATOM_ID
private static byte
ATOM_TYPE_OXIDATION_NUMBER
private static byte
ATOM_TYPE_RADIUS_BOND
private static byte
ATOM_TYPE_SYMBOL
private static java.lang.String[]
atomFields
private float[]
atomRadius
private Atom[]
atoms
private static java.lang.String[]
atomTypeFields
private java.lang.String
auditBlockCode
private static byte
AUTH_ASYM_ID
private static byte
AUTH_ATOM_ID
private static byte
AUTH_COMP_ID
private static byte
AUTH_SEQ_ID
private static byte
B_ISO
private javajs.util.Lst<java.lang.Object[]>
bondTypes
private javajs.util.BS
bsBondDuplicates
private javajs.util.BS[]
bsConnected
private javajs.util.BS
bsExclude
private javajs.util.BS
bsMolecule
private javajs.util.BS[]
bsSets
private static byte
CARTN_X
private static byte
CARTN_Y
private static byte
CARTN_Z
private static byte
CC_ATOM_CHARGE
private static byte
CC_ATOM_ID
private static byte
CC_ATOM_SYM
private static byte
CC_ATOM_X
private static byte
CC_ATOM_X_IDEAL
private static byte
CC_ATOM_Y
private static byte
CC_ATOM_Y_IDEAL
private static byte
CC_ATOM_Z
private static byte
CC_ATOM_Z_IDEAL
private static byte
CC_COMP_ID
private static byte
CCDC_GEOM_BOND_TYPE
protected static java.lang.String
CELL_TYPE_MAGNETIC_PARENT
protected static java.lang.String
CELL_TYPE_MAGNETIC_STANDARD
private java.lang.String
chemicalName
(package private) javajs.api.GenericCifDataParser
cifParser
private static byte
CITATION_TITLE
private static java.lang.String[]
citationFields
(package private) int[]
col2key
private int
configurationPtr
private int
conformationIndex
(package private) java.lang.String
data
private static byte
DISORDER_ASSEMBLY
private static byte
DISORDER_GROUP
private java.lang.String
disorderAssembly
private static byte
DUMMY_ATOM
protected static java.lang.String
FAMILY_ATOM
private static java.lang.String
FAMILY_SGOP
(package private) java.lang.String
field
private boolean
filterAssembly
private int
firstAtom
protected char
firstChar
private static byte
FRACT_X
private static byte
FRACT_Y
private static byte
FRACT_Z
private static byte
GEOM_BOND_ATOM_SITE_LABEL_1
private static byte
GEOM_BOND_ATOM_SITE_LABEL_2
private static byte
GEOM_BOND_DISTANCE
private static java.lang.String[]
geomBondFields
private static byte
GROUP_PDB
private boolean
haveAromatic
(package private) boolean
haveCellWaveVector
private boolean
haveGlobalDummy
(package private) boolean
haveHAtoms
private java.util.Hashtable<java.lang.String,java.lang.Object>
htAudit
private java.util.Map<java.lang.String,java.lang.String>
htCellTypes
protected java.util.Map<java.lang.String,java.lang.String>
htGroup1
private java.util.Map<java.lang.String,float[]>
htOxStates
protected boolean
iHaveDesiredModel
private static byte
INS_CODE
private boolean
isAFLOW
protected boolean
isCourseGrained
protected boolean
isLigand
private boolean
isLoop
protected boolean
isMagCIF
protected boolean
isMMCIF
(package private) java.lang.String
key
(package private) java.lang.String
key0
(package private) int[]
key2col
private static byte
LABEL
private static byte
LABEL_ASYM_ID
private static byte
LABEL_ATOM_ID
private static byte
LABEL_COMP_ID
private static byte
LABEL_SEQ_ID
private char
lastAltLoc
protected java.lang.String
lastDataSetName
private java.lang.String
lastDisorderAssembly
private java.lang.String
lastSpaceGroupName
private javajs.util.Lst<float[]>
lattvecs
private javajs.util.Lst<java.lang.String>
magCenterings
protected int
maxSerial
private static byte
MODEL_NO
java.util.Map<java.lang.String,java.lang.Integer>
modelMap
private MSCifParser
modr
private boolean
modulated
private java.lang.String
molecularType
private static byte
MOMENT_LABEL
private static byte
MOMENT_PRELIM_X
private static byte
MOMENT_PRELIM_Y
private static byte
MOMENT_PRELIM_Z
private static byte
MOMENT_X
private static byte
MOMENT_Y
private static byte
MOMENT_Z
protected int
nAtoms
protected int
nAtoms0
private int
nMolecular
protected static byte
NONE
private static byte
OCCUPANCY
protected java.lang.String
pdbID
private javajs.util.P3
ptOffset
private boolean
readIdeal
private static byte
SITE_MULT
protected boolean
skipping
(package private) CifReader.Parser
subParser
private static byte
SUBSYS_ID
private static byte
SYM_EQ_XYZ
private static byte
SYM_MAGN_CENTERING
private static byte
SYM_MAGN_REV
private static byte
SYM_MAGN_REV_PRELIM
private static byte
SYM_MAGN_SSG_ALG
private static byte
SYM_MAGN_SSG_CENT_XYZ
private static byte
SYM_MAGN_SSG_CENTERING
private static byte
SYM_MAGN_SSG_REV
private static byte
SYM_MAGN_XYZ
private static byte
SYM_SSG_ALG
private static byte
SYM_SSG_EQ_XYZ
private static byte
SYM_XYZ
private static java.lang.String[]
symmetryOperationsFields
javajs.util.Lst<java.lang.String>
symops
private static byte
THERMAL_TYPE
protected java.lang.String
thisDataSetName
private java.lang.String
thisFormula
private java.lang.String
thisStructuralFormula
private int
titleAtomSet
private static java.lang.String
titleRecords
private static java.lang.String[]
TransformFields
private static byte
TYPE_SYMBOL
private static byte
U_ISO_OR_EQUIV
protected boolean
useAuthorChainID
-
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, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isTrajectory, latticeCells, latticeScaling, latticeType, line, lstNCS, matUnitCellOrientation, merging, modDim, modelNumber, ms, mustFinalizeModelSet, next, noPack, 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 Constructor Description CifReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addCellType(java.lang.String type, java.lang.String data, boolean isFrom)
(magnetic CIF or LOAD ...protected boolean
addCifAtom(Atom atom, java.lang.String id, java.lang.String componentId, java.lang.String strChain)
protected void
addHeader()
private void
addLatticeVectors()
private void
addModelTitle(java.lang.String key)
private void
addMore()
private void
addNewBond(int i, int j, int order)
add the bond and mark it for molecular processingvoid
applySymmetryAndSetTrajectory()
protected boolean
checkAllFieldsPresent(java.lang.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
checkSubclassSymmetry()
private boolean
continueWith(java.lang.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
doPreSymmetry()
protected int
fieldProperty(int i)
protected boolean
filterCIFAtom(Atom atom, java.lang.String componentId)
protected boolean
finalizeSubclass()
protected void
finalizeSubclassReader()
optional reader-specific method run first.protected void
finalizeSubclassSymmetry(boolean haveSymmetry)
private void
fixAtomForBonding(javajs.util.P3 pt, int i)
private Atom
getAtomFromNameCheckCase(java.lang.String name)
From GEOM_BOND, check first for an exact match.private int
getAtomNameRef()
int
getBondOrder(java.lang.String field)
protected javajs.api.GenericCifDataParser
getCifDataParser()
private boolean
getData()
protected java.lang.String
getField(byte type)
private MSCifParser
getModulationReader()
private CifReader.Parser
getTopologyParser()
private MSCifParser
initializeMSCIF()
void
initializeReader()
protected void
initSubclass()
protected boolean
isNull(java.lang.String key)
protected void
newModel(int modelNo)
protected void
nextAtomSet()
(package private) void
parseLoopParameters(java.lang.String[] fields)
sets up arrays and variables for tokenizer.getData()(package private) void
parseLoopParametersFor(java.lang.String key, java.lang.String[] fields)
(package private) boolean
processAtomSiteLoopBlock(boolean isLigand)
reads atom data in any orderprivate void
processAtomTypeLoopBlock()
reads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.private void
processCellParameter()
unit cell parameters -- two options, so we use MOD 6private java.lang.String
processChemicalInfo(java.lang.String type)
reads some of the more interesting info into specific atomSetAuxiliaryInfo elementsprivate void
processCitationListBlock()
private void
processDataParameter()
initialize a new atom setprivate void
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.protected void
processLoopBlock()
processes loop_ blocks of interest or skips the dataprotected boolean
processSubclassAtom(Atom atom, java.lang.String assemblyId, java.lang.String strChain)
protected void
processSubclassEntry()
protected boolean
processSubclassLoopBlock()
private void
processSymmetryOperationsLoopBlock()
retrieves symmetry operationsprivate void
processSymmetrySpaceGroupName()
done by AtomSetCollectionReaderprivate 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)private void
processUnitCellTransformMatrix()
the PDB transformation matrix cartesian --> fractionalprivate boolean
readAllData()
private void
readCifData()
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 informationprivate void
setBs(Atom[] atoms, int iatom, javajs.util.BS[] bsBonds, javajs.util.BS bs)
iteratively run through connected atoms, adding them to the setprivate void
setOxidationStates()
private boolean
skipKey(java.lang.String key)
-
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 Detail
-
CELL_TYPE_MAGNETIC_PARENT
protected static final java.lang.String CELL_TYPE_MAGNETIC_PARENT
- See Also:
- Constant Field Values
-
CELL_TYPE_MAGNETIC_STANDARD
protected static final java.lang.String CELL_TYPE_MAGNETIC_STANDARD
- See Also:
- Constant Field Values
-
subParser
CifReader.Parser subParser
-
titleRecords
private static final java.lang.String titleRecords
- See Also:
- Constant Field Values
-
modr
private MSCifParser 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
protected java.lang.String thisDataSetName
-
lastDataSetName
protected java.lang.String lastDataSetName
-
chemicalName
private java.lang.String chemicalName
-
thisStructuralFormula
private java.lang.String thisStructuralFormula
-
thisFormula
private java.lang.String thisFormula
-
iHaveDesiredModel
protected boolean iHaveDesiredModel
-
isMMCIF
protected boolean isMMCIF
-
isLigand
protected boolean isLigand
-
isMagCIF
protected boolean isMagCIF
-
haveHAtoms
boolean haveHAtoms
-
molecularType
private java.lang.String molecularType
-
lastAltLoc
private char lastAltLoc
-
haveAromatic
private boolean haveAromatic
-
conformationIndex
private int conformationIndex
-
nMolecular
private int nMolecular
-
appendedData
private java.lang.String appendedData
-
skipping
protected boolean skipping
-
nAtoms
protected int nAtoms
-
ac
protected int ac
-
auditBlockCode
private java.lang.String auditBlockCode
-
lastSpaceGroupName
private java.lang.String lastSpaceGroupName
-
modulated
private boolean modulated
-
isCourseGrained
protected boolean isCourseGrained
-
haveCellWaveVector
boolean haveCellWaveVector
-
htGroup1
protected java.util.Map<java.lang.String,java.lang.String> htGroup1
-
nAtoms0
protected int nAtoms0
-
titleAtomSet
private int titleAtomSet
-
htCellTypes
private java.util.Map<java.lang.String,java.lang.String> htCellTypes
-
modelMap
public java.util.Map<java.lang.String,java.lang.Integer> modelMap
-
haveGlobalDummy
private boolean haveGlobalDummy
-
htAudit
private java.util.Hashtable<java.lang.String,java.lang.Object> htAudit
-
symops
public javajs.util.Lst<java.lang.String> symops
-
pdbID
protected java.lang.String pdbID
-
TransformFields
private static final java.lang.String[] TransformFields
-
key
java.lang.String key
-
key0
java.lang.String key0
-
data
java.lang.String data
-
isLoop
private boolean isLoop
-
col2key
int[] col2key
-
key2col
int[] key2col
-
field
java.lang.String field
-
firstChar
protected char firstChar
-
htOxStates
private java.util.Map<java.lang.String,float[]> htOxStates
-
bondTypes
private javajs.util.Lst<java.lang.Object[]> bondTypes
-
disorderAssembly
private java.lang.String disorderAssembly
-
lastDisorderAssembly
private java.lang.String lastDisorderAssembly
-
lattvecs
private javajs.util.Lst<float[]> lattvecs
-
magCenterings
private javajs.util.Lst<java.lang.String> magCenterings
-
maxSerial
protected int maxSerial
-
ATOM_TYPE_SYMBOL
private static final byte ATOM_TYPE_SYMBOL
- See Also:
- Constant Field Values
-
ATOM_TYPE_OXIDATION_NUMBER
private static final byte ATOM_TYPE_OXIDATION_NUMBER
- See Also:
- Constant Field Values
-
ATOM_TYPE_RADIUS_BOND
private static final byte ATOM_TYPE_RADIUS_BOND
- See Also:
- Constant Field Values
-
atomTypeFields
private static final java.lang.String[] atomTypeFields
-
NONE
protected static final byte NONE
- See Also:
- Constant Field Values
-
TYPE_SYMBOL
private static final byte TYPE_SYMBOL
- See Also:
- Constant Field Values
-
LABEL
private static final byte LABEL
- See Also:
- Constant Field Values
-
AUTH_ATOM_ID
private static final byte AUTH_ATOM_ID
- See Also:
- Constant Field Values
-
FRACT_X
private static final byte FRACT_X
- See Also:
- Constant Field Values
-
FRACT_Y
private static final byte FRACT_Y
- See Also:
- Constant Field Values
-
FRACT_Z
private static final byte FRACT_Z
- See Also:
- Constant Field Values
-
CARTN_X
private static final byte CARTN_X
- See Also:
- Constant Field Values
-
CARTN_Y
private static final byte CARTN_Y
- See Also:
- Constant Field Values
-
CARTN_Z
private static final byte CARTN_Z
- See Also:
- Constant Field Values
-
OCCUPANCY
private static final byte OCCUPANCY
- See Also:
- Constant Field Values
-
B_ISO
private static final byte B_ISO
- See Also:
- Constant Field Values
-
AUTH_COMP_ID
private static final byte AUTH_COMP_ID
- See Also:
- Constant Field Values
-
AUTH_ASYM_ID
private static final byte AUTH_ASYM_ID
- See Also:
- Constant Field Values
-
AUTH_SEQ_ID
private static final byte AUTH_SEQ_ID
- See Also:
- Constant Field Values
-
INS_CODE
private static final byte INS_CODE
- See Also:
- Constant Field Values
-
ALT_ID
private static final byte ALT_ID
- See Also:
- Constant Field Values
-
GROUP_PDB
private static final byte GROUP_PDB
- See Also:
- Constant Field Values
-
MODEL_NO
private static final byte MODEL_NO
- See Also:
- Constant Field Values
-
DUMMY_ATOM
private static final byte DUMMY_ATOM
- See Also:
- Constant Field Values
-
DISORDER_GROUP
private static final byte DISORDER_GROUP
- See Also:
- Constant Field Values
-
ANISO_LABEL
private static final byte ANISO_LABEL
- See Also:
- Constant Field Values
-
ANISO_MMCIF_ID
private static final byte ANISO_MMCIF_ID
- See Also:
- Constant Field Values
-
ANISO_U11
private static final byte ANISO_U11
- See Also:
- Constant Field Values
-
ANISO_U22
private static final byte ANISO_U22
- See Also:
- Constant Field Values
-
ANISO_U33
private static final byte ANISO_U33
- See Also:
- Constant Field Values
-
ANISO_U12
private static final byte ANISO_U12
- See Also:
- Constant Field Values
-
ANISO_U13
private static final byte ANISO_U13
- See Also:
- Constant Field Values
-
ANISO_U23
private static final byte ANISO_U23
- See Also:
- Constant Field Values
-
ANISO_MMCIF_U11
private static final byte ANISO_MMCIF_U11
- See Also:
- Constant Field Values
-
ANISO_MMCIF_U22
private static final byte ANISO_MMCIF_U22
- See Also:
- Constant Field Values
-
ANISO_MMCIF_U33
private static final byte ANISO_MMCIF_U33
- See Also:
- Constant Field Values
-
ANISO_MMCIF_U12
private static final byte ANISO_MMCIF_U12
- See Also:
- Constant Field Values
-
ANISO_MMCIF_U13
private static final byte ANISO_MMCIF_U13
- See Also:
- Constant Field Values
-
ANISO_MMCIF_U23
private static final byte ANISO_MMCIF_U23
- See Also:
- Constant Field Values
-
U_ISO_OR_EQUIV
private static final byte U_ISO_OR_EQUIV
- See Also:
- Constant Field Values
-
ANISO_B11
private static final byte ANISO_B11
- See Also:
- Constant Field Values
-
ANISO_B22
private static final byte ANISO_B22
- See Also:
- Constant Field Values
-
ANISO_B33
private static final byte ANISO_B33
- See Also:
- Constant Field Values
-
ANISO_B12
private static final byte ANISO_B12
- See Also:
- Constant Field Values
-
ANISO_B13
private static final byte ANISO_B13
- See Also:
- Constant Field Values
-
ANISO_B23
private static final byte ANISO_B23
- See Also:
- Constant Field Values
-
ANISO_BETA_11
private static final byte ANISO_BETA_11
- See Also:
- Constant Field Values
-
ANISO_BETA_22
private static final byte ANISO_BETA_22
- See Also:
- Constant Field Values
-
ANISO_BETA_33
private static final byte ANISO_BETA_33
- See Also:
- Constant Field Values
-
ANISO_BETA_12
private static final byte ANISO_BETA_12
- See Also:
- Constant Field Values
-
ANISO_BETA_13
private static final byte ANISO_BETA_13
- See Also:
- Constant Field Values
-
ANISO_BETA_23
private static final byte ANISO_BETA_23
- See Also:
- Constant Field Values
-
ADP_TYPE
private static final byte ADP_TYPE
- See Also:
- Constant Field Values
-
CC_COMP_ID
private static final byte CC_COMP_ID
- See Also:
- Constant Field Values
-
CC_ATOM_ID
private static final byte CC_ATOM_ID
- See Also:
- Constant Field Values
-
CC_ATOM_SYM
private static final byte CC_ATOM_SYM
- See Also:
- Constant Field Values
-
CC_ATOM_CHARGE
private static final byte CC_ATOM_CHARGE
- See Also:
- Constant Field Values
-
CC_ATOM_X
private static final byte CC_ATOM_X
- See Also:
- Constant Field Values
-
CC_ATOM_Y
private static final byte CC_ATOM_Y
- See Also:
- Constant Field Values
-
CC_ATOM_Z
private static final byte CC_ATOM_Z
- See Also:
- Constant Field Values
-
CC_ATOM_X_IDEAL
private static final byte CC_ATOM_X_IDEAL
- See Also:
- Constant Field Values
-
CC_ATOM_Y_IDEAL
private static final byte CC_ATOM_Y_IDEAL
- See Also:
- Constant Field Values
-
CC_ATOM_Z_IDEAL
private static final byte CC_ATOM_Z_IDEAL
- See Also:
- Constant Field Values
-
DISORDER_ASSEMBLY
private static final byte DISORDER_ASSEMBLY
- See Also:
- Constant Field Values
-
LABEL_ASYM_ID
private static final byte LABEL_ASYM_ID
- See Also:
- Constant Field Values
-
SUBSYS_ID
private static final byte SUBSYS_ID
- See Also:
- Constant Field Values
-
SITE_MULT
private static final byte SITE_MULT
- See Also:
- Constant Field Values
-
THERMAL_TYPE
private static final byte THERMAL_TYPE
- See Also:
- Constant Field Values
-
MOMENT_LABEL
private static final byte MOMENT_LABEL
- See Also:
- Constant Field Values
-
MOMENT_PRELIM_X
private static final byte MOMENT_PRELIM_X
- See Also:
- Constant Field Values
-
MOMENT_PRELIM_Y
private static final byte MOMENT_PRELIM_Y
- See Also:
- Constant Field Values
-
MOMENT_PRELIM_Z
private static final byte MOMENT_PRELIM_Z
- See Also:
- Constant Field Values
-
MOMENT_X
private static final byte MOMENT_X
- See Also:
- Constant Field Values
-
MOMENT_Y
private static final byte MOMENT_Y
- See Also:
- Constant Field Values
-
MOMENT_Z
private static final byte MOMENT_Z
- See Also:
- Constant Field Values
-
ATOM_ID
private static final byte ATOM_ID
- See Also:
- Constant Field Values
-
LABEL_SEQ_ID
private static final byte LABEL_SEQ_ID
- See Also:
- Constant Field Values
-
LABEL_COMP_ID
private static final byte LABEL_COMP_ID
- See Also:
- Constant Field Values
-
LABEL_ATOM_ID
private static final byte LABEL_ATOM_ID
- See Also:
- Constant Field Values
-
FAMILY_ATOM
protected static final java.lang.String FAMILY_ATOM
- See Also:
- Constant Field Values
-
atomFields
private static final java.lang.String[] atomFields
-
CITATION_TITLE
private static final byte CITATION_TITLE
- See Also:
- Constant Field Values
-
citationFields
private static final java.lang.String[] citationFields
-
SYM_XYZ
private static final byte SYM_XYZ
- See Also:
- Constant Field Values
-
SYM_MAGN_XYZ
private static final byte SYM_MAGN_XYZ
- See Also:
- Constant Field Values
-
SYM_SSG_ALG
private static final byte SYM_SSG_ALG
- See Also:
- Constant Field Values
-
SYM_MAGN_SSG_ALG
private static final byte SYM_MAGN_SSG_ALG
- See Also:
- Constant Field Values
-
SYM_EQ_XYZ
private static final byte SYM_EQ_XYZ
- See Also:
- Constant Field Values
-
SYM_SSG_EQ_XYZ
private static final byte SYM_SSG_EQ_XYZ
- See Also:
- Constant Field Values
-
SYM_MAGN_REV
private static final byte SYM_MAGN_REV
- See Also:
- Constant Field Values
-
SYM_MAGN_SSG_REV
private static final byte SYM_MAGN_SSG_REV
- See Also:
- Constant Field Values
-
SYM_MAGN_REV_PRELIM
private static final byte SYM_MAGN_REV_PRELIM
- See Also:
- Constant Field Values
-
SYM_MAGN_CENTERING
private static final byte SYM_MAGN_CENTERING
- See Also:
- Constant Field Values
-
SYM_MAGN_SSG_CENTERING
private static final byte SYM_MAGN_SSG_CENTERING
- See Also:
- Constant Field Values
-
SYM_MAGN_SSG_CENT_XYZ
private static final byte SYM_MAGN_SSG_CENT_XYZ
- See Also:
- Constant Field Values
-
FAMILY_SGOP
private static final java.lang.String FAMILY_SGOP
- See Also:
- Constant Field Values
-
symmetryOperationsFields
private static final java.lang.String[] symmetryOperationsFields
-
GEOM_BOND_ATOM_SITE_LABEL_1
private static final byte GEOM_BOND_ATOM_SITE_LABEL_1
- See Also:
- Constant Field Values
-
GEOM_BOND_ATOM_SITE_LABEL_2
private static final byte GEOM_BOND_ATOM_SITE_LABEL_2
- See Also:
- Constant Field Values
-
GEOM_BOND_DISTANCE
private static final byte GEOM_BOND_DISTANCE
- See Also:
- Constant Field Values
-
CCDC_GEOM_BOND_TYPE
private static final byte CCDC_GEOM_BOND_TYPE
- See Also:
- Constant Field Values
-
geomBondFields
private static final java.lang.String[] 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
private Atom[] atoms
-
bsBondDuplicates
private javajs.util.BS bsBondDuplicates
-
-
Method Detail
-
initializeReader
public void initializeReader() throws java.lang.Exception
- Overrides:
initializeReader
in classAtomSetCollectionReader
- Throws:
java.lang.Exception
-
initSubclass
protected void initSubclass()
-
readCifData
private void readCifData() throws java.lang.Exception
- Throws:
java.lang.Exception
-
continueWith
private boolean continueWith(java.lang.String key)
-
getCifDataParser
protected javajs.api.GenericCifDataParser getCifDataParser()
-
readAllData
private boolean readAllData() throws java.lang.Exception
- Throws:
java.lang.Exception
-
skipKey
private boolean skipKey(java.lang.String key)
-
addModelTitle
private void addModelTitle(java.lang.String key)
-
processSubclassEntry
protected void processSubclassEntry() throws java.lang.Exception
- Throws:
java.lang.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
private void addCellType(java.lang.String type, java.lang.String data, boolean isFrom)
(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
private MSCifParser getModulationReader() throws java.lang.Exception
- Throws:
java.lang.Exception
-
initializeMSCIF
private MSCifParser initializeMSCIF() throws java.lang.Exception
- Throws:
java.lang.Exception
-
newModel
protected void newModel(int modelNo) throws java.lang.Exception
- Throws:
java.lang.Exception
-
finalizeSubclassReader
protected void finalizeSubclassReader() throws java.lang.Exception
Description copied from class:AtomSetCollectionReader
optional reader-specific method run first.- Overrides:
finalizeSubclassReader
in classAtomSetCollectionReader
- Throws:
java.lang.Exception
-
setOxidationStates
private void setOxidationStates()
-
addHeader
protected void addHeader()
-
finalizeSubclass
protected boolean finalizeSubclass() throws java.lang.Exception
- Throws:
java.lang.Exception
-
doPreSymmetry
public void doPreSymmetry() throws java.lang.Exception
- Overrides:
doPreSymmetry
in classAtomSetCollectionReader
- Throws:
java.lang.Exception
-
applySymmetryAndSetTrajectory
public void applySymmetryAndSetTrajectory() throws java.lang.Exception
- Overrides:
applySymmetryAndSetTrajectory
in classAtomSetCollectionReader
- Throws:
java.lang.Exception
-
finalizeSubclassSymmetry
protected void finalizeSubclassSymmetry(boolean haveSymmetry) throws java.lang.Exception
- Overrides:
finalizeSubclassSymmetry
in classAtomSetCollectionReader
- Throws:
java.lang.Exception
-
processDataParameter
private void processDataParameter()
initialize a new atom set
-
nextAtomSet
protected void nextAtomSet()
-
processChemicalInfo
private java.lang.String processChemicalInfo(java.lang.String type) throws java.lang.Exception
reads some of the more interesting info into specific atomSetAuxiliaryInfo elements- Parameters:
type
- "name" "formula" etc.- Returns:
- data
- Throws:
java.lang.Exception
-
processSymmetrySpaceGroupName
private void processSymmetrySpaceGroupName() throws java.lang.Exception
done by AtomSetCollectionReader- Throws:
java.lang.Exception
-
addLatticeVectors
private void addLatticeVectors()
-
processCellParameter
private void processCellParameter() throws java.lang.Exception
unit cell parameters -- two options, so we use MOD 6- Throws:
java.lang.Exception
-
processUnitCellTransformMatrix
private void processUnitCellTransformMatrix() throws java.lang.Exception
the PDB transformation matrix cartesian --> fractional- Throws:
java.lang.Exception
-
getData
private boolean getData() throws java.lang.Exception
- Returns:
- TRUE if data, even if ''; FALSE if '.' or '?' or eof.
- Throws:
java.lang.Exception
-
processLoopBlock
protected void processLoopBlock() throws java.lang.Exception
processes loop_ blocks of interest or skips the data- Throws:
java.lang.Exception
-
processSubclassLoopBlock
protected boolean processSubclassLoopBlock() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTopologyParser
private CifReader.Parser getTopologyParser()
-
addMore
private void addMore()
-
fieldProperty
protected int fieldProperty(int i)
-
parseLoopParameters
void parseLoopParameters(java.lang.String[] fields) throws java.lang.Exception
sets up arrays and variables for tokenizer.getData()- Parameters:
fields
-- Throws:
java.lang.Exception
-
parseLoopParametersFor
void parseLoopParametersFor(java.lang.String key, java.lang.String[] fields) throws java.lang.Exception
- Throws:
java.lang.Exception
-
disableField
private void disableField(int fieldIndex)
used for turning off fractional or nonfractional coord.- Parameters:
fieldIndex
-
-
processAtomTypeLoopBlock
private void processAtomTypeLoopBlock() throws java.lang.Exception
reads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.- Throws:
java.lang.Exception
-
processAtomSiteLoopBlock
boolean processAtomSiteLoopBlock(boolean isLigand) throws java.lang.Exception
reads atom data in any order- Parameters:
isLigand
-- Returns:
- TRUE if successful; FALS if EOF encountered
- Throws:
java.lang.Exception
-
getAtomNameRef
private int getAtomNameRef()
-
addCifAtom
protected boolean addCifAtom(Atom atom, java.lang.String id, java.lang.String componentId, java.lang.String strChain)
-
checkPDBModelField
protected int checkPDBModelField(int modelField, int currentModelNo) throws java.lang.Exception
- Parameters:
modelField
-currentModelNo
-- Returns:
- new currentModelNo
- Throws:
java.lang.Exception
-
processSubclassAtom
protected boolean processSubclassAtom(Atom atom, java.lang.String assemblyId, java.lang.String strChain)
- Parameters:
atom
-assemblyId
-strChain
-- Returns:
- true if valid atom
-
filterCIFAtom
protected boolean filterCIFAtom(Atom atom, java.lang.String componentId)
-
processCitationListBlock
private void processCitationListBlock() throws java.lang.Exception
- Throws:
java.lang.Exception
-
processSymmetryOperationsLoopBlock
private void processSymmetryOperationsLoopBlock() throws java.lang.Exception
retrieves symmetry operations- Throws:
java.lang.Exception
-
getBondOrder
public int getBondOrder(java.lang.String field)
-
processGeomBondLoopBlock
private void processGeomBondLoopBlock() throws java.lang.Exception
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:
java.lang.Exception
-
getAtomFromNameCheckCase
private Atom getAtomFromNameCheckCase(java.lang.String name)
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
-
addNewBond
private void addNewBond(int i, int j, int order)
add the bond and mark it for molecular processing- Parameters:
i
-j
-order
-
-
setBs
private void setBs(Atom[] atoms, int iatom, javajs.util.BS[] bsBonds, javajs.util.BS bs)
iteratively run through connected atoms, adding them to the set- Parameters:
atoms
-iatom
-bsBonds
-bs
-
-
checkSubclassSymmetry
protected boolean checkSubclassSymmetry()
-
checkAllFieldsPresent
protected boolean checkAllFieldsPresent(java.lang.String[] keys, int lastKey, boolean critical)
-
getField
protected java.lang.String getField(byte type)
-
isNull
protected boolean isNull(java.lang.String key)
-
-