Class NWChemReader

All Implemented Interfaces:
javajs.api.GenericLineReader

public class NWChemReader extends MOReader
A reader for NWChem 4.6 NWChem is a quantum chemistry program developed at Pacific Northwest National Laboratory. See http://www.nwchem-sw.org/index.php/NWChem_Documentation for orbital plotting, one needs to use the following switches: print "final vectors" "final vectors analysis"

AtomSets will be generated for output coordinates in angstroms, energy gradients with vector information of the gradients, and frequencies with an AtomSet for every separate frequency containing vector information of the vibrational mode.

Note that the different modules give quite different formatted output so it is not certain that all modules will be properly interpreted. Most testing has been done with the SCF and DFT tasks.

  • Field Details

    • taskNumber

      private int taskNumber
      The number of the task begin interpreted.

      Used for the construction of the 'path' for the atom set.

    • equivalentAtomSets

      private int equivalentAtomSets
      The number of equivalent atom sets.

      Needed to associate identical properties to multiple atomsets

    • energyKey

      private String energyKey
      The type of energy last calculated.
    • energyValue

      private String energyValue
      The last calculated energy value.
    • converged

      private boolean converged
    • haveEnergy

      private boolean haveEnergy
    • haveAt

      private boolean haveAt
    • inInput

      private boolean inInput
    • atomTypes

      private javajs.util.Lst<String> atomTypes
    • htMOs

      private Map<String,javajs.util.Lst<String>> htMOs
    • nBasisFunctions

      int nBasisFunctions
    • DS_LIST

      private static String DS_LIST
    • FS_LIST

      private static String FS_LIST
    • DC_LIST

      private static String DC_LIST
    • FC_LIST

      private static String FC_LIST
    • moCount

      int moCount
    • purging

      private boolean purging
  • Constructor Details

    • NWChemReader

      public NWChemReader()
  • Method Details

    • initializeReader

      protected void initializeReader()
      Overrides:
      initializeReader in class MOReader
    • checkLine

      protected boolean checkLine() throws Exception
      Overrides:
      checkLine in class AtomSetCollectionReader
      Returns:
      true if need to read new line
      Throws:
      Exception
    • finalizeSubclassReader

      protected void finalizeSubclassReader() throws Exception
      Description copied from class: AtomSetCollectionReader
      optional reader-specific method run first.
      Overrides:
      finalizeSubclassReader in class AtomSetCollectionReader
      Throws:
      Exception
    • init

      private void init()
    • setEnergies

      private void setEnergies(String key, String value, int nAtomSets)
      Parameters:
      key -
      value -
      nAtomSets - NOT USED
    • setEnergy

      private void setEnergy(String key, String value)
    • readSymmetry

      private void readSymmetry() throws Exception
      Read the symmetry information and set the property.
      Throws:
      Exception - If an error occurs.
    • readTotal

      private void readTotal()
      Interpret a line starting with a line with "Total" in it.

      Determine whether it reports the energy, if so set the property and name(s)

    • readAtSign

      private void readAtSign() throws Exception
      Throws:
      Exception
    • setProps

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

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

      private void readAtoms(String thisLine) throws Exception
      Reads the output coordinates section into a new AtomSet.
      Parameters:
      thisLine -
      Throws:
      Exception - If an error occurs.
    • readFrequencies

      private void readFrequencies() throws Exception
      Reads the AtomSet and projected frequencies in the frequency section.

      Attaches the vibration vectors of the projected frequencies to duplicates of the atom information in the frequency section.

      Throws:
      Exception - If an error occurs.
    • 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
    • fixTag

      private String fixTag(String tag)
      Returns a modified identifier for a tag, so that the element can be determined from it in the Atom.

      The result is that a tag that started with Bq (case insensitive) will be renamed to have the Bq removed and '-Bq' appended to it.
      A tag consisting only of Bq (case insensitive) will return X. This can happen in a frequency analysis.

      Parameters:
      tag - the tag to be modified
      Returns:
      a possibly modified tag
    • readBasis

      private boolean readBasis() throws Exception
      Throws:
      Exception
    • readMOs

      private boolean readMOs() throws Exception
      Throws:
      Exception
    • checkMOs

      private void checkMOs() throws Exception
      Throws:
      Exception
    • rd

      public String rd() throws Exception
      Overrides:
      rd in class AtomSetCollectionReader
      Throws:
      Exception