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 interfaceCifReader.ParserAllows checking specific blocks e.g.
-
Field Summary
Fields Modifier and Type Field Description protected intacprivate static byteADP_TYPEprivate booleanallowRotationsprivate static byteALT_IDprivate static byteANISO_B11private static byteANISO_B12private static byteANISO_B13private static byteANISO_B22private static byteANISO_B23private static byteANISO_B33private static byteANISO_BETA_11private static byteANISO_BETA_12private static byteANISO_BETA_13private static byteANISO_BETA_22private static byteANISO_BETA_23private static byteANISO_BETA_33private static byteANISO_LABELprivate static byteANISO_MMCIF_IDprivate static byteANISO_MMCIF_U11private static byteANISO_MMCIF_U12private static byteANISO_MMCIF_U13private static byteANISO_MMCIF_U22private static byteANISO_MMCIF_U23private static byteANISO_MMCIF_U33private static byteANISO_U11private static byteANISO_U12private static byteANISO_U13private static byteANISO_U22private static byteANISO_U23private static byteANISO_U33private java.lang.StringappendedDataprivate static byteATOM_IDprivate static byteATOM_TYPE_OXIDATION_NUMBERprivate static byteATOM_TYPE_RADIUS_BONDprivate static byteATOM_TYPE_SYMBOLprivate static java.lang.String[]atomFieldsprivate float[]atomRadiusprivate Atom[]atomsprivate static java.lang.String[]atomTypeFieldsprivate java.lang.StringauditBlockCodeprivate static byteAUTH_ASYM_IDprivate static byteAUTH_ATOM_IDprivate static byteAUTH_COMP_IDprivate static byteAUTH_SEQ_IDprivate static byteB_ISOprivate javajs.util.Lst<java.lang.Object[]>bondTypesprivate javajs.util.BSbsBondDuplicatesprivate javajs.util.BS[]bsConnectedprivate javajs.util.BSbsExcludeprivate javajs.util.BSbsMoleculeprivate javajs.util.BS[]bsSetsprivate static byteCARTN_Xprivate static byteCARTN_Yprivate static byteCARTN_Zprivate static byteCC_ATOM_CHARGEprivate static byteCC_ATOM_IDprivate static byteCC_ATOM_SYMprivate static byteCC_ATOM_Xprivate static byteCC_ATOM_X_IDEALprivate static byteCC_ATOM_Yprivate static byteCC_ATOM_Y_IDEALprivate static byteCC_ATOM_Zprivate static byteCC_ATOM_Z_IDEALprivate static byteCC_COMP_IDprivate static byteCCDC_GEOM_BOND_TYPEprivate java.lang.StringchemicalName(package private) javajs.api.GenericCifDataParsercifParserprivate static byteCITATION_TITLEprivate static java.lang.String[]citationFields(package private) int[]col2keyprivate intconfigurationPtrprivate intconformationIndex(package private) java.lang.Stringdataprivate static byteDISORDER_ASSEMBLYprivate static byteDISORDER_GROUPprivate java.lang.StringdisorderAssemblyprivate static byteDUMMY_ATOMprotected static java.lang.StringFAMILY_ATOMprivate static java.lang.StringFAMILY_SGOP(package private) java.lang.Stringfieldprivate booleanfilterAssemblyprivate intfirstAtomprotected charfirstCharprivate static byteFRACT_Xprivate static byteFRACT_Yprivate static byteFRACT_Zprivate static byteGEOM_BOND_ATOM_SITE_LABEL_1private static byteGEOM_BOND_ATOM_SITE_LABEL_2private static byteGEOM_BOND_DISTANCEprivate static java.lang.String[]geomBondFieldsprivate static byteGROUP_PDBprivate booleanhaveAromatic(package private) booleanhaveCellWaveVectorprivate booleanhaveGlobalDummy(package private) booleanhaveHAtomsprivate java.util.Hashtable<java.lang.String,java.lang.Object>htAuditprivate java.util.Map<java.lang.String,java.lang.String>htCellTypesprotected java.util.Map<java.lang.String,java.lang.String>htGroup1private java.util.Map<java.lang.String,float[]>htOxStatesprotected booleaniHaveDesiredModelprivate static byteINS_CODEprivate intintTableNoprivate booleanisAFLOWprotected booleanisCourseGrainedprotected booleanisLigandprivate booleanisLoopprotected booleanisMagCIFprotected booleanisMMCIF(package private) java.lang.Stringkey(package private) java.lang.Stringkey0(package private) int[]key2colprivate static byteLABELprivate static byteLABEL_ASYM_IDprivate static byteLABEL_ATOM_IDprivate static byteLABEL_COMP_IDprivate static byteLABEL_SEQ_IDprivate charlastAltLocprotected java.lang.StringlastDataSetNameprivate java.lang.StringlastDisorderAssemblyprivate java.lang.StringlastSpaceGroupNameprivate javajs.util.Lst<float[]>lattvecsprivate javajs.util.Lst<java.lang.String>magCenteringsprotected intmaxSerialprivate static byteMODEL_NOjava.util.Map<java.lang.String,java.lang.Integer>modelMapprivate MSCifParsermodrprivate booleanmodulatedprivate java.lang.StringmolecularTypeprivate static byteMOMENT_LABELprivate static byteMOMENT_PRELIM_Xprivate static byteMOMENT_PRELIM_Yprivate static byteMOMENT_PRELIM_Zprivate static byteMOMENT_Xprivate static byteMOMENT_Yprivate static byteMOMENT_Zprotected intnAtomsprotected intnAtoms0private intnMolecularprotected static byteNONEprivate static byteOCCUPANCYprotected java.lang.StringpdbIDprivate javajs.util.P3ptOffsetprivate booleanreadIdealprivate static java.lang.StringsingleAtomIDprivate static byteSITE_MULTprotected booleanskipping(package private) CifReader.ParsersubParserprivate static byteSUBSYS_IDprivate static byteSYM_EQ_XYZprivate static byteSYM_MAGN_CENTERINGprivate static byteSYM_MAGN_REVprivate static byteSYM_MAGN_REV_PRELIMprivate static byteSYM_MAGN_SSG_ALGprivate static byteSYM_MAGN_SSG_CENT_XYZprivate static byteSYM_MAGN_SSG_CENTERINGprivate static byteSYM_MAGN_SSG_REVprivate static byteSYM_MAGN_XYZprivate static byteSYM_SSG_ALGprivate static byteSYM_SSG_EQ_XYZprivate static byteSYM_XYZprivate static java.lang.String[]symmetryOperationsFieldsjavajs.util.Lst<java.lang.String>symopsprivate static byteTHERMAL_TYPEprotected java.lang.StringthisDataSetNameprivate java.lang.StringthisFormulaprivate java.lang.StringthisStructuralFormulaprivate inttitleAtomSetprivate static java.lang.StringtitleRecordsprivate static java.lang.String[]TransformFieldsprivate static byteTYPE_SYMBOLprivate static byteU_ISO_OR_EQUIVprotected booleanuseAuthorChainID-
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, centroidPacked, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCentroidUnitCell, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, 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, modDim, modelNumber, ms, mustFinalizeModelSet, next, out, packingError, paramsCentroid, paramsLattice, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, 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 voidaddCellType(java.lang.String type, java.lang.String data, boolean isFrom)protected booleanaddCifAtom(Atom atom, java.lang.String id, java.lang.String componentId, java.lang.String strChain)protected voidaddHeader()private voidaddLatticeVectors()private voidaddModelTitle(java.lang.String key)private voidaddMore()private voidaddNewBond(int i, int j, int order)add the bond and mark it for molecular processingvoidapplySymmetryAndSetTrajectory()protected booleancheckAllFieldsPresent(java.lang.String[] keys, int lastKey, boolean critical)private booleancheckBondDistance(Atom a, Atom b, float distance, float dx)protected intcheckPDBModelField(int modelField, int currentModelNo)protected booleancheckSubclassSymmetry()private booleancontinueWith(java.lang.String key)private booleancreateBonds(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 voiddisableField(int fieldIndex)used for turning off fractional or nonfractional coord.voiddoPreSymmetry()protected intfieldProperty(int i)protected booleanfilterCIFAtom(Atom atom, java.lang.String componentId)protected booleanfinalizeSubclass()protected voidfinalizeSubclassReader()optional reader-specific method run first.protected voidfinalizeSubclassSymmetry(boolean haveSymmetry)private voidfixAtomForBonding(javajs.util.P3 pt, int i)private AtomgetAtomFromNameCheckCase(java.lang.String name)From GEOM_BOND, check first for an exact match.intgetBondOrder(java.lang.String field)protected javajs.api.GenericCifDataParsergetCifDataParser()private booleangetData()protected java.lang.StringgetField(byte type)private MSCifParsergetModulationReader()private CifReader.ParsergetTopologyParser()private MSCifParserinitializeMSCIF()voidinitializeReader()protected voidinitSubclass()protected booleanisNull(java.lang.String key)protected voidnewModel(int modelNo)protected voidnextAtomSet()(package private) voidparseLoopParameters(java.lang.String[] fields)sets up arrays and variables for tokenizer.getData()(package private) voidparseLoopParametersFor(java.lang.String key, java.lang.String[] fields)(package private) booleanprocessAtomSiteLoopBlock(boolean isLigand)reads atom data in any orderprivate voidprocessAtomTypeLoopBlock()reads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.private voidprocessCellParameter()unit cell parameters -- two options, so we use MOD 6private java.lang.StringprocessChemicalInfo(java.lang.String type)reads some of the more interesting info into specific atomSetAuxiliaryInfo elementsprivate voidprocessCitationListBlock()private voidprocessDataParameter()initialize a new atom setprivate voidprocessGeomBondLoopBlock()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 voidprocessLoopBlock()processes loop_ blocks of interest or skips the dataprotected booleanprocessSubclassAtom(Atom atom, java.lang.String assemblyId, java.lang.String strChain)protected voidprocessSubclassEntry()protected booleanprocessSubclassLoopBlock()private voidprocessSymmetryOperationsLoopBlock()retrieves symmetry operationsprivate voidprocessSymmetrySpaceGroupName()done by AtomSetCollectionReaderprivate voidprocessUnitCellTransform()private voidprocessUnitCellTransformMatrix()the PDB transformation matrix cartesian --> fractionalprivate booleanreadAllData()private voidreadCifData()private voidsetBondingAndMolecules()(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 voidsetBs(Atom[] atoms, int iatom, javajs.util.BS[] bsBonds, javajs.util.BS bs)iteratively run through connected atoms, adding them to the setprivate voidsetOxidationStates()-
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, 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
-
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
-
intTableNo
private int intTableNo
-
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
-
singleAtomID
private static final java.lang.String singleAtomID
-
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:
initializeReaderin 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
-
addModelTitle
private void addModelTitle(java.lang.String key)
-
processSubclassEntry
protected void processSubclassEntry() throws java.lang.Exception- Throws:
java.lang.Exception
-
processUnitCellTransform
private void processUnitCellTransform()
-
addCellType
private void addCellType(java.lang.String type, java.lang.String data, boolean isFrom)
-
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.ExceptionDescription copied from class:AtomSetCollectionReaderoptional reader-specific method run first.- Overrides:
finalizeSubclassReaderin 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:
doPreSymmetryin classAtomSetCollectionReader- Throws:
java.lang.Exception
-
applySymmetryAndSetTrajectory
public void applySymmetryAndSetTrajectory() throws java.lang.Exception- Overrides:
applySymmetryAndSetTrajectoryin classAtomSetCollectionReader- Throws:
java.lang.Exception
-
finalizeSubclassSymmetry
protected void finalizeSubclassSymmetry(boolean haveSymmetry) throws java.lang.Exception- Overrides:
finalizeSubclassSymmetryin 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.Exceptionreads 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.Exceptiondone by AtomSetCollectionReader- Throws:
java.lang.Exception
-
addLatticeVectors
private void addLatticeVectors()
-
processCellParameter
private void processCellParameter() throws java.lang.Exceptionunit cell parameters -- two options, so we use MOD 6- Throws:
java.lang.Exception
-
processUnitCellTransformMatrix
private void processUnitCellTransformMatrix() throws java.lang.Exceptionthe 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.Exceptionprocesses 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.Exceptionsets 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.Exceptionreads 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.Exceptionreads atom data in any order- Parameters:
isLigand-- Returns:
- TRUE if successful; FALS if EOF encountered
- Throws:
java.lang.Exception
-
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.Exceptionretrieves symmetry operations- Throws:
java.lang.Exception
-
getBondOrder
public int getBondOrder(java.lang.String field)
-
processGeomBondLoopBlock
private void processGeomBondLoopBlock() throws java.lang.Exceptionreads 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)
-
-