org.jmol.adapter.readers.cifpdb
Class PdbReader

java.lang.Object
  extended by org.jmol.adapter.smarter.AtomSetCollectionReader
      extended by org.jmol.adapter.readers.cifpdb.PdbReader
Direct Known Subclasses:
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  int atomCount
           
private  List biomolecules
           
private  List biomts
           
private  int[] chainAtomCounts
           
(package private)  String compnd
           
private  int configurationPtr
           
private  int conformationIndex
           
private  Hashtable currentCompnd
           
private  String currentGroup3
           
private  String currentKey
           
private  int currentResno
           
private  boolean haveMappedSerials
           
private  Hashtable htElementsInCurrentGroup
           
private  Hashtable htFormul
           
private  Hashtable htHetero
           
private  Hashtable htMolIds
           
private  Hashtable htSites
           
private  int iAtom
           
private  boolean isMultiModel
           
private  char lastAltLoc
           
private  String lastAtomData
           
private  int lastAtomIndex
           
private  int lastGroup
           
private  char lastInsertion
           
private  int lineLength
           
private static String lineOptions
           
private  int maxSerial
           
private  int nRes
           
private  int nUNK
           
private  StringBuffer pdbHeader
           
private  boolean resetKey
           
private  StringBuffer sbConect
           
(package private)  StringBuffer sbIgnored
           
(package private)  StringBuffer sbSelected
           
private  int serial
           
private  List vCompnds
           
 
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addVibrations, ANGSTROMS_PER_BOHR, applySymmetryToBonds, atomSetCollection, bsFilter, bsModels, calculationType, continuing, desiredModelNumber, desiredVibrationNumber, doApplySymmetry, doCheckUnitCell, doProcessLines, filter, getHeader, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, iHaveSymmetryOperators, iHaveUnitCell, isSequential, isTrajectory, latticeCells, line, matUnitCellOrientation, modelNumber, next, notionalUnitCell, os, prevline, ptLine, reader, readerName, readMolecularOrbitals, spaceGroup, symmetry, templateAtomCount, vibrationNumber, viewer
 
Constructor Summary
PdbReader()
           
 
Method Summary
private  void anisou()
           
 void applySymmetryAndSetTrajectory()
           
private  void atom(int serial)
           
protected  boolean checkLine()
           
private  void checkNotPDB()
           
private  void compndOld()
           
private  void compndSource(boolean isSource)
           
private  void conect()
           
private  void cryst1()
           
private  String deduceElementSymbol(boolean isHetero)
           
private  void expdta()
           
protected  boolean filterAtom(Atom atom, int iAtom)
           
protected  void finalizeReader()
           
private  void formul()
           
private  float getFloat(int ich, int cch)
           
private  int getModelNumber()
           
private  void header()
           
private  void het()
           
private  void hetnam()
           
protected  void initializeReader()
           
private  void model(int modelNumber)
           
protected  float readBFactor()
           
protected  int readOccupancy()
           
protected  float readPartialCharge()
           
protected  float readRadius()
           
private  void remark290()
           
private  void remark350()
           
private  void scale(int n)
           
private  void setBiomoleculeAtomCounts()
           
private  void site()
           
private  void structure()
           
 
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, checkFilter, checkLastModel, checkLineForScript, checkLineForScript, clearLatticeParameters, cloneLastAtomSet, discardLines, 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, readAtomSetCollectionFromDOM, readData, readLine, set2D, setAtomCoord, setAtomCoord, setFilter, setFractionalCoordinates, setMOData, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineLength

private int lineLength

htFormul

private final Hashtable htFormul

htHetero

private Hashtable htHetero

htSites

private Hashtable htSites

currentGroup3

private String currentGroup3

currentResno

private int currentResno

htElementsInCurrentGroup

private Hashtable 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

vCompnds

private List vCompnds

currentCompnd

private Hashtable currentCompnd

currentKey

private String currentKey

htMolIds

private Hashtable htMolIds

resetKey

private boolean resetKey

compnd

String compnd

biomolecules

private List biomolecules

biomts

private List 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

StringBuffer sbIgnored

sbSelected

StringBuffer sbSelected

sbConect

private StringBuffer sbConect

haveMappedSerials

private boolean haveMappedSerials
Constructor Detail

PdbReader

public PdbReader()
Method Detail

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

applySymmetryAndSetTrajectory

public void applySymmetryAndSetTrajectory()
                                   throws Exception
Overrides:
applySymmetryAndSetTrajectory in class AtomSetCollectionReader
Throws:
Exception

header

private void header()

compndOld

private void compndOld()

compndSource

private void compndSource(boolean isSource)

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

readOccupancy

protected int readOccupancy()

readBFactor

protected float readBFactor()

readPartialCharge

protected float readPartialCharge()

readRadius

protected float readRadius()

deduceElementSymbol

private String deduceElementSymbol(boolean isHetero)

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()