org.jmol.adapter.readers.more

Class NWChemReader

public class NWChemReader extends AtomSetCollectionReader

A reader for NWChem 4.6 NWChem is a quantum chemistry program developed at Pacific Northwest National Laboratory.

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 Summary
booleanconverged
StringenergyKey
The type of energy last calculated.
StringenergyValue
The last calculated energy value.
intequivalentAtomSets
The number of equivalent atom sets.
booleanhaveAt
booleanhaveEnergy
booleaninInput
inttaskNumber
The number of the task begin interpreted.
Method Summary
StringfixTag(String tag)
Returns a modified identifier for a tag, so that the element can be determined from it in the Atom.
voidinit()
voidreadAtoms()
Reads the output coordinates section into a new AtomSet.
AtomSetCollectionreadAtomSetCollection(BufferedReader reader)
voidreadAtSign()
voidreadFrequencies()
Reads the AtomSet and projected frequencies in the frequency section.
voidreadGradients()
Reads the energy gradients section into a new AtomSet.
voidreadNWChemLine()
voidreadPartialCharges()
Reads partial charges and assigns them only to the last atom set.
voidreadSymmetry()
Read the symmetry information and set the property.
voidreadTotal()
Interpret a line starting with a line with "Total" in it.
voidsetEnergies(String key, String value, int nAtomSets)
voidsetEnergy(String key, String value)

Field Detail

converged

private boolean converged

energyKey

private String energyKey
The type of energy last calculated.

energyValue

private String energyValue
The last calculated energy value.

equivalentAtomSets

private int equivalentAtomSets
The number of equivalent atom sets.

Needed to associate identical properties to multiple atomsets

haveAt

private boolean haveAt

haveEnergy

private boolean haveEnergy

inInput

private boolean inInput

taskNumber

private int taskNumber
The number of the task begin interpreted.

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

Method Detail

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

init

private void init()

readAtoms

private void readAtoms()
Reads the output coordinates section into a new AtomSet.

Throws: Exception If an error occurs.

readAtomSetCollection

public AtomSetCollection readAtomSetCollection(BufferedReader reader)

readAtSign

private void readAtSign()

readFrequencies

private void readFrequencies()
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.

readGradients

private void readGradients()
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: Exception If an error occurs.

readNWChemLine

private void readNWChemLine()

readPartialCharges

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

Throws: Exception When an I/O error or discardlines error occurs

readSymmetry

private void readSymmetry()
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)

setEnergies

private void setEnergies(String key, String value, int nAtomSets)

setEnergy

private void setEnergy(String key, String value)