Class GaussianReader

All Implemented Interfaces:
javajs.api.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
  • Field Details

    • STD_ORIENTATION_ATOMIC_NUMBER_OFFSET

      private static final int STD_ORIENTATION_ATOMIC_NUMBER_OFFSET
      Word index of atomic number in line with atom coordinates in an orientation block.
      See Also:
    • energyString

      private String energyString
      Calculated energy with units (if possible).
    • energyKey

      private String energyKey
      Type of energy calculated, e.g., E(RB+HF-PW91).
    • calculationNumber

      protected int calculationNumber
      The number of the calculation being interpreted.
    • scanPoint

      private int scanPoint
      The scan point, where -1 denotes no scan information.
    • equivalentAtomSets

      private int equivalentAtomSets
      The number of equivalent atom sets.

      Needed to associate identical properties to multiple atomsets

    • stepNumber

      private int stepNumber
    • moModelSet

      private int moModelSet
    • namedSets

      protected javajs.util.BS namedSets
    • isHighPrecision

      private boolean isHighPrecision
    • haveHighPrecision

      private boolean haveHighPrecision
    • allowHighPrecision

      private boolean allowHighPrecision
    • orientationInput

      private boolean orientationInput
    • orientation

      private String orientation
  • 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
      Description copied from class: AtomSetCollectionReader
      optional reader-specific method run first.
      Overrides:
      finalizeSubclassReader in class AtomSetCollectionReader
      Throws:
      Exception
    • getSpinDensities

      private void getSpinDensities(int pt) throws Exception
      Throws:
      Exception
    • readSCFDone

      private void readSCFDone() throws Exception
      Interprets the SCF Done: section.

      The energyKey and energyString will be set for further AtomSets that have the same molecular geometry (e.g., frequencies). The energy, convergence, -V/T and S**2 values will be set as properties for the atomSet.

      Throws:
      Exception - If an error occurs
    • setProps

      private void setProps(String key, String value, int n)
    • setNames

      private void setNames(String atomSetName, javajs.util.BS namedSets, int n)
    • setEnergy

      private void setEnergy()
      Interpret the Energy= line for non SCF type energy output
    • 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
    • readDipoleMoment

      void readDipoleMoment() throws Exception
      Throws:
      Exception
    • readPartialCharges

      void readPartialCharges() throws Exception
      Reads partial charges and assigns them only to the last atom set.
      Throws:
      Exception - When an I/O error or discardlines error occurs
    • readCSATensors

      private void readCSATensors() throws Exception
      Throws:
      Exception
    • addTensor

      private void addTensor(int iatom, String[] data)
    • readCouplings

      private void readCouplings() throws Exception
      Throws:
      Exception