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
Added preliminary Spin-Frame "ssg" tags2025.02.07
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 intprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final byteprotected charprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected Stringprotected intprotected intprotected intprotected static final byteprotected Stringprotected booleanprotected Stringprotected booleanFields 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 booleanaddCifAtom(Atom atom, String id, String componentId, String strChain) protected voidvoidprotected booleancheckAllFieldsPresent(String[] keys, int lastKey, boolean critical) protected intcheckPDBModelField(int modelField, int currentModelNo) protected booleanvoiddoPreSymmetry(boolean doApplySymmetry) protected intfieldProperty(int col) protected booleanfilterCIFAtom(Atom atom, String componentId) protected booleanprotected voidprotected voidfinalizeSubclassSymmetry(boolean haveSymmetry) static StringintgetBondOrder(String field) protected GenericCifDataParserprotected StringgetFieldString(byte type) protected floatgetFloatColumnData(int i) voidprotected voidprotected booleanprotected booleanprotected booleanprotected voidnewModel(int modelNo) protected voidprotected floatprotected floatprotected intprotected voidparseLoopParameters(String[] fieldNames) sets up arrays and variables for tokenizer.getData() after the first tag of the loop has been checked.protected booleanreads the oxidation number and associates it with an atom name, which can then later be associated with the right atom indirectly.protected voidunit cell parameters -- two options, so we use MOD 6protected voidprotected voidprocesses loop_ blocks of interest or skips the dataprotected booleanprocessSubclassAtom(Atom atom, String assemblyId, String strChain) protected voidprotected booleanprotected voidthe PDB transformation matrix cartesian --> fractional key and field have been set alreadyintprotected voidskipLoop(boolean doReport) protected voidMethods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addMoreUnitCellInfo, addSites, addSiteScript, appendLoadNote, 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, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR, warnSkippingOperation
-
Field Details
-
useAuthorChainID
protected boolean useAuthorChainID -
thisDataSetName
-
lastDataSetName
-
iHaveDesiredModel
protected boolean iHaveDesiredModel -
isMMCIF
protected boolean isMMCIF -
isLigand
protected boolean isLigand -
isMagCIF
protected boolean isMagCIF -
isSpinCIF
protected boolean isSpinCIF -
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:
initializeReaderin classAtomSetCollectionReader- Throws:
Exception
-
initSubclass
protected void initSubclass() -
getCifDataParser
-
setSymmetryOperator
- Overrides:
setSymmetryOperatorin classAtomSetCollectionReader
-
processSubclassEntry
- Throws:
Exception
-
newModel
- Throws:
Exception
-
finalizeSubclassReader
- Overrides:
finalizeSubclassReaderin classAtomSetCollectionReader- Throws:
Exception
-
addHeader
protected void addHeader() -
finalizeSubclass
- Throws:
Exception
-
doPreSymmetry
- Overrides:
doPreSymmetryin classAtomSetCollectionReader- Throws:
Exception
-
applySymmetryAndSetTrajectory
- Overrides:
applySymmetryAndSetTrajectoryin classAtomSetCollectionReader- Throws:
Exception
-
finalizeSubclassSymmetry
- Overrides:
finalizeSubclassSymmetryin 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)
-