# Class GaussianReader

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

All Implemented Interfaces:
  `GenericLineReader`

Direct Known Subclasses:
  `GaussianFchkReader`

public class GaussianReader extends MOReader
Reader for Gaussian 94/98/03/09 output files. 4/11/2009 -- hansonr -- added NBO support as extension of MOReader

## Nested Class Summary

### Nested classes/interfaces inherited from class BasisFunctionReader

`BasisFunctionReader.MOEnergySorter`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`calculationNumber`
The number of the calculation being interpreted.
`protected BS`
`namedSets`

### Fields inherited from class MOReader

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

## Method Summary

Modifier and Type
Method
Description
`protected boolean`
`checkLine()`
Reads a Collection of AtomSets from a BufferedReader.
`void`
`finalizeSubclassReader()`
`protected void`
`initializeReader()`
`protected void`
`readAtoms()`
`protected void`
`readBasis()`
`protected void`
`readFrequencies(String key, boolean mustHave)`
Interprets the Harmonic frequencies section.
`protected void`
`readMolecularOrbitals()`

### Methods inherited from class MOReader

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

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

### calculationNumber

protected int calculationNumber
The number of the calculation being interpreted.

### namedSets

protected BS namedSets

## Constructor Details

### GaussianReader

public GaussianReader()

## Method Details

### initializeReader

protected void initializeReader() throws Exception

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

### checkLine

protected boolean checkLine() throws Exception
Reads a Collection of AtomSets from a BufferedReader.

New AtomSets are generated when an `Input`, `Standard` or `Z-Matrix` orientation is read. The occurence of these orientations seems to depend on (in pseudo-code): `
if (opt=z-matrix) Z-Matrix; else Input;
if (!NoSymmetry) Standard;`
Which means that if `NoSymmetry` is used with a z-matrix optimization, no other orientation besides `Z-Matrix` will be present. This is important because `Z-Matrix` may have dummy atoms while the analysis of the calculation results will not, i.e., the `Center Numbers` in the z-matrix orientation may be different from those in the population analysis!

Single point or frequency calculations always have an `Input` orientation. If symmetry is used a `Standard` will be present too.

Overrides:
  `checkLine` in class `AtomSetCollectionReader`
Returns:
  TRUE to read a new line
Throws:
  `Exception`

### finalizeSubclassReader

public void finalizeSubclassReader() throws Exception

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

### readAtoms

protected void readAtoms() throws Exception

Throws:
  `Exception`

### readBasis

protected void readBasis() throws Exception

Throws:
  `Exception`

### readMolecularOrbitals

protected void readMolecularOrbitals() throws Exception

Throws:
  `Exception`

### readFrequencies

protected void readFrequencies(String key, boolean mustHave) throws Exception
Interprets the Harmonic frequencies section.

The vectors are added to a clone of the last read AtomSet. Only the Frequencies, reduced masses, force constants and IR intensities are set as properties for each of the frequency type AtomSet generated.

Parameters:
  `key` -
  `mustHave` -
Throws:
  `Exception` - If no frequencies were encountered