org.jmol.adapter.readers.cifpdb
public class CifReader extends AtomSetCollectionReader implements JmolLineReader
http://www.iucr.org/iucr-top/cif/ http://www.iucr.org/iucr-top/cif/standard/cifstd5.html
Modifier and Type | Field and Description |
---|---|
private static byte |
ADP_TYPE |
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 static byte |
ASYM_ID |
private static byte |
ATOM_TYPE_OXIDATION_NUMBER |
private static byte |
ATOM_TYPE_SYMBOL |
private int |
atomCount |
private static String[] |
atomFields |
private float[] |
atomRadius |
private Atom[] |
atoms |
private static String[] |
atomTypeFields |
private Map<String,Float> |
atomTypes |
private static byte |
AUTH_ATOM |
private static byte |
B_ISO |
private static byte |
BEG_ASYM_ID |
private static byte |
BEG_INS_CODE |
private static byte |
BEG_SEQ_ID |
private List<Object[]> |
bondTypes |
private BitSet[] |
bsConnected |
private BitSet |
bsExclude |
private BitSet |
bsMolecule |
private BitSet[] |
bsSets |
private static byte |
CARTN_X |
private static byte |
CARTN_Y |
private static byte |
CARTN_Z |
static String[] |
cellParamNames |
private static byte |
CHEM_COMP_AC_CHARGE |
private static byte |
CHEM_COMP_AC_ID |
private static byte |
CHEM_COMP_AC_NAME |
private static byte |
CHEM_COMP_AC_SYM |
private static byte |
CHEM_COMP_AC_X |
private static byte |
CHEM_COMP_AC_X_IDEAL |
private static byte |
CHEM_COMP_AC_Y |
private static byte |
CHEM_COMP_AC_Y_IDEAL |
private static byte |
CHEM_COMP_AC_Z |
private static byte |
CHEM_COMP_AC_Z_IDEAL |
private static byte |
CHEM_COMP_BOND_AROMATIC_FLAG |
private static byte |
CHEM_COMP_BOND_ATOM_ID_1 |
private static byte |
CHEM_COMP_BOND_ATOM_ID_2 |
private static byte |
CHEM_COMP_BOND_VALUE_ORDER |
private static byte |
CHEM_COMP_ID |
private static byte |
CHEM_COMP_NAME |
private static String[] |
chemCompBondFields |
private static String[] |
chemCompFields |
private String |
chemicalName |
private static byte |
COMP_ID |
private static byte |
CONF_TYPE_ID |
private int |
configurationPtr |
private int |
conformationIndex |
private String |
data |
private static byte |
DISORDER_ASSEMBLY |
private static byte |
DISORDER_GROUP |
private String |
disorderAssembly |
private static byte |
DUMMY_ATOM |
private static byte |
END_ASYM_ID |
private static byte |
END_INS_CODE |
private static byte |
END_SEQ_ID |
(package private) String |
field |
private byte[] |
fieldOf |
private int |
firstAtom |
private 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 String[] |
geomBondFields |
private static byte |
GROUP_PDB |
private static byte |
HELIX_CLASS |
private String[] |
hetatmData
optional nonloop format -- see 1jsa.cif
|
private Map<String,String> |
htHetero |
private Map<String,Map<String,Object>> |
htSites |
private boolean |
iHaveDesiredModel |
private static byte |
INS_CODE |
private boolean |
isMolecular |
private boolean |
isPDB |
private String |
key |
private static byte |
LABEL |
private char |
lastAltLoc |
private String |
lastDisorderAssembly |
private static byte |
MODEL_NO |
private String |
molecularType |
private int |
nMolecular |
private static byte |
NONE |
private static byte |
NONPOLY_COMP_ID |
private static byte |
NONPOLY_ENTITY_ID |
private static byte |
NONPOLY_NAME |
private static String[] |
nonpolyFields |
private static byte |
OCCUPANCY |
private int |
propertyCount |
private int[] |
propertyOf |
private Point3f |
ptOffset |
private static byte |
SEQ_ID |
private static byte |
SERIAL_NO |
private static byte |
SHEET_ID |
private static byte |
SITE_ASYM_ID |
private static byte |
SITE_COMP_ID |
private static byte |
SITE_ID |
private static byte |
SITE_INS_CODE |
private static byte |
SITE_SEQ_ID |
private static byte |
STRAND_ID |
private static byte |
STRUCT_ID |
private static String[] |
structConfFields |
private static String[] |
structSheetRangeFields |
private static String[] |
structSiteRangeFields |
private static byte |
SYM_EQUIV_XYZ |
private static String[] |
symmetryOperationsFields |
private static byte |
SYMOP_XYZ |
private String |
thisDataSetName |
private String |
thisFormula |
private String |
thisStructuralFormula |
private CifDataReader |
tokenizer |
private static String[] |
TransformFields |
private static byte |
TYPE_SYMBOL |
private static byte |
U_ISO_OR_EQUIV |
addVibrations, ANGSTROMS_PER_BOHR, applySymmetryToBonds, atomSetCollection, bsFilter, bsModels, calculationType, continuing, desiredModelNumber, desiredVibrationNumber, doApplySymmetry, doc, doCheckUnitCell, doPackUnitCell, doProcessLines, filter, filterHetero, getHeader, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, isBinary, isSequential, isTrajectory, latticeCells, line, matUnitCellOrientation, modelNumber, next, notionalUnitCell, os, prevline, ptLine, reader, readerName, readMolecularOrbitals, spaceGroup, stateScriptVersionInt, supercell, symmetry, templateAtomCount, useAltNames, vibrationNumber, viewer
Constructor and Description |
---|
CifReader() |
Modifier and Type | Method and Description |
---|---|
private void |
addHetero(String groupName,
String hetName) |
private void |
addNewBond(int i,
int j)
add the bond and mark it for molecular processing
|
void |
applySymmetryAndSetTrajectory() |
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.
|
private int |
fieldProperty(int i) |
protected boolean |
filterAtom(Atom atom,
int iAtom) |
protected void |
finalizeReader() |
private boolean |
getData() |
void |
initializeReader() |
private static boolean |
isMatch(String str1,
String str2) |
private void |
parseLoopParameters(String[] fields)
sets up arrays and variables for tokenizer.getData()
|
(package private) boolean |
processAtomSiteLoopBlock(boolean isLigand)
reads atom data in any order
|
private 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 6
|
private void |
processChemCompLoopBlock()
a general name definition field.
|
private String |
processChemicalInfo(String type)
reads some of the more interesting info
into specific atomSetAuxiliaryInfo elements
|
private void |
processDataParameter()
initialize a new atom set
|
private 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.
|
private void |
processLigandBondLoopBlock() |
private void |
processLoopBlock()
processes loop_ blocks of interest or skips the data
|
private void |
processNonpolyData() |
private void |
processNonpolyLoopBlock()
a HETERO name definition field.
|
private void |
processStructConfLoopBlock()
identifies ranges for HELIX and TURN
|
private void |
processStructSheetRangeLoopBlock()
identifies sheet ranges
|
private void |
processStructSiteBlock()
identifies structure sites
|
private void |
processSymmetryOperationsLoopBlock()
retrieves symmetry operations
|
private void |
processSymmetrySpaceGroupName()
done by AtomSetCollectionReader
|
private void |
processUnitCellTransformMatrix()
the PDB transformation matrix cartesian --> fractional
|
String |
readLine() |
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 atomSetCollection.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
|
private void |
setBs(Atom[] atoms,
int iatom,
BitSet[] bsBonds,
BitSet bs)
iteratively run through connected atoms, adding them to the set
|
private void |
skipLoop()
skips all associated loop data
|
addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, appendLoadNote, checkFilter, checkLastModel, checkLine, checkLineForScript, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains, discardLinesUntilNonBlank, discardLinesUntilStartsWith, doGetModel, doGetVibration, fillDataBlock, fillDataBlock, fillFloatArray, fillFrequencyData, getElementSymbol, getFortranFormatLengths, getStrings, getSymmetry, getTokens, getTokens, getTokens, getTokensFloat, initializeSymmetry, isLastModel, newAtomSet, parseFloat, parseFloat, parseFloat, parseInt, parseInt, parseInt, parseInt, parseStringInfestedFloatArray, parseToken, parseToken, parseToken, parseTokenNext, parseTrimmed, parseTrimmed, processBinaryDocument, processXml, read3Vectors, readData, readLines, set2D, setAtomCoord, setAtomCoord, setFilter, setFractionalCoordinates, setIsPDB, setMOData, setPdb, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem
private CifDataReader tokenizer
private String thisDataSetName
private String chemicalName
private String thisStructuralFormula
private String thisFormula
private boolean iHaveDesiredModel
private boolean isPDB
private boolean isMolecular
private String molecularType
private char lastAltLoc
private int configurationPtr
private int conformationIndex
private int nMolecular
public static final String[] cellParamNames
private static final String[] TransformFields
private String key
private String data
private String disorderAssembly
private String lastDisorderAssembly
private static final byte ATOM_TYPE_SYMBOL
private static final byte ATOM_TYPE_OXIDATION_NUMBER
private static final String[] atomTypeFields
private static final byte NONE
private static final byte TYPE_SYMBOL
private static final byte LABEL
private static final byte AUTH_ATOM
private static final byte FRACT_X
private static final byte FRACT_Y
private static final byte FRACT_Z
private static final byte CARTN_X
private static final byte CARTN_Y
private static final byte CARTN_Z
private static final byte OCCUPANCY
private static final byte B_ISO
private static final byte COMP_ID
private static final byte ASYM_ID
private static final byte SEQ_ID
private static final byte INS_CODE
private static final byte ALT_ID
private static final byte GROUP_PDB
private static final byte MODEL_NO
private static final byte DUMMY_ATOM
private static final byte DISORDER_GROUP
private static final byte ANISO_LABEL
private static final byte ANISO_MMCIF_ID
private static final byte ANISO_U11
private static final byte ANISO_U22
private static final byte ANISO_U33
private static final byte ANISO_U12
private static final byte ANISO_U13
private static final byte ANISO_U23
private static final byte ANISO_MMCIF_U11
private static final byte ANISO_MMCIF_U22
private static final byte ANISO_MMCIF_U33
private static final byte ANISO_MMCIF_U12
private static final byte ANISO_MMCIF_U13
private static final byte ANISO_MMCIF_U23
private static final byte U_ISO_OR_EQUIV
private static final byte ANISO_B11
private static final byte ANISO_B22
private static final byte ANISO_B33
private static final byte ANISO_B12
private static final byte ANISO_B13
private static final byte ANISO_B23
private static final byte ANISO_Beta_11
private static final byte ANISO_Beta_22
private static final byte ANISO_Beta_33
private static final byte ANISO_Beta_12
private static final byte ANISO_Beta_13
private static final byte ANISO_Beta_23
private static final byte ADP_TYPE
private static final byte CHEM_COMP_AC_ID
private static final byte CHEM_COMP_AC_NAME
private static final byte CHEM_COMP_AC_SYM
private static final byte CHEM_COMP_AC_CHARGE
private static final byte CHEM_COMP_AC_X
private static final byte CHEM_COMP_AC_Y
private static final byte CHEM_COMP_AC_Z
private static final byte CHEM_COMP_AC_X_IDEAL
private static final byte CHEM_COMP_AC_Y_IDEAL
private static final byte CHEM_COMP_AC_Z_IDEAL
private static final byte DISORDER_ASSEMBLY
private static final String[] atomFields
private static final byte CHEM_COMP_BOND_ATOM_ID_1
private static final byte CHEM_COMP_BOND_ATOM_ID_2
private static final byte CHEM_COMP_BOND_VALUE_ORDER
private static final byte CHEM_COMP_BOND_AROMATIC_FLAG
private static final String[] chemCompBondFields
private static final byte GEOM_BOND_ATOM_SITE_LABEL_1
private static final byte GEOM_BOND_ATOM_SITE_LABEL_2
private static final byte GEOM_BOND_DISTANCE
private static final String[] geomBondFields
private static final byte NONPOLY_ENTITY_ID
private static final byte NONPOLY_NAME
private static final byte NONPOLY_COMP_ID
private static final String[] nonpolyFields
private String[] hetatmData
private static final byte CHEM_COMP_ID
private static final byte CHEM_COMP_NAME
private static final String[] chemCompFields
private static final byte CONF_TYPE_ID
private static final byte BEG_ASYM_ID
private static final byte BEG_SEQ_ID
private static final byte BEG_INS_CODE
private static final byte END_ASYM_ID
private static final byte END_SEQ_ID
private static final byte END_INS_CODE
private static final byte STRUCT_ID
private static final byte SERIAL_NO
private static final byte HELIX_CLASS
private static final String[] structConfFields
private static final byte SHEET_ID
private static final byte STRAND_ID
private static final String[] structSheetRangeFields
private static final byte SITE_ID
private static final byte SITE_COMP_ID
private static final byte SITE_ASYM_ID
private static final byte SITE_SEQ_ID
private static final byte SITE_INS_CODE
private static final String[] structSiteRangeFields
private static final byte SYMOP_XYZ
private static final byte SYM_EQUIV_XYZ
private static final String[] symmetryOperationsFields
String field
private char firstChar
private int[] propertyOf
private byte[] fieldOf
private int propertyCount
private float[] atomRadius
private BitSet[] bsConnected
private BitSet[] bsSets
private final Point3f ptOffset
private BitSet bsMolecule
private BitSet bsExclude
private int firstAtom
private int atomCount
private Atom[] atoms
public void initializeReader() throws Exception
initializeReader
in class AtomSetCollectionReader
Exception
protected void finalizeReader() throws Exception
finalizeReader
in class AtomSetCollectionReader
Exception
public void applySymmetryAndSetTrajectory() throws Exception
applySymmetryAndSetTrajectory
in class AtomSetCollectionReader
Exception
private void processDataParameter()
private String processChemicalInfo(String type) throws Exception
type
- "name" "formula" etc.Exception
private void processSymmetrySpaceGroupName() throws Exception
Exception
private void processCellParameter() throws Exception
Exception
private void processUnitCellTransformMatrix() throws Exception
Exception
private boolean getData() throws Exception
Exception
private void processLoopBlock() throws Exception
Exception
private void processAtomTypeLoopBlock() throws Exception
Exception
boolean processAtomSiteLoopBlock(boolean isLigand) throws Exception
isLigand
- Exception
protected boolean filterAtom(Atom atom, int iAtom)
filterAtom
in class AtomSetCollectionReader
private void processLigandBondLoopBlock() throws Exception
Exception
private void processGeomBondLoopBlock() throws Exception
Exception
private void processNonpolyData()
private void processChemCompLoopBlock() throws Exception
Exception
private void processNonpolyLoopBlock() throws Exception
Exception
private void processStructConfLoopBlock() throws Exception
Exception
private void processStructSheetRangeLoopBlock() throws Exception
Exception
private void processStructSiteBlock() throws Exception
Exception
private void processSymmetryOperationsLoopBlock() throws Exception
Exception
private int fieldProperty(int i)
private void parseLoopParameters(String[] fields) throws Exception
fields
- Exception
public String readLine() throws Exception
readLine
in interface JmolLineReader
readLine
in class AtomSetCollectionReader
Exception
private void disableField(int fieldIndex)
fieldIndex
- private static boolean isMatch(String str1, String str2)
str1
- str2
- private void setBondingAndMolecules()
private boolean createBonds(boolean doInit)
doInit
- private void addNewBond(int i, int j)
i
- j
-