NWChem is a quantum chemical software which aims to provide 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.
NWChem software can handle
NWChem is highly parallelized code with a strong focus on scalability. The NWChem installations at NSC are generally done by Johan Raber (firstname.lastname@example.org).
Provided you have a valid NWChem input file here is how you can run it from an interactive session:
@triolith: $ interactive -N2 --exclusive -t 00:30:00 #This drops you in a shell on an allocated node @node: $ module load nwchem/6.1.1 @node: $ nwchem.run input.nw > output.nwout
Running it in batch mode is very similar and an example is available below. Please remember to set the SCRATCH_DIR and possible PERMANENT_DIR to appropriate values in your input file. Setting the scratch directory is by far the most important. The permanent directory is set to the launch directory by default so it is far less important to set it usually.
It may be good to automate the setting of the scratch and permanent directories using tags in you input file like:
PARMANENT_DIR <<++PERMDIR++>> SCRATCH_DIR <<++SCRDIR++>>
This tag can then be automatically set to an appropriate value on the command line of an interactive session or in a batch script like
sed -i "s:<<++SCRDIR++>>:$SNIC_TMP:" input.nw # Note: Double quotes are crucial here sed -i "s:<<++PERMDIR++>>:$PWD:" input.nw # Note: Double quotes are crucial here. # It is assumed that submit dir is workdir for the job here
You are of course free to use a different tag name than this. For usage in a batch script, see below.
A minimal batch script for running NWChem at NSC looks like this:
#!/bin/bash #SBATCH -N 2 #SBATCH -t 4:00:00 #SBATCH -J jobname #SBATCH --exclusive #SBATCH -A SNIC-xxx-yy module load nwchem/6.1.1 sed -i "s:<<++SCRDIR++>>:$SNIC_TMP:" input.nw sed -i "s:<<++PERMDIR++>>:$PWD:" input.nw nwchem.run input.nw > output.nwout exit_status=$? exit $exit_status
(Note that you should edit the jobname and the account number before submitting.)
In this script NWChem will be run from the submit directory.
When loading a module file for NWChem, only the QM part is fully initialised and functional as not every setting for NWChem can be handled via environment variables. If you want to access the available forcefields for classical molecular dynamics or hybrid QM/MM runs, you will need to add a link in your home directory to a file in the NWChem installation tree like
ln -s /software/apps/nwchem/6.1.1/data/default.nwchemrc ~/.nwchemrc
Please adjust the above path to match the version of NWChem you are running.
Viewing the output from NWChem can be done with the GUIs Avogadro or Gabedit available via the module system. Should you wish to produce ray-traced images and movies from these interfaces you will also need to load a povray module. You will additionally need to run with X forwarding or the VNC solution currently installed. NSC recommends the VNC solution.