Package org.jmol.adapter.readers.cif
Class MMCifReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.cif.CifReader
org.jmol.adapter.readers.cif.MMCifReader
- All Implemented Interfaces:
javajs.api.GenericLineReader
- Direct Known Subclasses:
MMTFReader
mmCIF files are recognized prior to class creation.
Required fields include one of:
_entry.id
_database_PDB_
_pdbx_
_chem_comp.pdbx_type
_audit_author.name
_atom_site.
- Author:
- Bob Hanson (hansonr@stolaf.edu)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jmol.adapter.readers.cif.CifReader
CifReader.Parser -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byteprivate static final byteprivate static final byteprivate static final String[]private static final byteprivate static final byteprivate static final byteprivate booleanprivate booleanprivate int[]private javajs.util.P3private static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final String[]private static final String[]private static final byteprotected booleanprivate booleanprivate static final byteprivate static final byteprivate static final byteprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final byteprotected booleanprivate boolean(package private) javajs.util.M4private intprivate Stringprivate static final String[]private static final byteprivate static final byteprivate static final String[]private booleanprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final String[]private static final String[]private Stringprivate javajs.util.Lst<Object[]>private static final String[]private static final String[]private static final String[]private intFields inherited from class org.jmol.adapter.readers.cif.CifReader
ac, CELL_TYPE_MAGNETIC_PARENT, CELL_TYPE_MAGNETIC_STANDARD, cifParser, col2key, data, FAMILY_ATOM, field, firstChar, haveCellWaveVector, haveHAtoms, htGroup1, iHaveDesiredModel, isCourseGrained, isLigand, isMagCIF, isMMCIF, key, key0, key2col, lastDataSetName, maxSerial, modelMap, nAtoms, nAtoms0, NONE, pdbID, skipping, subParser, symops, thisDataSetName, useAuthorChainIDFields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addedData, addedDataKey, addVibrations, allow_a_len_1, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, baseBondIndex, binaryDoc, bsFilter, bsModels, calculationType, CELL_TYPE_CONVENTIONAL, CELL_TYPE_PRIMITIVE, centroidPacked, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCentroidUnitCell, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterAllHetero, filterCased, filterHetero, fixJavaFloat, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, is2D, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isTrajectory, latticeCells, latticeScaling, latticeType, line, lstNCS, matUnitCellOrientation, merging, modDim, modelNumber, ms, mustFinalizeModelSet, next, noHydrogens, noPack, optimize2D, out, packingError, paramsCentroid, paramsLattice, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, slabXY, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, ucItems, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAssembly(String[] assem) protected voidprotected voidprivate voidaddStructure(Structure structure) protected voidcheckFilterAssembly(String id, Map<String, Object> info) protected intcheckPDBModelField(int modelField, int currentModelNo) protected booleanprivate voidcreateParticle(String id) private StringcrossBinary(String ops1, String ops2) private Stringprotected booleanprivate javajs.util.M4getOpMatrix(String ops) protected intincrementModel(int modelNo) protected voidprivate booleanprivate voidprocessBonds(javajs.util.Lst<Object[]> cmap, Map<Object, Integer> map, boolean isStructConn) private booleana general name definition field.private booleanprivate booleanget canonical 1-letter DNA/RNA sequence code from 3-letter code.private booleanidentifies ranges for HELIX and TURNprivate booleanprivate booleanprocessStructOperListBlock(boolean isNCS) private booleanidentifies sheet rangesprivate booleanidentifies structure sitesbooleanprocessSubclassAtom(Atom atom, String assemblyId, String strChain) protected voidprotected booleanprivate intsetBiomolecule(Map<String, Object> biomolecule, javajs.util.BS bsAll) private voidprivate voidsetBonds()Note that setting bonds from _struct_conn is only done if we have updated CIF files, which include _chem_comp_bond.private voidprotected voidissue here is that mmCIF assembly atoms can be in different blocks by chain: Model1:Chain1 Model2:Chain1 Model1:Chain2 Model2:Chain2 ...Methods inherited from class org.jmol.adapter.readers.cif.CifReader
addCifAtom, addHeader, applySymmetryAndSetTrajectory, checkAllFieldsPresent, doPreSymmetry, fieldProperty, filterCIFAtom, finalizeSubclassReader, finalizeSubclassSymmetry, getBondOrder, getCifDataParser, getField, initializeReader, isNull, newModel, nextAtomSet, parseLoopParameters, parseLoopParametersFor, processAtomSiteLoopBlock, processLoopBlock, skipLoopMethods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymTrajASCR, checkAndRemoveFilterKey, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLine, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, fill3x3, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFilterWithCase, getFortranFormatLengths, getInterface, getNewSymmetry, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, parseToken, parseTokenNext, parseTokenRange, parseTokenStr, processBinaryDocument, processDOM, rd, read3Vectors, readDataObject, readLines, readNextLine, rejectAtomName, RL, set2D, setAtomCoord, setAtomCoordScaled, setAtomCoordTokens, setAtomCoordXYZ, setChainID, setElementAndIsotope, setFilter, setFilterAtomTypeStr, setFractionalCoordinates, setIsPDB, setLoadNote, setModelPDB, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR
-
Field Details
-
isBiomolecule
protected boolean isBiomolecule -
byChain
private boolean byChain -
bySymop
private boolean bySymop -
chainAtomMap
-
chainAtomCounts
-
vBiomolecules
-
htBiomts
-
htSites
-
htHetero
-
htBondMap
-
assemblyIdAtoms
-
thisChain
private int thisChain -
modelIndex
private int modelIndex -
chainSum
private javajs.util.P3 chainSum -
chainAtomCount
private int[] chainAtomCount -
isLigandBondBug
private boolean isLigandBondBug -
mident
javajs.util.M4 mident -
requiresSorting
private boolean requiresSorting -
OPER_ID
private static final byte OPER_ID- See Also:
-
OPER_XYZ
private static final byte OPER_XYZ- See Also:
-
FAMILY_NCS_CAT
- See Also:
-
FAMILY_NCS
- See Also:
-
ncsoperFields
-
FAMILY_OPER_CAT
- See Also:
-
FAMILY_OPER
- See Also:
-
operFields
-
ASSEM_ID
private static final byte ASSEM_ID- See Also:
-
ASSEM_OPERS
private static final byte ASSEM_OPERS- See Also:
-
ASSEM_LIST
private static final byte ASSEM_LIST- See Also:
-
FAMILY_ASSEM_CAT
- See Also:
-
assemblyFields
-
FAMILY_SEQUENCEDIF_CAT
- See Also:
-
STRUCT_REF_G3
private static final byte STRUCT_REF_G3- See Also:
-
STRUCT_REF_G1
private static final byte STRUCT_REF_G1- See Also:
-
structRefFields
-
CHEM_COMP_ID
private static final byte CHEM_COMP_ID- See Also:
-
CHEM_COMP_NAME
private static final byte CHEM_COMP_NAME- See Also:
-
FAMILY_CHEMCOMP_CAT
- See Also:
-
chemCompFields
-
CONF_TYPE_ID
private static final byte CONF_TYPE_ID- See Also:
-
BEG_ASYM_ID
private static final byte BEG_ASYM_ID- See Also:
-
BEG_SEQ_ID
private static final byte BEG_SEQ_ID- See Also:
-
BEG_INS_CODE
private static final byte BEG_INS_CODE- See Also:
-
END_ASYM_ID
private static final byte END_ASYM_ID- See Also:
-
END_SEQ_ID
private static final byte END_SEQ_ID- See Also:
-
END_INS_CODE
private static final byte END_INS_CODE- See Also:
-
STRUCT_ID
private static final byte STRUCT_ID- See Also:
-
SERIAL_NO
private static final byte SERIAL_NO- See Also:
-
HELIX_CLASS
private static final byte HELIX_CLASS- See Also:
-
FAMILY_STRUCTCONF_CAT
- See Also:
-
FAMILY_STRUCTCONF
- See Also:
-
structConfFields
-
SHEET_ID
private static final byte SHEET_ID- See Also:
-
STRAND_ID
private static final byte STRAND_ID- See Also:
-
FAMILY_SHEET_CAT
- See Also:
-
FAMILY_SHEET
- See Also:
-
structSheetRangeFields
-
SITE_ID
private static final byte SITE_ID- See Also:
-
SITE_COMP_ID
private static final byte SITE_COMP_ID- See Also:
-
SITE_ASYM_ID
private static final byte SITE_ASYM_ID- See Also:
-
SITE_SEQ_ID
private static final byte SITE_SEQ_ID- See Also:
-
SITE_INS_CODE
private static final byte SITE_INS_CODE- See Also:
-
FAMILY_STRUCSITE_CAT
- See Also:
-
FAMILY_STRUCSITE
- See Also:
-
structSiteFields
-
STRUCT_CONN_ASYM1
private static final byte STRUCT_CONN_ASYM1- See Also:
-
STRUCT_CONN_SEQ1
private static final byte STRUCT_CONN_SEQ1- See Also:
-
STRUCT_CONN_COMP1
private static final byte STRUCT_CONN_COMP1- See Also:
-
STRUCT_CONN_ATOM1
private static final byte STRUCT_CONN_ATOM1- See Also:
-
STRUCT_CONN_ALT1
private static final byte STRUCT_CONN_ALT1- See Also:
-
STRUCT_CONN_SYMM1
private static final byte STRUCT_CONN_SYMM1- See Also:
-
STRUCT_CONN_ASYM2
private static final byte STRUCT_CONN_ASYM2- See Also:
-
STRUCT_CONN_SEQ2
private static final byte STRUCT_CONN_SEQ2- See Also:
-
STRUCT_CONN_COMP2
private static final byte STRUCT_CONN_COMP2- See Also:
-
STRUCT_CONN_ATOM2
private static final byte STRUCT_CONN_ATOM2- See Also:
-
STRUCT_CONN_ALT2
private static final byte STRUCT_CONN_ALT2- See Also:
-
STRUCT_CONN_SYMM2
private static final byte STRUCT_CONN_SYMM2- See Also:
-
STRUCT_CONN_TYPE
private static final byte STRUCT_CONN_TYPE- See Also:
-
STRUCT_CONN_ORDER
private static final byte STRUCT_CONN_ORDER- See Also:
-
FAMILY_STRUCTCONN_CAT
- See Also:
-
FAMILY_STRUCTCONN
- See Also:
-
structConnFields
-
structConnMap
-
structConnList
-
doSetBonds
private boolean doSetBonds -
CHEM_COMP_BOND_ID
private static final byte CHEM_COMP_BOND_ID- See Also:
-
CHEM_COMP_BOND_ATOM_ID_1
private static final byte CHEM_COMP_BOND_ATOM_ID_1- See Also:
-
CHEM_COMP_BOND_ATOM_ID_2
private static final byte CHEM_COMP_BOND_ATOM_ID_2- See Also:
-
CHEM_COMP_BOND_VALUE_ORDER
private static final byte CHEM_COMP_BOND_VALUE_ORDER- See Also:
-
CHEM_COMP_BOND_AROMATIC_FLAG
private static final byte CHEM_COMP_BOND_AROMATIC_FLAG- See Also:
-
FAMILY_COMPBOND_CAT
- See Also:
-
FAMILY_COMPBOND
- See Also:
-
chemCompBondFields
-
modelStrings
-
done
protected boolean done
-
-
Constructor Details
-
MMCifReader
public MMCifReader()
-
-
Method Details
-
initSubclass
protected void initSubclass()- Overrides:
initSubclassin classCifReader
-
processSubclassEntry
- Overrides:
processSubclassEntryin classCifReader- Throws:
Exception
-
processSubclassLoopBlock
- Overrides:
processSubclassLoopBlockin classCifReader- Throws:
Exception
-
sortAssemblyModels
protected void sortAssemblyModels()issue here is that mmCIF assembly atoms can be in different blocks by chain: Model1:Chain1 Model2:Chain1 Model1:Chain2 Model2:Chain2 ... and so assigned to too many atom sets. -
finalizeSubclass
- Overrides:
finalizeSubclassin classCifReader- Throws:
Exception
-
checkSubclassSymmetry
protected boolean checkSubclassSymmetry()- Overrides:
checkSubclassSymmetryin classCifReader
-
setBonds
private void setBonds()Note that setting bonds from _struct_conn is only done if we have updated CIF files, which include _chem_comp_bond. -
processBonds
-
processSequence
get canonical 1-letter DNA/RNA sequence code from 3-letter code. For example, "2MG" --> "G"- Returns:
- true
- Throws:
Exception
-
processAssemblyGenBlock
- Throws:
Exception
-
addAssembly
- Throws:
Exception
-
checkFilterAssembly
-
decodeAssemblyOperators
-
crossBinary
-
processStructOperListBlock
- Throws:
Exception
-
addMatrix
-
processChemCompLoopBlock
a general name definition field. Not all hetero- Returns:
- true if successful; false to skip
- Throws:
Exception
-
addHetero
-
processStructConfLoopBlock
identifies ranges for HELIX and TURN- Returns:
- true if successful; false to skip
- Throws:
Exception
-
addStructure
-
processStructSheetRangeLoopBlock
identifies sheet ranges- Returns:
- true if successful; false to skip
- Throws:
Exception
-
processStructSiteBlock
identifies structure sites- Returns:
- true if successful; false to skip
- Throws:
Exception
-
setBiomolecules
private void setBiomolecules() -
setBiomolecule
-
createParticle
-
getOpMatrix
-
processStructConnLoopBlock
- Throws:
Exception
-
processCompBondLoopBlock
- Throws:
Exception
-
processSubclassAtom
- Overrides:
processSubclassAtomin classCifReader- Returns:
- true if valid atom
-
checkPDBModelField
- Overrides:
checkPDBModelFieldin classCifReader- Returns:
- new currentModelNo
- Throws:
Exception
-
incrementModel
- Throws:
Exception
-
setHetero
private void setHetero()
-