QCJSONReader
Date: 2019-10-22

org.jmol.adapter.readers.quantum

## Class QCJSONReader

- java.lang.Object
- - org.jmol.adapter.smarter.AtomSetCollectionReader
  - - org.jmol.adapter.readers.quantum.BasisFunctionReader
    - - org.jmol.adapter.readers.quantum.SlaterReader
      - - org.jmol.adapter.readers.quantum.MopacSlaterReader
        - - org.jmol.adapter.readers.quantum.MoldenReader
          - - org.jmol.adapter.readers.quantum.QCJSONReader

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class QCJSONReader
      extends MoldenReader

  A molecular structure and orbital reader for MolDen files. See http://www.cmbi.ru.nl/molden/molden_format.html updated by Bob Hanson for Jmol 12.0/12.1 adding [spacegroup] [operators] [cell] [cellaxes] for Jmol 14.3.7
  Author:
    Matthew Zwier

- - ### Nested Class Summary

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

      `SlaterReader.OrbitalSorter, SlaterReader.SlaterSorter`

    - ### 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` | `haveEnergy`
    `private java.util.Map<java.lang.String,java.lang.Object>` | `job`
    `private int` | `jobCount`
    `(package private) java.lang.String` | `lastBasisID`
    `private int` | `modelCount`

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

      `doSort, loadGeometries, loadVibrations, modelAtomCount, optOnly, orbitalType, vibOnly`

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

      `atomicNumbers, MIN_COEF`

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

      `slaterArray, slaters`

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `finalizeSubclassReader()` optional reader-specific method run first.
    `private static java.util.Map<java.lang.String,java.lang.Object>` | `getMapSafely(java.util.Map<java.lang.String,java.lang.Object> map, java.lang.String key)` Safely get a Map from a Map using a key.
    `protected void` | `initializeReader()`
    `private void` | `processJob(java.util.Map<java.lang.String,java.lang.Object> job)`
    `private boolean` | `readBasis(java.lang.String moBasisID)`
    `private boolean` | `readFreqsAndModes(java.util.ArrayList<java.lang.Object> vibrations)`
    `private boolean` | `readGaussianBasis(java.util.ArrayList<java.lang.Object> listG, java.util.ArrayList<java.lang.Object> listS)`
    `private boolean` | `readMolecularOrbitals(java.util.Map<java.lang.String,java.lang.Object> molecular_orbitals)` Read basis and orbital information.
    `(package private) boolean` | `readSlaterBasis(java.util.ArrayList<java.lang.Object> listS)`
    `private void` | `readSteps()`
    `private void` | `sortMOs()`
    `private float[]` | `toFloatArray(double[] da)`

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

      `checkLine, readSlaterBasis`

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

      `createSphericalSlaterByType, scaleSlater`

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

      `addSlater, addSlater, getSlaterConstCartesian, getSlaterConstDSpherical, setMOs, setSlaters, sortOrbitalCoefficients, sortOrbitals`

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

    - #### job

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

    - #### jobCount

          private int jobCount

    - #### modelCount

          private int modelCount

    - #### haveEnergy

          private boolean haveEnergy

    - #### lastBasisID

          java.lang.String lastBasisID

  - ### Constructor Detail

    - #### QCJSONReader

          public QCJSONReader()

  - ### Method Detail

    - #### initializeReader

          protected void initializeReader()

      Overrides:
        `initializeReader` in class `MoldenReader`

    - #### processJob

          private void processJob(java.util.Map<java.lang.String,java.lang.Object> job)
                           throws java.lang.Exception

      Parameters:
        `job` -
      Throws:
        `java.lang.Exception`

    - #### finalizeSubclassReader

          public void finalizeSubclassReader()
                                      throws java.lang.Exception

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

    - #### readSteps

          private void readSteps()
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readFreqsAndModes

          private boolean readFreqsAndModes(java.util.ArrayList<java.lang.Object> vibrations)
                                     throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readMolecularOrbitals

          private boolean readMolecularOrbitals(java.util.Map<java.lang.String,java.lang.Object> molecular_orbitals)
                                         throws java.lang.Exception

      Read basis and orbital information.
      Parameters:
        `molecular_orbitals` -
      Returns:
        true if successful
      Throws:
        `java.lang.Exception`

    - #### toFloatArray

          private float[] toFloatArray(double[] da)

    - #### readBasis

          private boolean readBasis(java.lang.String moBasisID)
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readSlaterBasis

          boolean readSlaterBasis(java.util.ArrayList<java.lang.Object> listS)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readGaussianBasis

          private boolean readGaussianBasis(java.util.ArrayList<java.lang.Object> listG,
                                            java.util.ArrayList<java.lang.Object> listS)
                                     throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### sortMOs

          private void sortMOs()

    - #### getMapSafely

          private static java.util.Map<java.lang.String,java.lang.Object> getMapSafely(java.util.Map<java.lang.String,java.lang.Object> map,
                                                                                       java.lang.String key)

      Safely get a Map from a Map using a key.
      Parameters:
        `map` -
        `key` -
      Returns:
        the Map or null