org.jmol.adapter.readers.more
Class Mol2Reader

java.lang.Object
  extended by org.jmol.adapter.smarter.AtomSetCollectionReader
      extended by org.jmol.adapter.readers.more.ForceFieldReader
          extended by org.jmol.adapter.readers.more.Mol2Reader

public class Mol2Reader
extends ForceFieldReader

A minimal multi-file reader for TRIPOS SYBYL mol2 files.

http://www.tripos.com/data/support/mol2.pdf PDB note: Note that mol2 format of PDB files is quite minimal. All we get is the PDB atom name, coordinates, residue number, and residue name No chain terminator, not chain designator, no element symbol. Chains based on numbering reset just labeled A B C D .... Z a b c d .... z Element symbols based on reasoned guess and properties of hetero groups So this is just a hack -- trying to guess at all of these.


Field Summary
private  int atomCount
           
private  char chainID
           
private  boolean isPDB
           
private  int lastSequenceNumber
           
private  int nAtoms
           
 
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
Mol2Reader()
           
 
Method Summary
 boolean checkLine()
           
protected  void initializeReader()
           
private  void processMolecule()
           
private  void readAtoms(int atomCount, boolean iHaveCharges)
           
private  void readBonds(int bondCount)
           
private  void readCrystalInfo()
           
private  void readResInfo(int resCount)
           
 
Methods inherited from class org.jmol.adapter.readers.more.ForceFieldReader
deducePdbElementSymbol, getElementSymbol, setUserAtomTypes
 
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, applySymmetryAndSetTrajectory, checkFilter, checkLastModel, checkLineForScript, checkLineForScript, clearLatticeParameters, cloneLastAtomSet, createSpaceGroup, discardLines, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains, discardLinesUntilNonBlank, discardLinesUntilStartsWith, doGetModel, doGetVibration, fillDataBlock, fillDataBlock, fillFloatArray, fillFrequencyData, filterAtom, finalizeReader, 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

nAtoms

private int nAtoms

atomCount

private int atomCount

isPDB

private boolean isPDB

lastSequenceNumber

private int lastSequenceNumber

chainID

private char chainID
Constructor Detail

Mol2Reader

public Mol2Reader()
Method Detail

initializeReader

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

checkLine

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

processMolecule

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

readAtoms

private void readAtoms(int atomCount,
                       boolean iHaveCharges)
                throws java.lang.Exception
Throws:
java.lang.Exception

readBonds

private void readBonds(int bondCount)
                throws java.lang.Exception
Throws:
java.lang.Exception

readResInfo

private void readResInfo(int resCount)
                  throws java.lang.Exception
Throws:
java.lang.Exception

readCrystalInfo

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