GenNBOReader
Date: 2019-10-22

org.jmol.adapter.readers.quantum

## Class GenNBOReader

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

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class GenNBOReader
      extends MOReader

  NBO file nn reader will pull in other files as necessary acknowledgments: Grange Hermitage, Frank Weinhold upgrade to NBO 6 allows reading of resonance structures, including base structure
  Author:
    hansonr

- - ### 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
    --- | ---
    `private boolean` | `addBetaSet`
    `private boolean` | `alphaOnly`
    `private boolean` | `betaOnly`
    `private static java.lang.String` | `DC_LIST`
    `private static java.lang.String` | `DS_LIST`
    `private static java.lang.String` | `FC_LIST`
    `private static java.lang.String` | `FS_LIST`
    `private static java.lang.String` | `GC_LIST`
    `private static java.lang.String` | `GS_LIST`
    `private static java.lang.String` | `HC_LIST`
    `private static java.lang.String` | `HS_LIST`
    `private static java.lang.String` | `IC_LIST`
    `private static java.lang.String` | `IS_LIST`
    `private boolean` | `is47File`
    `private boolean` | `isOpenShell`
    `private boolean` | `isOutputFile`
    `private int` | `nAOs`
    `(package private) NBOParser` | `nboParser`
    `private java.lang.String` | `nboType`
    `private int` | `nNOs`
    `private int` | `nOrbitals0`
    `private int` | `nStructures`
    `private static java.lang.String` | `P_LIST`
    `private static java.lang.String` | `SP_LIST`
    `private java.lang.String` | `topoType`

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

      `allowNoOrbitals, energyUnits, gaussianCount, gaussians, haveNboCharges, haveNboOrbitals, HEADER_GAMESS_OCCUPANCIES, HEADER_GAMESS_ORIGINAL, HEADER_GAMESS_UK_MO, HEADER_NONE, moTypes, orbitalsRead, 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
    `GenNBOReader()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `checkLine()`
    `private boolean` | `fillSlater(int[] slater, int n, int pt, int ng)`
    `protected void` | `finalizeSubclassReader()` optional reader-specific method run first.
    `private void` | `getAlphasAndExponents()`
    `private boolean` | `getFile31()`
    `private void` | `getFile46()` read the labels from xxxx.46
    `private java.lang.String` | `getFileData(java.lang.String ext)`
    `private int[]` | `getIntData()`
    `private static java.lang.String` | `getLabelKey(java.lang.String labelKey)`
    `private static void` | `getNBOOccupanciesStatic(javajs.util.Lst<java.util.Map<java.lang.String,java.lang.Object>> orbitals, int nAOs, int pt, java.lang.String data, int len, int[] next)`
    `private javajs.util.Lst<java.lang.Object>` | `getStructureList()`
    `private void` | `getStructures(java.lang.String type)`
    `protected void` | `initializeReader()`
    `private boolean` | `readData31(java.lang.String line1)`
    `private void` | `readData46()` read labels and not proper number of NOs, nNOs, for this nboType
    `private void` | `readData47()`
    `private void` | `readMOs()`
    `private void` | `readNBO37Occupancies(int pt)` Read occupancies from .37 file.
    `static boolean` | `readNBOCoefficients(java.util.Map<java.lang.String,java.lang.Object> moData, java.lang.String nboType, Viewer vwr)` Called by setNBOType in IsoExt when use issues NBO TYPE xxx
    `static void` | `setNboLabels(java.lang.String[] tokens, int nLabels, javajs.util.Lst<java.util.Map<java.lang.String,java.lang.Object>> orbitals, int nOrbitals0, java.lang.String moType)`

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

      `addCoef, addMOData, checkAndRemoveFilterKey, checkNboLine, getMOHeader, getNboTypes, readMolecularOrbitals, setMOData`

    - ### 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, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, doGetModel, doGetVibration, doPreSymmetry, fill3x3, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, 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

    - #### isOutputFile

          private boolean isOutputFile

    - #### nboType

          private java.lang.String nboType

    - #### nOrbitals0

          private int nOrbitals0

    - #### is47File

          private boolean is47File

    - #### isOpenShell

          private boolean isOpenShell

    - #### alphaOnly

          private boolean alphaOnly

    - #### betaOnly

          private boolean betaOnly

    - #### nAOs

          private int nAOs

    - #### nNOs

          private int nNOs

    - #### topoType

          private java.lang.String topoType

    - #### nStructures

          private int nStructures

    - #### nboParser

          NBOParser nboParser

    - #### addBetaSet

          private boolean addBetaSet

    - #### P_LIST

          private static java.lang.String P_LIST

    - #### SP_LIST

          private static java.lang.String SP_LIST

    - #### DS_LIST

          private static java.lang.String DS_LIST

    - #### DC_LIST

          private static java.lang.String DC_LIST

    - #### FS_LIST

          private static java.lang.String FS_LIST

    - #### FC_LIST

          private static java.lang.String FC_LIST

    - #### GS_LIST

          private static java.lang.String GS_LIST

    - #### GC_LIST

          private static java.lang.String GC_LIST

    - #### HS_LIST

          private static java.lang.String HS_LIST

    - #### HC_LIST

          private static java.lang.String HC_LIST

    - #### IS_LIST

          private static java.lang.String IS_LIST

    - #### IC_LIST

          private static java.lang.String IC_LIST

  - ### Constructor Detail

    - #### GenNBOReader

          public GenNBOReader()

  - ### Method Detail

    - #### initializeReader

          protected void initializeReader()
                                   throws java.lang.Exception

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

    - #### finalizeSubclassReader

          protected void finalizeSubclassReader()
                                         throws java.lang.Exception

      Description copied from class: `AtomSetCollectionReader`
      optional reader-specific method run first.
      Overrides:
        `finalizeSubclassReader` in class `AtomSetCollectionReader`
      Throws:
        `java.lang.Exception`

    - #### checkLine

          protected boolean checkLine()
                               throws java.lang.Exception

      Overrides:
        `checkLine` in class `AtomSetCollectionReader`
      Returns:
        true if need to read new line
      Throws:
        `java.lang.Exception`

    - #### getStructures

          private void getStructures(java.lang.String type)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getStructureList

          private javajs.util.Lst<java.lang.Object> getStructureList()

    - #### getFileData

          private java.lang.String getFileData(java.lang.String ext)
                                        throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getFile31

          private boolean getFile31()
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getFile46

          private void getFile46()
                          throws java.lang.Exception

      read the labels from xxxx.46
      Throws:
        `java.lang.Exception`

    - #### readData47

          private void readData47()
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getIntData

          private int[] getIntData()
                            throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### fillSlater

          private boolean fillSlater(int[] slater,
                                     int n,
                                     int pt,
                                     int ng)

    - #### getAlphasAndExponents

          private void getAlphasAndExponents()
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readData31

          private boolean readData31(java.lang.String line1)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readData46

          private void readData46()
                           throws java.lang.Exception

      read labels and not proper number of NOs, nNOs, for this nboType
      Throws:
        `java.lang.Exception`

    - #### getLabelKey

          private static java.lang.String getLabelKey(java.lang.String labelKey)

    - #### readNBOCoefficients

          public static boolean readNBOCoefficients(java.util.Map<java.lang.String,java.lang.Object> moData,
                                                    java.lang.String nboType,
                                                    Viewer vwr)

      Called by setNBOType in IsoExt when use issues NBO TYPE xxx
      Parameters:
        `moData` -
        `nboType` -
        `vwr` -
      Returns:
        true if sucessful or false if required file is missing

    - #### getNBOOccupanciesStatic

          private static void getNBOOccupanciesStatic(javajs.util.Lst<java.util.Map<java.lang.String,java.lang.Object>> orbitals,
                                                      int nAOs,
                                                      int pt,
                                                      java.lang.String data,
                                                      int len,
                                                      int[] next)

    - #### readMOs

          private void readMOs()
                        throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readNBO37Occupancies

          private void readNBO37Occupancies(int pt)
                                     throws java.lang.Exception

      Read occupancies from .37 file. Called by readMOs.
      Parameters:
        `pt` -
      Throws:
        `java.lang.Exception`

    - #### setNboLabels

          public static void setNboLabels(java.lang.String[] tokens,
                                          int nLabels,
                                          javajs.util.Lst<java.util.Map<java.lang.String,java.lang.Object>> orbitals,
                                          int nOrbitals0,
                                          java.lang.String moType)