Mol2Reader
Date: 2019-10-22

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

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class Mol2Reader
      extends ForceFieldReader

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

  http://www.tripos.com/data/support/mol2.pdf see also http://www.tripos.com/mol2/atom_types.html 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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `ac`
    `private int` | `chainID`
    `private boolean` | `isPDB`
    `private int` | `lastSequenceNumber`
    `private int` | `nAtoms`

    - ### Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader

      `addedData, addedDataKey, addVibrations, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, binaryDoc, bsFilter, bsModels, calculationType, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterHetero, fixJavaFloat, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isTrajectory, latticeCells, latticeScaling, latticeType, line, lstNCS, matUnitCellOrientation, modDim, modelNumber, ms, mustFinalizeModelSet, next, out, packingError, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Mol2Reader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkLine()`
    `private int` | `getPDBGroupLength(java.lang.String g3)`
    `protected void` | `initializeReader()`
    `private boolean` | `processMolecule()`
    `private void` | `readAtoms(int ac)`
    `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

      `addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymmetryAndSetTrajectory, applySymTrajASCR, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, doPreSymmetry, fill3x3, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, finalizeSubclassReader, finalizeSubclassSymmetry, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFortranFormatLengths, getInterface, getNewSymmetry, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, parseToken, parseTokenNext, parseTokenRange, parseTokenStr, processBinaryDocument, processDOM, rd, read3Vectors, readDataObject, readLines, readNextLine, rejectAtomName, RL, set2D, setAtomCoord, setAtomCoordScaled, setAtomCoordTokens, setAtomCoordXYZ, setChainID, setElementAndIsotope, setFilter, setFilterAtomTypeStr, setFractionalCoordinates, setIsPDB, setLoadNote, setModelPDB, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### nAtoms

          private int nAtoms

    - #### ac

          private int ac

    - #### isPDB

          private boolean isPDB

    - #### lastSequenceNumber

          private int lastSequenceNumber

    - #### chainID

          private int 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 boolean processMolecule()
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readAtoms

          private void readAtoms(int ac)
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getPDBGroupLength

          private int getPDBGroupLength(java.lang.String g3)

    - #### 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`