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:
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()
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final byte
protected char
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected String
protected int
protected int
protected int
protected static final byte
protected String
protected boolean
protected String
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, CELL_TYPE_SUPER, cellSlop, centroidPacked, checkNearAtoms, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCentroidUnitCell, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterAllHetero, filterCased, filteredPrecision, filterHetero, floatifyJavaDouble, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, is2D, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isSUPERCELL, isTrajectory, latticeCells, latticeScaling, latticeType, line, lowPrecision, lstNCS, matUnitCellOrientation, merging, modDim, modelNumber, ms, mustFinalizeModelSet, next, noHydrogens, noMinimize, noPack, optimize2D, out, paramsCentroid, paramsLattice, precision, 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 TypeMethodDescriptionprotected boolean
addCifAtom
(Atom atom, String id, String componentId, String strChain) protected void
void
protected boolean
checkAllFieldsPresent
(String[] keys, int lastKey, boolean critical) protected int
checkPDBModelField
(int modelField, int currentModelNo) protected boolean
void
protected int
fieldProperty
(int col) protected boolean
filterCIFAtom
(Atom atom, String componentId) protected boolean
protected void
protected void
finalizeSubclassSymmetry
(boolean haveSymmetry) static String
int
getBondOrder
(String field) protected GenericCifDataParser
protected String
getFieldString
(byte type) protected float
getFloatColumnData
(int i) void
protected void
protected boolean
protected boolean
protected boolean
protected void
newModel
(int modelNo) protected void
protected float
protected float
protected int
protected void
parseLoopParameters
(String[] fieldNames) sets up arrays and variables for tokenizer.getData() after the first tag of the loop has been checked.protected boolean
reads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.protected void
unit cell parameters -- two options, so we use MOD 6protected void
protected void
processes loop_ blocks of interest or skips the dataprotected boolean
processSubclassAtom
(Atom atom, String assemblyId, String strChain) protected void
protected boolean
protected void
the PDB transformation matrix cartesian --> fractional key and field have been set alreadyprotected void
skipLoop
(boolean doReport) protected void
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, fixDoubleA, fixFloatA, fixFloatPt, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFilterWithCase, getFortranFormatLengths, getInterface, getPackingRangeValue, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, parsePrecision, 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, setPrecision, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR
-
Field Details
-
CELL_TYPE_MAGNETIC_PARENT
- See Also:
-
CELL_TYPE_MAGNETIC_STANDARD
- See Also:
-
useAuthorChainID
protected boolean useAuthorChainID -
thisDataSetName
-
lastDataSetName
-
iHaveDesiredModel
protected boolean iHaveDesiredModel -
isMMCIF
protected boolean isMMCIF -
isLigand
protected boolean isLigand -
isMagCIF
protected boolean isMagCIF -
skipping
protected boolean skipping -
nAtoms
protected int nAtoms -
ac
protected int ac -
isCourseGrained
protected boolean isCourseGrained -
htGroup1
-
nAtoms0
protected int nAtoms0 -
modelMap
-
symops
-
pdbID
-
CAT_CELL
- See Also:
-
CAT_ATOM_SITES
- See Also:
-
maxSerial
protected int maxSerial -
CAT_ATOM_TYPE
- See Also:
-
EMPTY
protected static final byte EMPTY- See Also:
-
NONE
protected static final byte NONE- See Also:
-
CAT_ATOM_SITE
- See Also:
-
isLoop
protected boolean isLoop -
firstChar
protected char firstChar
-
-
Constructor Details
-
CifReader
public CifReader()
-
-
Method Details
-
initializeReader
- Overrides:
initializeReader
in classAtomSetCollectionReader
- Throws:
Exception
-
initSubclass
protected void initSubclass() -
getCifDataParser
-
processSubclassEntry
- Throws:
Exception
-
newModel
- Throws:
Exception
-
finalizeSubclassReader
- Overrides:
finalizeSubclassReader
in classAtomSetCollectionReader
- Throws:
Exception
-
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
- Parameters:
haveSymmetry
-- Throws:
Exception
-
nextAtomSet
protected void nextAtomSet() -
processCellParameter
unit cell parameters -- two options, so we use MOD 6- Throws:
Exception
-
processUnitCellTransformMatrix
the PDB transformation matrix cartesian --> fractional key and field have been set already- Throws:
Exception
-
processLoopBlock
processes loop_ blocks of interest or skips the data- Throws:
Exception
-
processSubclassLoopBlock
- Throws:
Exception
-
processAtomTypeLoopBlock
reads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.- Returns:
- true; for convenience only in switch statements
- Throws:
Exception
-
fieldProperty
protected int fieldProperty(int col) -
parseCartesianField
protected float parseCartesianField() -
addCifAtom
-
checkPDBModelField
- Parameters:
modelField
-currentModelNo
-- Returns:
- new currentModelNo
- Throws:
Exception
-
processSubclassAtom
- Parameters:
atom
-assemblyId
-strChain
-- Returns:
- true if valid atom
-
filterCIFAtom
-
processCitationListBlock
- Throws:
Exception
-
getBondOrder
-
checkSubclassSymmetry
protected boolean checkSubclassSymmetry() -
checkAllFieldsPresent
-
isNull
-
skipLoop
- Throws:
Exception
-
fullTrim
-
isFieldValid
protected boolean isFieldValid() -
parseIntField
protected int parseIntField() -
parseFloatField
protected float parseFloatField() -
parseLoopParameters
sets up arrays and variables for tokenizer.getData() after the first tag of the loop has been checked.- Parameters:
fieldNames
-- Throws:
Exception
-
getFieldString
-
skipLoopKeyword
protected void skipLoopKeyword() -
isLoopKey
protected boolean isLoopKey() -
getFloatColumnData
protected float getFloatColumnData(int i)
-