CsfReader
Date: 2019-10-22

org.jmol.adapter.readers.quantum

## Class CsfReader

- 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.CsfReader

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class CsfReader
      extends MopacSlaterReader

  CSF file reader based on CIF idea -- fluid property fields. note that, like CIF, the order of fields is totally unpredictable in addition, ID numbers are not sequential, requiring atomNames first crack at this 2006/04/13 added DGAUSS, MOPAC, EHT orbital/basis reading 2007/04/09 streamlined CSF dataset reading capabilities 2007/04/09
  Author:
    hansonr

- - ### 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 static byte` | `ANUM`
    `private static byte[]` | `atomFieldMap`
    `private static java.lang.String[]` | `atomFields`
    `private static byte` | `BFXN_ANGL`
    `private static byte[]` | `bondFieldMap`
    `private static java.lang.String[]` | `bondFields`
    `private static byte` | `BTYPE`
    `private static byte` | `CHRG`
    `private static byte` | `COEF_INDICES`
    `private static byte[]` | `connectorFieldMap`
    `private static java.lang.String[]` | `connectorFields`
    `private java.util.Map<java.lang.String,java.lang.String[]>` | `connectors`
    `private static byte` | `CONTRACTIONS`
    `private static byte` | `DIPOLE`
    `private static byte` | `EIG_VAL`
    `private static byte` | `EIG_VEC`
    `private static byte` | `EIG_VEC_COMPRESSED`
    `private int` | `fieldCount`
    `private int[]` | `fieldTypes`
    `private static byte` | `GTO_EXP`
    `private java.util.Map<java.lang.String,Bond>` | `htBonds`
    `private static byte` | `ID`
    `private static byte` | `MO_OCC`
    `private static byte[]` | `moFieldMap`
    `private static java.lang.String[]` | `moFields`
    `private int` | `nAtoms`
    `private int` | `nGaussians`
    `private static byte` | `NORMAL_MODE`
    `private int` | `nSlaters`
    `private int` | `nVibrations`
    `private static byte` | `objCls1`
    `private static byte` | `objCls2`
    `private static byte` | `objID1`
    `private static byte` | `objID2`
    `private static byte` | `PCHRG`
    `private java.util.Map<java.lang.String,java.lang.Integer>` | `propertyItemCounts`
    `private static byte` | `SHELL`
    `private static byte` | `STO_EXP`
    `private java.lang.String` | `strAtomicNumbers`
    `private static byte` | `SYM`
    `private static byte` | `VIB_ENERGY`
    `private static byte[]` | `vibFieldMap`
    `private static java.lang.String[]` | `vibFields`
    `private static byte` | `XYZ`

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `checkLine()`
    `private void` | `fillCsfArray(java.lang.String property, java.lang.String[] tokens, int i0, java.lang.Object f, boolean isInteger)`
    `private int` | `getPropertyCount(java.lang.String what)`
    `private int` | `parseLineParameters(java.lang.String[] fields, byte[] fieldMap)`
    `private void` | `processAtomObject()`
    `private void` | `processBasisObject(java.lang.String sto_gto)`
    `private void` | `processBondObject()`
    `private void` | `processConnectorObject()`
    `private void` | `processLocalTransform()`
    `private void` | `processMolecularOrbitalObject()`
    `private void` | `processVibrationObject()`
    `private void` | `setBond(Bond bond, java.lang.String[] connect)`

    - ### 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, finalizeSubclassReader, finalizeSubclassSymmetry, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFortranFormatLengths, getInterface, getNewSymmetry, getStrings, getSymmetry, getTokens, getTokensFloat, initializeReader, 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

    - #### strAtomicNumbers

          private java.lang.String strAtomicNumbers

    - #### fieldCount

          private int fieldCount

    - #### nVibrations

          private int nVibrations

    - #### nGaussians

          private int nGaussians

    - #### nSlaters

          private int nSlaters

    - #### htBonds

          private java.util.Map<java.lang.String,Bond> htBonds

    - #### propertyItemCounts

          private java.util.Map<java.lang.String,java.lang.Integer> propertyItemCounts

    - #### fieldTypes

          private final int[] fieldTypes

    - #### objCls1

          private static final byte objCls1

      See Also:
        Constant Field Values

    - #### objID1

          private static final byte objID1

      See Also:
        Constant Field Values

    - #### objCls2

          private static final byte objCls2

      See Also:
        Constant Field Values

    - #### objID2

          private static final byte objID2

      See Also:
        Constant Field Values

    - #### connectorFields

          private static final java.lang.String[] connectorFields

    - #### connectorFieldMap

          private static final byte[] connectorFieldMap

    - #### connectors

          private java.util.Map<java.lang.String,java.lang.String[]> connectors

    - #### ID

          private static final byte ID

      See Also:
        Constant Field Values

    - #### SYM

          private static final byte SYM

      See Also:
        Constant Field Values

    - #### ANUM

          private static final byte ANUM

      See Also:
        Constant Field Values

    - #### CHRG

          private static final byte CHRG

      See Also:
        Constant Field Values

    - #### XYZ

          private static final byte XYZ

      See Also:
        Constant Field Values

    - #### PCHRG

          private static final byte PCHRG

      See Also:
        Constant Field Values

    - #### atomFields

          private static final java.lang.String[] atomFields

    - #### atomFieldMap

          private static final byte[] atomFieldMap

    - #### BTYPE

          private static final byte BTYPE

      See Also:
        Constant Field Values

    - #### bondFields

          private static final java.lang.String[] bondFields

    - #### bondFieldMap

          private static final byte[] bondFieldMap

    - #### NORMAL_MODE

          private static final byte NORMAL_MODE

      See Also:
        Constant Field Values

    - #### VIB_ENERGY

          private static final byte VIB_ENERGY

      See Also:
        Constant Field Values

    - #### DIPOLE

          private static final byte DIPOLE

      See Also:
        Constant Field Values

    - #### vibFields

          private static final java.lang.String[] vibFields

    - #### vibFieldMap

          private static final byte[] vibFieldMap

    - #### EIG_VAL

          private static final byte EIG_VAL

      See Also:
        Constant Field Values

    - #### MO_OCC

          private static final byte MO_OCC

      See Also:
        Constant Field Values

    - #### EIG_VEC

          private static final byte EIG_VEC

      See Also:
        Constant Field Values

    - #### EIG_VEC_COMPRESSED

          private static final byte EIG_VEC_COMPRESSED

      See Also:
        Constant Field Values

    - #### COEF_INDICES

          private static final byte COEF_INDICES

      See Also:
        Constant Field Values

    - #### BFXN_ANGL

          private static final byte BFXN_ANGL

      See Also:
        Constant Field Values

    - #### STO_EXP

          private static final byte STO_EXP

      See Also:
        Constant Field Values

    - #### CONTRACTIONS

          private static final byte CONTRACTIONS

      See Also:
        Constant Field Values

    - #### GTO_EXP

          private static final byte GTO_EXP

      See Also:
        Constant Field Values

    - #### SHELL

          private static final byte SHELL

      See Also:
        Constant Field Values

    - #### moFields

          private static final java.lang.String[] moFields

    - #### moFieldMap

          private static final byte[] moFieldMap

  - ### Constructor Detail

    - #### CsfReader

          public CsfReader()

  - ### Method Detail

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

    - #### processLocalTransform

          private void processLocalTransform()
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getPropertyCount

          private int getPropertyCount(java.lang.String what)

    - #### parseLineParameters

          private int parseLineParameters(java.lang.String[] fields,
                                          byte[] fieldMap)
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### fillCsfArray

          private void fillCsfArray(java.lang.String property,
                                    java.lang.String[] tokens,
                                    int i0,
                                    java.lang.Object f,
                                    boolean isInteger)
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processConnectorObject

          private void processConnectorObject()
                                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### setBond

          private void setBond(Bond bond,
                               java.lang.String[] connect)

    - #### processAtomObject

          private void processAtomObject()
                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processBondObject

          private void processBondObject()
                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processVibrationObject

          private void processVibrationObject()
                                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processMolecularOrbitalObject

          private void processMolecularOrbitalObject()
                                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processBasisObject

          private void processBasisObject(java.lang.String sto_gto)
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`