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

Direct Known Subclasses:
  `AdfReader, CsfReader, DgridReader, GamessReader, GaussianReader, GenNBOReader, JaguarReader, MoldenReader, MopacGraphfReader, NWChemReader, OrcaReader, PsiReader, QchemReader, WebMOReader`

public abstract 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 BasisFunctionReader

`BasisFunctionReader.MOEnergySorter`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`allowNoOrbitals`
`protected String`
`energyUnits`
`protected boolean`
`forceMOPAC`
`int`
`gaussianCount`
`float[][]`
`gaussians`
`protected boolean`
`haveNboCharges`
`protected boolean`
`haveNboOrbitals`
`protected final int`
`HEADER_GAMESS_OCCUPANCIES`
`protected final int`
`HEADER_GAMESS_ORIGINAL`
`protected final int`
`HEADER_GAMESS_UK_MO`
`protected final int`
`HEADER_NONE`
`protected Map<String,Object>`
`lastMoData`
`protected Lst<String>`
`moTypes`
`protected boolean`
`orbitalsRead`
`int`
`shellCount`

### Fields inherited from class BasisFunctionReader

`alphaBeta, dfCoefMaps, haveCoefs, ignoreMOs, moData, nCoef, nOrbitals, orbitals, shells, slaterArray, slaters`

### Fields inherited from class AtomSetCollectionReader

`addedData, addedDataKey, addVibrations, allow_a_len_1, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, baseBondIndex, binaryDoc, bsFilter, bsModels, calculationType, CELL_TYPE_CONVENTIONAL, CELL_TYPE_PRIMITIVE, CELL_TYPE_SUPER, cellSlop, centroidPacked, checkNearAtoms, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCentroidUnitCell, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterAllHetero, filterCased, filteredPrecision, filterHetero, floatifyJavaDouble, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, is2D, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isSUPERCELL, isTrajectory, latticeCells, latticeScaling, latticeType, line, lowPrecision, lstNCS, matUnitCellOrientation, merging, modDim, modelNumber, ms, mustFinalizeModelSet, next, noHydrogens, noMinimize, noPack, optimize2D, out, paramsCentroid, paramsLattice, precision, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, slabXY, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, ucItems, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr`

## Constructor Summary

Constructors
Constructor
Description
`MOReader()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addCoef(Map<String,Object> mo, float[] coefs, String type, float energy, float occ, int moCount)`
`protected void`
`addMOData(int nColumns, Lst<String>[] data, Map<String,Object>[] mos)`
`protected void`
`addSlaterBasis()`
See MopacSlaterReader
`protected boolean`
`checkNboLine()`
`protected void`
`getMOHeader(int headerType, String[] tokens, Map<String,Object>[] mos, int nThisLine)`
`protected void`
`getNboTypes()`
`protected void`
`initializeReader()`
`protected void`
`readMolecularOrbitals(int headerType)`
`void`
`setMOData(boolean clearOrbitals)`

### Methods inherited from class BasisFunctionReader

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

### Methods inherited from class AtomSetCollectionReader

`addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addMoreUnitCellInfo, addSites, addSiteScript, appendLoadNote, applySymmetryAndSetTrajectory, applySymTrajASCR, checkAndRemoveFilterKey, 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, fixDoubleA, fixFloatA, fixFloatPt, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFilterWithCase, getFortranFormatLengths, getInterface, getPackingRangeValue, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, parsePrecision, 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, setPrecision, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR, warnSkippingOperation`

### Methods inherited from class Object

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

## Field Details

### shellCount

public int shellCount

### gaussianCount

public int gaussianCount

### gaussians

public float[][] gaussians

### energyUnits

protected String energyUnits

### moTypes

protected Lst<String> moTypes

### haveNboCharges

protected boolean haveNboCharges

### haveNboOrbitals

protected boolean haveNboOrbitals

### orbitalsRead

protected boolean orbitalsRead

### lastMoData

protected Map<String,Object> lastMoData

### allowNoOrbitals

protected boolean allowNoOrbitals

### forceMOPAC

protected boolean forceMOPAC

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

## Constructor Details

### MOReader

public MOReader()

## Method Details

### initializeReader

protected void initializeReader() throws Exception

Overrides:
  `initializeReader` in class `AtomSetCollectionReader`
Throws:
  `Exception`

### checkNboLine

protected boolean checkNboLine() throws Exception

Returns:
  true if need to read line
Throws:
  `Exception`

### getNboTypes

protected void getNboTypes() throws Exception

Throws:
  `Exception`

### readMolecularOrbitals

protected void readMolecularOrbitals(int headerType) throws Exception

Throws:
  `Exception`

### addSlaterBasis

protected void addSlaterBasis()
See MopacSlaterReader

### addCoef

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

### getMOHeader

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

Throws:
  `Exception`

### addMOData

protected void addMOData(int nColumns, Lst<String>[] data, Map<String,Object>[] mos)

### setMOData

public void setMOData(boolean clearOrbitals)