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  java.util.List biomolecules
           
private  java.util.List biomts
           
private  int[] chainAtomCounts
           
(package private)  java.lang.String compnd
           
private  int configurationPtr
           
private  int conformationIndex
           
private  java.util.Hashtable currentCompnd
           
private  java.lang.String currentGroup3
           
private  java.lang.String currentKey
           
private  int currentResno
           
private  boolean haveMappedSerials
           
private  java.util.Hashtable htElementsInCurrentGroup
           
private  java.util.Hashtable htFormul
           
private  java.util.Hashtable htHetero
           
private  java.util.Hashtable htMolIds
           
private  java.util.Hashtable htSites
           
private  int iAtom
           
private  boolean isMultiModel
           
private  char lastAltLoc
           
private  java.lang.String lastAtomData
           
private  int lastAtomIndex
           
private  int lastGroup
           
private  char lastInsertion
           
private  int lineLength
           
private static java.lang.String lineOptions
           
private  int maxSerial
           
private  int nRes
           
private  int nUNK
           
private  java.lang.StringBuffer pdbHeader
           
private  boolean resetKey
           
private  java.lang.StringBuffer sbConect
           
(package private)  java.lang.StringBuffer sbIgnored
           
(package private)  java.lang.StringBuffer sbSelected
           
private  int serial
           
private  java.util.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  java.lang.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, createSpaceGroup, 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 java.util.Hashtable htFormul

htHetero

private java.util.Hashtable htHetero

htSites

private java.util.Hashtable htSites

currentGroup3

private java.lang.String currentGroup3

currentResno

private int currentResno

htElementsInCurrentGroup

private java.util.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 java.lang.String lineOptions
See Also:
Constant Field Values

serial

private int serial

pdbHeader

private java.lang.StringBuffer pdbHeader

configurationPtr

private int configurationPtr

vCompnds

private java.util.List vCompnds

currentCompnd

private java.util.Hashtable currentCompnd

currentKey

private java.lang.String currentKey

htMolIds

private java.util.Hashtable htMolIds

resetKey

private boolean resetKey

compnd

java.lang.String compnd

biomolecules

private java.util.List biomolecules

biomts

private java.util.List biomts

atomCount

private int atomCount

lastAtomData

private java.lang.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

java.lang.StringBuffer sbIgnored

sbSelected

java.lang.StringBuffer sbSelected

sbConect

private java.lang.StringBuffer sbConect

haveMappedSerials

private boolean haveMappedSerials
Constructor Detail

PdbReader

public PdbReader()
Method Detail

initializeReader

protected void initializeReader()
                         throws java.lang.Exception
Overrides:
initializeReader in class AtomSetCollectionReader
Throws:
java.lang.Exception

checkLine

protected boolean checkLine()
                     throws java.lang.Exception
Overrides:
checkLine in class AtomSetCollectionReader
Returns:
true if need to read new line
Throws:
java.lang.Exception

finalizeReader

protected void finalizeReader()
                       throws java.lang.Exception
Overrides:
finalizeReader in class AtomSetCollectionReader
Throws:
java.lang.Exception

applySymmetryAndSetTrajectory

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

header

private void header()

compndOld

private void compndOld()

compndSource

private void compndSource(boolean isSource)

setBiomoleculeAtomCounts

private void setBiomoleculeAtomCounts()

remark350

private void remark350()
                throws java.lang.Exception
Throws:
java.lang.Exception

remark290

private void remark290()
                throws java.lang.Exception
Throws:
java.lang.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 java.lang.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 java.lang.Exception
Throws:
java.lang.Exception

getFloat

private float getFloat(int ich,
                       int cch)
                throws java.lang.Exception
Throws:
java.lang.Exception

scale

private void scale(int n)
            throws java.lang.Exception
Throws:
java.lang.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()