NWChem

When in doubt, check the Documentation, and test!

Running NWChem
First, login to a system (e.g. circe) with nwchem installed.

Next, load the NWChem module and set up a working dir.

Then create a molecule (you can download an sdf file from the PDB ligand structure database listed in the course reference material (Search by molecule name -> Download Links (on left panel) -> Ideal Molfile).

Next, paste the molecule into a file, e.g.

You'll also need to paste one of the templates below (they work without changes) into an NWChem control file called en_scf.nw. Use the 'cat' command to paste into the file as above.

Finally, convert start.sdf to an xyz format for NWChem and run nwchem.

All your output will be in en_scf.log (scp/download it to your local system). In the future, use the batch queue system with

This runs on 4 cpus in parallel, so it will be faster than running (as before) directly on the login node. Of course, you'll also want to change some options in the run file eventually (especially the basis set). You can also manually edit the xyz file and scan the energy vs some coordinate. See the templates below for more ideas.

Note that you can also edit the files on your system and transfer, or edit locally on circe using your favorite linux editor. Nano is easy to use.

Energy Calculation
A simple SCF energy calculation on the input file start.xyz can be done with:

start en_scf title "Pople SCF energy" geometry units angstrom load start.xyz end basis * library 3-21G end task scf energy
 * 1)   * library cc-pvdz
 * 2)   * library 6-31G*

Geometry Optimization
Running a geometry optimization just requires replacing the task directive. Here, we've also added a block of parameters controlling the minimization algorithm.

start opt_scf title "Pople SCF geometry optimization" geometry units angstrom load start.xyz end basis * library 3-21G end driver loose maxiter 150 xyz opt end task scf optimize
 * 1)   * library cc-pvdz
 * 2)   * library 6-31G*

DFT
You can also use DFT rather than HF (SCF) by changing the appropriate keywords and adding a DFT block to specify its functional:

start opt_dft title "Pople DFT geometry optimization" geometry units angstrom load start.xyz end basis * library 3-21G end dft xc xpbe96 1.0 \ pw91lda local 1.0 \ cpbe96 nonlocal 1.0 direct iterations 150 grid fine disp vdw 2 end driver loose maxiter 150 xyz opt end task dft optimize
 * 1)  * library cc-pvdz
 * 2)  * library 6-31G*

The "xyz opt" causes NWChem to write out coordinate files, e.g. opt-001.xyz, ... as the optimization is proceeding.

Specifying Charge and Spin
Of course, we need to be able to specify the charge and total spin for most systems as well. Here's an input example appropriate for Fe3+ (5 spin-up electrons making up a half-filled d-shell):

start en_scf title "Pople SCF energy" geometry start units angstrom load start.xyz end basis * library 3-21G end set geometry start charge 3 scf sextet end task scf energy
 * 1)   Fe  library "Ahlrichs pVDZ" # better basis

Vibrational Frequencies
At a minimum, the second derivatives of the potential energy surface with respect to the nuclear coordinates make up a 3Nx3N matrix. The eigenvectors represent vibrational 'modes,' and the eigenvalues represent their force constants. Analyzing each mode as a harmonic oscillator leads to a set of vibrational frequencies, which give thermochemical information on the molecule as well as IR spectroscopic information.

From a minimized set of coordinates, all you should require is to add the appropriate task (and optionally a block of parameters)

task scf frequencies