org.jmol.adapter.readers.cifpdb
Class PdbReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.cifpdb.PdbReader
- Direct Known Subclasses:
- P2nReader, PqrReader
public class PdbReader
- extends AtomSetCollectionReader
PDB file reader.
http://www.rcsb.org
- Author:
- Miguel, Egon, and Bob (hansonr@stolaf.edu)
symmetry added by Bob Hanson:
setFractionalCoordinates()
setSpaceGroupName()
setUnitCell()
initializeCartesianToFractional();
setUnitCellItem()
setAtomCoord()
applySymmetryAndSetTrajectory()
|
Field Summary |
private boolean |
applySymmetry
|
private int |
atomCount
|
private List<Map<String,Object>> |
biomolecules
|
private List<Matrix4f> |
biomts
|
private int[] |
chainAtomCounts
|
private String |
compnd
|
private int |
configurationPtr
|
private int |
conformationIndex
|
private Map<String,String> |
currentCompnd
|
private String |
currentGroup3
|
private String |
currentKey
|
private int |
currentResno
|
private boolean |
haveDoubleBonds
|
private boolean |
haveMappedSerials
|
private Map<String,Boolean> |
htElementsInCurrentGroup
|
private Map<String,Map<String,Boolean>> |
htFormul
|
private Map<String,String> |
htHetero
|
private Map<String,Map<String,String>> |
htMolIds
|
private Map<String,Map<String,Object>> |
htSites
|
private int |
iAtom
|
private boolean |
isConnectStateBug
|
private boolean |
isMultiModel
|
private char |
lastAltLoc
|
private String |
lastAtomData
|
private int |
lastAtomIndex
|
private int |
lastGroup
|
private char |
lastInsertion
|
private int |
lastSourceSerial
|
private int |
lastTargetSerial
|
private int |
lineLength
|
private static String |
lineOptions
|
private int |
maxSerial
|
private int |
nRes
|
private int |
nUNK
|
private StringBuffer |
pdbHeader
|
private boolean |
resetKey
|
private StringBuffer |
sb
|
private StringBuffer |
sbConect
|
private StringBuffer |
sbIgnored
|
private StringBuffer |
sbSelected
|
private int |
serial
|
private List<Map<String,String>> |
vCompnds
|
| Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader |
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 |
| Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader |
addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, appendLoadNote, applySymmetryAndSetTrajectory, checkFilter, checkLastModel, 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, readLine, readLines, set2D, setAtomCoord, setAtomCoord, setFilter, setFractionalCoordinates, setIsPDB, setMOData, setPdb, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lineLength
private int lineLength
htFormul
private final Map<String,Map<String,Boolean>> htFormul
htHetero
private Map<String,String> htHetero
htSites
private Map<String,Map<String,Object>> htSites
currentGroup3
private String currentGroup3
currentResno
private int currentResno
htElementsInCurrentGroup
private Map<String,Boolean> htElementsInCurrentGroup
maxSerial
private int maxSerial
chainAtomCounts
private int[] chainAtomCounts
nUNK
private int nUNK
nRes
private int nRes
isMultiModel
private boolean isMultiModel
lineOptions
private static final String lineOptions
- See Also:
- Constant Field Values
serial
private int serial
pdbHeader
private StringBuffer pdbHeader
configurationPtr
private int configurationPtr
applySymmetry
private boolean applySymmetry
isConnectStateBug
private boolean isConnectStateBug
vCompnds
private List<Map<String,String>> vCompnds
currentCompnd
private Map<String,String> currentCompnd
currentKey
private String currentKey
htMolIds
private Map<String,Map<String,String>> htMolIds
resetKey
private boolean resetKey
compnd
private String compnd
biomolecules
private List<Map<String,Object>> biomolecules
biomts
private List<Matrix4f> biomts
atomCount
private int atomCount
lastAtomData
private String lastAtomData
lastAtomIndex
private int lastAtomIndex
iAtom
private int iAtom
lastGroup
private int lastGroup
lastInsertion
private char lastInsertion
lastAltLoc
private char lastAltLoc
conformationIndex
private int conformationIndex
sbIgnored
private StringBuffer sbIgnored
sbSelected
private StringBuffer sbSelected
sbConect
private StringBuffer sbConect
sb
private StringBuffer sb
lastSourceSerial
private int lastSourceSerial
lastTargetSerial
private int lastTargetSerial
haveDoubleBonds
private boolean haveDoubleBonds
haveMappedSerials
private boolean haveMappedSerials
PdbReader
public PdbReader()
initializeReader
protected void initializeReader()
throws Exception
- Overrides:
initializeReader in class AtomSetCollectionReader
- Throws:
Exception
checkLine
protected boolean checkLine()
throws Exception
- Overrides:
checkLine in class AtomSetCollectionReader
- Returns:
- true if need to read new line
- Throws:
Exception
finalizeReader
protected void finalizeReader()
throws Exception
- Overrides:
finalizeReader in class AtomSetCollectionReader
- Throws:
Exception
header
private void header()
title
private void title()
compndSource
private void compndSource(boolean isSource)
compndOld
private void compndOld()
setBiomoleculeAtomCounts
private void setBiomoleculeAtomCounts()
remark350
private void remark350()
throws Exception
- Throws:
Exception
remark290
private void remark290()
throws Exception
- Throws:
Exception
atom
private void atom(int serial)
filterAtom
protected boolean filterAtom(Atom atom,
int iAtom)
- Overrides:
filterAtom in class AtomSetCollectionReader
- Returns:
- true if we want this atom
setAdditionalAtomParameters
protected void setAdditionalAtomParameters(Atom atom)
- adaptable via subclassing
- Parameters:
atom -
deduceElementSymbol
private String deduceElementSymbol(boolean isHetero)
- The problem here stems from the fact that developers have not fully
understood the PDB specifications -- and that those have changed.
The actual rules are as follows (using 1-based numbering:
1) Chemical symbols may be in columns 77 and 78 for total disambiguity.
2) Only valid chemical symbols should be in columns 13 and 14
These are the first two characters of a four-character field.
3) Four-character atom names for hydrogen necessarily start in
column 13, so when that is the case, if the four-letter
name starts with "H" then it is hydrogen regardless of what
letter comes next. For example, "HG3 " is mercury (and should
be in a HETATM record, not an ATOM record, anyway), but "HG33"
is hydrogen, presumably.
This leave open the ambiguity of a four-letter H name in a
heteroatom set where the symbol is really H, not Hg or Ha, or Ho or Hf, etc.
- Parameters:
isHetero -
- Returns:
- an atom symbol
conect
private void conect()
structure
private void structure()
getModelNumber
private int getModelNumber()
model
private void model(int modelNumber)
checkNotPDB
private void checkNotPDB()
cryst1
private void cryst1()
throws Exception
- Throws:
Exception
getFloat
private float getFloat(int ich,
int cch)
throws Exception
- Throws:
Exception
scale
private void scale(int n)
throws Exception
- Throws:
Exception
expdta
private void expdta()
formul
private void formul()
het
private void het()
hetnam
private void hetnam()
anisou
private void anisou()
site
private void site()