Skip to content

NWChem

A high performance computational chemistry program that can handle a wide range of different types of computational chemistry problems.


NWChem requires an environment module

In order to use NWChem, you must first load the appropriate environment module:

module load gnu mvapich2 nwchem

NWChem aims to provide its users with computational chemistry tools that are scalable both in their ability to treat large scientific computational chemistry problems efficiently, and in their use of available parallel computing resources from high-performance parallel supercomputers to conventional workstation clusters.

Basic Example on the HPC#

Below is an example from the NWChem tutorial. Connect to an HPC Login Node, and create a directory named nwchem in your home directory:

$ mkdir ~/nwchem

Then create a file named n2.nw, and add the following content to it:

1
2
3
4
5
6
7
8
9
  title "Nitrogen cc-pvdz SCF geometry optimization"
  geometry  
    n 0 0 0
    n 0 0 1.08
  end
  basis
    n library cc-pvdz
  end
  task scf optimize

Note

There must be at least two spaces before each command in the .nw file. Syntax instructions are avaiable in the tutorial.

Execute the program by running the nwchem command:

1
2
3
4
$ module purge
$ module load gnu mvapich2 nwchem
$ cd ~/nwchem
$ nwchem n2

Parallel execution#

Prefix the nwchem with srun:

$ srun -n 2 nwchem n2

Example Slurm script#

The following is a Slurm submit script that uses the example n2.nw described above:

#!/bin/bash

#SBATCH  --job-name="nwchem_test_job" # Job name is optional  
#SBATCH  --ntasks=2                   # request to CPU cores from the scheduler (replace this with the value you need)
#SBATCH  -t 00:10:00                  # request 10 minutes from the scheduler (replace this with the value you need)
# ...other Slurm directives here...

module load gnu mvapich2 nwchem

srun nwchem n2