skip to content

Scalable, parallel computational chemistry tools.


All managed Linux workstations have Anaconda, which can be used to install nwchem

Instructions for users: 

To get nwchem it is necessary to set up an Anaconda environment and install nwchem into it. The recipe below should work but you may want to take a look at our Anaconda documentation as Aanaconda is capable of much more than this.

module rm mpi # remove any MPI modules
module add anaconda # add Anaconda module
conda create -p /path/to/environment # /path/to/environment should be replaced with the path where you want to install nwchem. Say yes to prompts.
conda activate /path/to/environment
conda config --add channels conda-forge # this is a well known repository for Anaconda packages that has nwchem
conda config --set channel_priority strict
conda install nwchem # say yes to prompts, it will also install all the dependencies including MPI
conda deactivate # nwchem advises deactivating/reactivating  after install and before using
conda activate /path/to/environment
mpirun -np 2 nwchem infile.nw



Licence Details: 

ECL 2.0

Please cite the following reference when publishing results obtained with NWChem: M. Valiev, E.J. Bylaska, N. Govind, K. Kowalski, T.P. Straatsma, H.J.J. van Dam, D. Wang, J. Nieplocha, E. Apra, T.L. Windus, W.A. de Jong, "NWChem: a comprehensive and scalable open-source solution for large scale molecular simulations" Comput. Phys. Commun. 181, 1477 (2010)

Admin notes: 

We do not use the Ubuntu provided package since it depends on mpi and we block the system mpi packages from being installed.


Trying to adapt from the 6.8.1 steps took hours to build and left me with a program that failed our workstation tests (:0:geom_binvr: ysyev failed:Received an Error in Communication).

But fortunately anaconda has packaged a version of this, which works fine. It is not relocatable though, so we advise people to use it via Anaconda.


See /usr/local/shared/ubuntu-18.04/x86_64/nwchem/6.8.1/ and /usr/local/shared/ubuntu-18.04/x86_64/nwchem/6.8.1/ . The QA suite that ships with nwchem contains many, many failing tests but the test script used here contains only the ones the nwchem developers use themselves.

Focal: Global Arrays (GA) needs a patch to work with MPI 4. I used that suggested at  However, I still had problems (it was complaining about unresolved Python symbols at the linking stage - perhaps I should have followed the following for 6.6 in full?).


export NWCHEM_TOP=`pwd`
export NWCHEM_MODULES='all python'
export USE_MPI=y
module purge
#module add mpi/openmpi/64/gnu/1.6.5
module add mpi/openmpi/64/gnu/1.8

$NWCHEM_TOP/contrib/distro-tools/getmpidefs_nwchem # and then execute the result
# You may need to add -Wl,-rpath -Wl,/path/to/your/openmpi/lib too MPI_LIB too
#export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"
#export LIBMPI='-lmpi'
#echo $MPI_LIB
export FC=mpif90
export CC=mpicc
export PYTHONHOME=/usr
export USE_PYTHON64=y
export PYTHON_SYSLIB=/usr/lib
export PYTHONCONFIGDIR=config-x86_64-linux-gnu
vim src/config/makefile.h

find the PYTHON64 bit and change $(PYTHONHOME)/lib64/python$(PYTHONVERSION)/config-x86_64-linux-gnu/libpython$(PYTHONVERSION).$(PYTHONLIBTYPE) to $(PYTHONHOME)/lib/python$(PYTHONVERSION)/config-x86_64-linux-gnu/libpython$(PYTHONVERSION).$(PYTHONLIBTYPE)

cd $NWCHEM_TOP/src
make nwchem_config

export NWCINS=/whereever
mkdir $NWCINS
mkdir $NWCINS/bin
mkdir $NWCINS/data
mkdir $NWCINS/contrib
cp -r contrib/python $NWCINS/contrib
cp bin/$NWCHEM_TARGET/nwchem $NWCINS/bin
chmod 755 $NWCINS/bin 
cd $NWCHEM_TOP/src/basis
cp -r libraries $NWCINS/data
cd $NWCHEM_TOP/src/
cp -r data $NWCINS
cd $NWCHEM_TOP/src/nwpw
cp -r libraryps $NWCINS/data
chmod -R go+rX $NWCINS

Make a $NWCINS/data/default.nwchemrc file containing this (expand the vars)

nwchem_basis_library $NWCINS/data/libraries/
nwchem_nwpw_library $NWCINS/data/libraryps/
ffield amber
amber_1 $NWCINS/data/amber_s/
amber_2 $NWCINS/data/amber_q/
amber_3 $NWCINS/data/amber_x/
amber_4 $NWCINS/data/amber_u/
spce $NWCINS/data/solvents/spce.rst
charmm_s $NWCINS/data/charmm_s/
charmm_x $NWCINS/data/charmm_x/

You need the module for nwchem to link the default.nwchemrc to ~/.nwchemrc

System status 

System monitoring page

Can't find what you're looking for?

Then you might find our A-Z site index useful. Or, you can search the site using the box at the top of the page, or by clicking here.