org.jmol.adapter.readers.more
Class Mol2Reader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.more.FFReader
org.jmol.adapter.readers.more.Mol2Reader
public class Mol2Reader
- extends FFReader
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.
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader |
ANGSTROMS_PER_BOHR, applySymmetryToBonds, atomSetCollection, bsFilter, bsModels, calculationType, doApplySymmetry, filter, getHeader, haveAtomFilter, havePartialChargeFilter, htParams, ignoreFileSymmetryOperators, ignoreFileUnitCell, iHaveSymmetryOperators, iHaveUnitCell, isTrajectory, latticeCells, line, modelNumber, needToApplySymmetry, next, prevline, reader, readerName, spaceGroup, templateAtomCount |
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader |
addJmolScript, addPrimitiveLatticeVector, addSites, applySymmetryAndSetTrajectory, checkLineForScript, checkLineForScript, clearLatticeParameters, deducePdbElementSymbol, discardLines, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilNonBlank, discardLinesUntilStartsWith, doGetModel, fillDataBlock, filterAtom, filterAtom, getElementSymbol, getStrings, getTokens, getTokens, getTokens, getTokensFloat, isLastModel, newAtomSet, parseFloat, parseFloat, parseFloat, parseInt, parseInt, parseInt, parseInt, parseToken, parseToken, parseToken, parseTokenNext, parseTrimmed, parseTrimmed, readAtomSetCollectionFromDOM, readData, readData, readLine, readLineTrimmed, setAtomCoord, setAtomCoord, setError, 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 |
nAtoms
private int nAtoms
atomCount
private int atomCount
isPDB
private boolean isPDB
lastSequenceNumber
private int lastSequenceNumber
chainID
private char chainID
Mol2Reader
public Mol2Reader()
readAtomSetCollection
public void readAtomSetCollection(java.io.BufferedReader reader)
- Specified by:
readAtomSetCollection
in class AtomSetCollectionReader
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