Class NWChemReader
- 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.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader
BasisFunctionReader.MOEnergySorter
-
-
Field Summary
Fields Modifier and Type Field Description private javajs.util.Lst<java.lang.String>atomTypesprivate booleanconvergedprivate static java.lang.StringDC_LISTprivate static java.lang.StringDS_LISTprivate java.lang.StringenergyKeyThe type of energy last calculated.private java.lang.StringenergyValueThe last calculated energy value.private intequivalentAtomSetsThe number of equivalent atom sets.private static java.lang.StringFC_LISTprivate static java.lang.StringFS_LISTprivate booleanhaveAtprivate booleanhaveEnergyprivate java.util.Map<java.lang.String,javajs.util.Lst<java.lang.String>>htMOsprivate booleaninInput(package private) intmoCount(package private) intnBasisFunctionsprivate booleanpurgingprivate inttaskNumberThe number of the task begin interpreted.-
Fields inherited from class org.jmol.adapter.readers.quantum.MOReader
allowNoOrbitals, 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, dfCoefMaps, ignoreMOs, moData, nCoef, nOrbitals, orbitals, shells
-
Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addedData, addedDataKey, addVibrations, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, binaryDoc, bsFilter, bsModels, calculationType, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterHetero, fixJavaFloat, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isSequential, isTrajectory, latticeCells, latticeScaling, line, lstNCS, matUnitCellOrientation, modelNumber, ms, mustFinalizeModelSet, next, out, packingError, prevline, ptLine, ptSupercell, reader, readerName, reverseModels, sgName, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr
-
-
Constructor Summary
Constructors Constructor Description NWChemReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckLine()private voidcheckMOs()protected voidfinalizeSubclassReader()optional reader-specific method run first.private java.lang.StringfixTag(java.lang.String tag)Returns a modified identifier for a tag, so that the element can be determined from it in theAtom.private voidinit()protected voidinitializeReader()java.lang.Stringrd()private voidreadAtoms()Reads the output coordinates section into a new AtomSet.private voidreadAtSign()private booleanreadBasis()private voidreadFrequencies()Reads the AtomSet and projected frequencies in the frequency section.private voidreadGradients()Reads the energy gradients section into a new AtomSet.private booleanreadMOs()(package private) voidreadPartialCharges()Reads partial charges and assigns them only to the last atom set.private voidreadSymmetry()Read the symmetry information and set the property.private voidreadTotal()Interpret a line starting with a line with "Total" in it.private voidsetEnergies(java.lang.String key, java.lang.String value, int nAtomSets)private voidsetEnergy(java.lang.String key, java.lang.String value)private voidsetNames(java.lang.String atomSetName, BS namedSets, int n)private voidsetProps(java.lang.String key, java.lang.String value, int n)-
Methods inherited from class org.jmol.adapter.readers.quantum.MOReader
addCoef, addMOData, checkAndRemoveFilterKey, checkNboLine, getMOHeader, getNboTypes, readMolecularOrbitals, setMOData
-
Methods inherited from class org.jmol.adapter.readers.quantum.BasisFunctionReader
canonicalizeQuantumSubshellTag, discardPreviousAtoms, filterMO, fixSlaterTypes, getDfCoefMaps, getDFMap, getQuantumShellTag, getQuantumShellTagID, getQuantumShellTagIDSpherical, setMO
-
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymmetryAndSetTrajectory, applySymTrajASCR, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, doGetModel, doGetVibration, doPreSymmetry, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, finalizeSubclassSymmetry, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFortranFormatLengths, getInterface, getNewSymmetry, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, parseToken, parseTokenNext, parseTokenRange, parseTokenStr, processBinaryDocument, processDOM, read3Vectors, readDataObject, readLines, readNextLine, rejectAtomName, RL, set2D, setAtomCoord, setAtomCoordScaled, setAtomCoordTokens, setAtomCoordXYZ, setChainID, setElementAndIsotope, setFilter, setFilterAtomTypeStr, setFractionalCoordinates, setIsPDB, setLoadNote, setModelPDB, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR
-
-
-
-
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 javajs.util.Lst<java.lang.String> atomTypes
-
htMOs
private java.util.Map<java.lang.String,javajs.util.Lst<java.lang.String>> htMOs
-
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
-
moCount
int moCount
-
purging
private boolean purging
-
-
Method Detail
-
initializeReader
protected void initializeReader()
- Overrides:
initializeReaderin classMOReader
-
checkLine
protected boolean checkLine() throws java.lang.Exception- Overrides:
checkLinein classAtomSetCollectionReader- Returns:
- true if need to read new line
- Throws:
java.lang.Exception
-
finalizeSubclassReader
protected void finalizeSubclassReader() throws java.lang.ExceptionDescription copied from class:AtomSetCollectionReaderoptional reader-specific method run first.- Overrides:
finalizeSubclassReaderin classAtomSetCollectionReader- 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.ExceptionRead 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
-
setProps
private void setProps(java.lang.String key, java.lang.String value, int n)
-
setNames
private void setNames(java.lang.String atomSetName, BS namedSets, int n)
-
readAtoms
private void readAtoms() throws java.lang.ExceptionReads the output coordinates section into a new AtomSet.- Throws:
java.lang.Exception- If an error occurs.
-
readGradients
private void readGradients() throws java.lang.ExceptionReads 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.ExceptionReads 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.ExceptionReads 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 theAtom.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
-
readMOs
private boolean readMOs() throws java.lang.Exception- Throws:
java.lang.Exception
-
checkMOs
private void checkMOs() throws java.lang.Exception- Throws:
java.lang.Exception
-
rd
public java.lang.String rd() throws java.lang.Exception- Overrides:
rdin classAtomSetCollectionReader- Throws:
java.lang.Exception
-
-