MOReader
Date: 2019-10-22

org.jmol.adapter.readers.quantum

## Class MOReader

- java.lang.Object
- - org.jmol.adapter.smarter.AtomSetCollectionReader
  - - org.jmol.adapter.readers.quantum.BasisFunctionReader
    - - org.jmol.adapter.readers.quantum.MOReader

- All Implemented Interfaces:
    javajs.api.GenericLineReader
  Direct Known Subclasses:
    GamessReader, GaussianReader, GenNBOReader, JaguarReader, NWChemReader, PsiReader, QchemReader

      public class MOReader
      extends BasisFunctionReader

  General methods for reading molecular orbital data, including embedded output from the NBO program. In particular, when the AONBO keyword is included. requires the following sort of construct: public AtomSetCollection readAtomSetCollection(BufferedReader reader) { readAtomSetCollection(reader, "some type"); } protected boolean checkLine() { if (line.indexOf(...)) { doThis(); return true/false; } if (line.indexOf(...)) { doThat(); return true/false; } return checkNboLine(); }

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader

      `BasisFunctionReader.MOEnergySorter`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `allowNoOrbitals`
    `private static java.lang.String` | `DC_LIST`
    `private static java.lang.String` | `DS_LIST`
    `protected java.lang.String` | `energyUnits`
    `private static java.lang.String` | `FC_LIST`
    `private static java.lang.String` | `FS_LIST`
    `int` | `gaussianCount`
    `float[][]` | `gaussians`
    `private boolean` | `getNBOCharges`
    `private boolean` | `getNBOs`
    `private boolean` | `haveCoeffMap`
    `protected boolean` | `haveNboCharges`
    `protected boolean` | `haveNboOrbitals`
    `protected int` | `HEADER_GAMESS_OCCUPANCIES`
    `protected int` | `HEADER_GAMESS_ORIGINAL`
    `protected int` | `HEADER_GAMESS_UK_MO`
    `protected int` | `HEADER_NONE`
    `private int` | `iMo0`
    `private java.util.Map<java.lang.String,java.lang.Object>` | `lastMoData`
    `protected javajs.util.Lst<java.lang.String>` | `moTypes`
    `protected boolean` | `orbitalsRead`
    `private static java.lang.String` | `P_LIST`
    `int` | `shellCount`

    - ### Fields inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader

      `alphaBeta, dfCoefMaps, ignoreMOs, moData, nCoef, nOrbitals, orbitalMaps, orbitals, shells`

    - ### 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
    `MOReader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCoef(java.util.Map<java.lang.String,java.lang.Object> mo, float[] coefs, java.lang.String type, float energy, float occ, int moCount)`
    `protected void` | `addMOData(int nColumns, javajs.util.Lst<java.lang.String>[] data, java.util.Map<java.lang.String,java.lang.Object>[] mos)`
    `boolean` | `checkAndRemoveFilterKey(java.lang.String key)` Prior to filterMO all extraneous filter keys must be removed.
    `protected boolean` | `checkNboLine()`
    `protected void` | `getMOHeader(int headerType, java.lang.String[] tokens, java.util.Map<java.lang.String,java.lang.Object>[] mos, int nThisLine)`
    `private void` | `getNboCharges()`
    `protected void` | `getNboTypes()`
    `protected void` | `initializeReader()`
    `protected void` | `readMolecularOrbitals(int headerType)`
    `private void` | `readSecondOrderData()`
    `void` | `setMOData(boolean clearOrbitals)`

    - ### Methods inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader

      `canonicalizeQuantumSubshellTag, clearOrbitals, discardPreviousAtoms, enableShell, filterMO, fixSlaterTypes, getDfCoefMaps, getDFMap, getQuantumShellTag, getQuantumShellTagID, getQuantumShellTagIDSpherical, setMO`

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

      `addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymmetryAndSetTrajectory, applySymTrajASCR, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLine, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, 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

    - #### shellCount

          public int shellCount

    - #### gaussianCount

          public int gaussianCount

    - #### gaussians

          public float[][] gaussians

    - #### energyUnits

          protected java.lang.String energyUnits

    - #### moTypes

          protected javajs.util.Lst<java.lang.String> moTypes

    - #### getNBOs

          private boolean getNBOs

    - #### getNBOCharges

          private boolean getNBOCharges

    - #### haveNboCharges

          protected boolean haveNboCharges

    - #### haveNboOrbitals

          protected boolean haveNboOrbitals

    - #### orbitalsRead

          protected boolean orbitalsRead

    - #### lastMoData

          private java.util.Map<java.lang.String,java.lang.Object> lastMoData

    - #### allowNoOrbitals

          protected boolean allowNoOrbitals

    - #### HEADER_GAMESS_UK_MO

          protected final int HEADER_GAMESS_UK_MO

      See Also:
        Constant Field Values

    - #### HEADER_GAMESS_OCCUPANCIES

          protected final int HEADER_GAMESS_OCCUPANCIES

      See Also:
        Constant Field Values

    - #### HEADER_GAMESS_ORIGINAL

          protected final int HEADER_GAMESS_ORIGINAL

      See Also:
        Constant Field Values

    - #### HEADER_NONE

          protected final int HEADER_NONE

      See Also:
        Constant Field Values

    - #### haveCoeffMap

          private boolean haveCoeffMap

    - #### P_LIST

          private static final java.lang.String P_LIST

      See Also:
        Constant Field Values

    - #### DS_LIST

          private static final java.lang.String DS_LIST

      See Also:
        Constant Field Values

    - #### DC_LIST

          private static final java.lang.String DC_LIST

      See Also:
        Constant Field Values

    - #### FS_LIST

          private static final java.lang.String FS_LIST

      See Also:
        Constant Field Values

    - #### FC_LIST

          private static java.lang.String FC_LIST

    - #### iMo0

          private int iMo0

  - ### Constructor Detail

    - #### MOReader

          public MOReader()

  - ### Method Detail

    - #### initializeReader

          protected void initializeReader()
                                   throws java.lang.Exception

      Overrides:
        `initializeReader` in class `AtomSetCollectionReader`
      Throws:
        `java.lang.Exception`

    - #### checkAndRemoveFilterKey

          public boolean checkAndRemoveFilterKey(java.lang.String key)

      Prior to filterMO all extraneous filter keys must be removed.
      Parameters:
        `key` -
      Returns:
        true if the key existed; filter is set null if this is the only key

    - #### checkNboLine

          protected boolean checkNboLine()
                                  throws java.lang.Exception

      Returns:
        true if need to read line
      Throws:
        `java.lang.Exception`

    - #### getNboCharges

          private void getNboCharges()
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getNboTypes

          protected void getNboTypes()
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readMolecularOrbitals

          protected void readMolecularOrbitals(int headerType)
                                        throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### addCoef

          public void addCoef(java.util.Map<java.lang.String,java.lang.Object> mo,
                              float[] coefs,
                              java.lang.String type,
                              float energy,
                              float occ,
                              int moCount)

    - #### getMOHeader

          protected void getMOHeader(int headerType,
                                     java.lang.String[] tokens,
                                     java.util.Map<java.lang.String,java.lang.Object>[] mos,
                                     int nThisLine)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### addMOData

          protected void addMOData(int nColumns,
                                   javajs.util.Lst<java.lang.String>[] data,
                                   java.util.Map<java.lang.String,java.lang.Object>[] mos)

    - #### setMOData

          public void setMOData(boolean clearOrbitals)

    - #### readSecondOrderData

          private void readSecondOrderData()
                                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`