org.jmol.adapter.readers.quantum
Class NWChemReader

java.lang.Object
  extended by org.jmol.adapter.smarter.AtomSetCollectionReader
      extended by org.jmol.adapter.readers.quantum.BasisFunctionReader
          extended by org.jmol.adapter.readers.quantum.MOReader
              extended by org.jmol.adapter.readers.quantum.NWChemReader

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. no support yet for orbitals


Field Summary
private  java.util.List<java.lang.String> atomTypes
           
private  boolean converged
           
private static java.lang.String DC_LIST
           
private static java.lang.String DS_LIST
           
private  java.lang.String energyKey
          The type of energy last calculated.
private  java.lang.String energyValue
          The last calculated energy value.
private  int equivalentAtomSets
          The number of equivalent atom sets.
private static java.lang.String FC_LIST
           
private static java.lang.String FS_LIST
           
private  boolean haveAt
           
private  boolean haveEnergy
           
private  boolean inInput
           
(package private)  int moCount
           
private  java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.Object>> moInfo
           
(package private)  int nBasisFunctions
           
private  boolean purging
           
private  boolean readROHFonly
           
private  int taskNumber
          The number of the task begin interpreted.
 
Fields inherited from class org.jmol.adapter.readers.quantum.MOReader
energyUnits, gaussianCount, gaussians, haveNboCharges, haveNboOrbitals, HEADER_GAMESS_OCCUPANCIES, HEADER_GAMESS_ORIGINAL, HEADER_GAMESS_UK_MO, HEADER_NONE, moTypes, orbitalsRead, shellCount
 
Fields inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader
alphaBeta, CANONICAL_DC_LIST, CANONICAL_DS_LIST, CANONICAL_FC_LIST, CANONICAL_FS_LIST, dfCoefMaps, ignoreMOs, moData, nOrbitals, orbitals, shells
 
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addVibrations, ANGSTROMS_PER_BOHR, applySymmetryToBonds, atomSetCollection, bsFilter, bsModels, calculationType, continuing, desiredModelNumber, desiredVibrationNumber, doApplySymmetry, doc, doCheckUnitCell, doPackUnitCell, doProcessLines, filter, filterHetero, getHeader, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, isBinary, isSequential, isTrajectory, latticeCells, line, matUnitCellOrientation, modelNumber, next, notionalUnitCell, os, prevline, ptLine, reader, readerName, readMolecularOrbitals, spaceGroup, stateScriptVersionInt, supercell, symmetry, templateAtomCount, useAltNames, vibrationNumber, viewer
 
Constructor Summary
NWChemReader()
           
 
Method Summary
protected  boolean checkLine()
           
private  java.lang.String fixTag(java.lang.String tag)
          Returns a modified identifier for a tag, so that the element can be determined from it in the Atom.
private  void init()
           
protected  void initializeReader()
           
private  void readAtoms()
          Reads the output coordinates section into a new AtomSet.
private  void readAtSign()
           
private  boolean readBasis()
           
private  void readFrequencies()
          Reads the AtomSet and projected frequencies in the frequency section.
private  void readGradients()
          Reads the energy gradients section into a new AtomSet.
 java.lang.String readLine()
           
private  boolean readMolecularOrbitalAnalysis(boolean doClear)
           
private  boolean readMolecularOrbitalVectors()
           
(package private)  void readPartialCharges()
          Reads partial charges and assigns them only to the last atom set.
private  void readSymmetry()
          Read the symmetry information and set the property.
private  void readTotal()
          Interpret a line starting with a line with "Total" in it.
private  void setEnergies(java.lang.String key, java.lang.String value, int nAtomSets)
           
private  void setEnergy(java.lang.String key, java.lang.String value)
           
 
Methods inherited from class org.jmol.adapter.readers.quantum.MOReader
addMOData, checkNboLine, getMOHeader, getNboTypes, readMolecularOrbitals, setMOData, setMOType
 
Methods inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader
canonicalizeQuantumSubshellTag, filterMO, fixSlaterTypes, getDfCoefMaps, getDFMap, isQuantumBasisSupported, setMO
 
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, appendLoadNote, applySymmetryAndSetTrajectory, checkFilter, checkLastModel, checkLineForScript, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains, discardLinesUntilNonBlank, discardLinesUntilStartsWith, doGetModel, doGetVibration, fillDataBlock, fillDataBlock, fillFloatArray, fillFrequencyData, filterAtom, finalizeReader, getElementSymbol, getFortranFormatLengths, getStrings, getSymmetry, getTokens, getTokens, getTokens, getTokensFloat, initializeSymmetry, isLastModel, newAtomSet, parseFloat, parseFloat, parseFloat, parseInt, parseInt, parseInt, parseInt, parseStringInfestedFloatArray, parseToken, parseToken, parseToken, parseTokenNext, parseTrimmed, parseTrimmed, processBinaryDocument, processXml, read3Vectors, readData, readLines, set2D, setAtomCoord, setAtomCoord, setFilter, setFractionalCoordinates, setIsPDB, setMOData, setPdb, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 java.lang.String energyKey
The type of energy last calculated.


energyValue

private java.lang.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 java.util.List<java.lang.String> atomTypes

readROHFonly

private boolean readROHFonly

nBasisFunctions

int nBasisFunctions

DS_LIST

private static java.lang.String DS_LIST

FS_LIST

private static java.lang.String FS_LIST

DC_LIST

private static java.lang.String DC_LIST

FC_LIST

private static java.lang.String FC_LIST

moInfo

private java.util.Map<java.lang.Integer,java.util.Map<java.lang.String,java.lang.Object>> moInfo

moCount

int moCount

purging

private boolean purging
Constructor Detail

NWChemReader

public NWChemReader()
Method Detail

initializeReader

protected void initializeReader()
Overrides:
initializeReader in class MOReader

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

init

private void init()

setEnergies

private void setEnergies(java.lang.String key,
                         java.lang.String value,
                         int nAtomSets)
Parameters:
key -
value -
nAtomSets - NOT USED

setEnergy

private void setEnergy(java.lang.String key,
                       java.lang.String value)

readSymmetry

private void readSymmetry()
                   throws java.lang.Exception
Read the symmetry information and set the property.

Throws:
java.lang.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 java.lang.Exception
Throws:
java.lang.Exception

readAtoms

private void readAtoms()
                throws java.lang.Exception
Reads the output coordinates section into a new AtomSet.

Throws:
java.lang.Exception - If an error occurs.

readGradients

private void readGradients()
                    throws java.lang.Exception
Reads the energy gradients section into a new AtomSet.

One could consider not adding a new AtomSet for this, but just adding the gradient vectors to the last AtomSet read (if that was indeed the same nuclear arrangement).

Throws:
java.lang.Exception - If an error occurs.

readFrequencies

private void readFrequencies()
                      throws java.lang.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:
java.lang.Exception - If an error occurs.

readPartialCharges

void readPartialCharges()
                  throws java.lang.Exception
Reads partial charges and assigns them only to the last atom set.

Throws:
java.lang.Exception - When an I/O error or discardlines error occurs

fixTag

private java.lang.String fixTag(java.lang.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 java.lang.Exception
Throws:
java.lang.Exception

readMolecularOrbitalAnalysis

private boolean readMolecularOrbitalAnalysis(boolean doClear)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

readMolecularOrbitalVectors

private boolean readMolecularOrbitalVectors()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

readLine

public java.lang.String readLine()
                          throws java.lang.Exception
Overrides:
readLine in class AtomSetCollectionReader
Throws:
java.lang.Exception