org.jmol.adapter.readers.more
Class Mol2Reader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.more.ForceFieldReader
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.
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, 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, 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 |
nAtoms
private int nAtoms
atomCount
private int atomCount
isPDB
private boolean isPDB
lastSequenceNumber
private int lastSequenceNumber
chainID
private char chainID
Mol2Reader
public Mol2Reader()
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)
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