Q Chem - shannonhouck/mayhall-lab-manual GitHub Wiki

Installing LibRASSF (Q-Chem Version)

General Instructions For Q-Chem Installation

Obtain the necessary source code (use –username keyword if needed):

svn co https://jubilee.q-chem.com/svnroot/qchem/trunk qchem

Change to new directory and configure:

cd qchem
./configure

(NOTE: You may need to change the keywords in the configure file to compile without MPI and without ccman2.)

To update, use

svn up

Change to build directory and compile (make sure you use Intel 18):

cd build
make -j4
make install

You may also need to download and link to the QCAUX file:

svn co https://jubilee.q-chem.com/svnroot/qcaux/trunk qcaux
cd qcaux
wget http://www.q-chem.com/download/qc_latest/drivers/drivers.small.tar.gz
tar xzf drivers.small.tar.gz

Set up the QC variables as needed (see .bashrc for examples).

On NewRiver

Do the same thing as above, but first purge modules and load the following:

module purge
module load cmake
module load intel mkl

Running LibRASSF Exclusively (Fast Build)

Sometimes, you may want to work on the LibRASSF code without making the compiler slog through all of the unnecessary libraries every time you recompile. In this case, you probably want to use the version of this package from the Q-Chem incubator:

svn co https://jubilee.q-chem.com/svnroot/qchem/incubator/librassf/ librassf-dev

You can compile this using the same instructions as above. Note that this isn't a full copy of Q-Chem and should only be used for development work!

Compiling For Debugging/Profiling

You can use the relwdeb keyword when configuring to enable debugging and profiling info:

module load gcc/6.1.0
./configure relwdeb
cd build
make -j24

Then, you can use Valgrind to profile the code. A sample submit script with Valgrind:

#PBS -l walltime=00:01:00:00
#PBS -l nodes=1:ppn=24
#PBS -l mem=120GB
#PBS -q nmayhall_lab
#PBS -A qcvt_doe
#PBS -W group_list=nmayhall_lab
#PBS -n

source ~/bashrc.qchem.librassf-dev
module load gcc/6.1.0
module load valgrind

cd $PBS_O_WORKDIR
valgrind --tool=callgrind -v qchem horseshoe_def2svp_librassf.in

exit;

This should generate many different callgrind.out.JOBID files. These can be opened with vim, but the output isn't very human-readable, so it's recommended that you visualize
the output using some type of GUI (ex. KCachegrind, or QCachegrind for Macs).

Running Q-Chem On The Cluster

Add the following to the .bashrc file in your home directory:

# Set up QChem
export GROUP=/groups/nmayhall_lab/
export PATH=$GROUP/scripts:$PATH
export qcSoft="/home/nmayhall/newriver/qcSoftware"

Running Q-Chem 4

To run with Q-Chem 4, add a file called bashrc.qchem.svn-casman to your home directory containing the following:

export QCPATH="$qcSoft/qchem"
export QC="$QCPATH/qchem.svn-casman"
export QC_EXT_LIBS="$QCPATH/qc_ext_libs"
export QCSCRATCH="$HOME/.qchem_scratch/"
export QCAUX="$QCPATH/qcaux"
export PATH=$PATH:$QC/bin:$QC/bin/perl

Then, either source this file yourself, or add the following line to your ~/.bashrc to load it by default with each new session:

source $HOME/bashrc.qchem.svn-casman

Running Q-Chem 5.2 Beta (librassf)

We also have a beta version of the librassf Q-Chem 5.2 branch installed in our group folder on the cluster. To run it, make a file called bashrc.qchem.librassf in your home directory and fill it with the following:

export qcSoft="/groups/nmayhall_lab/"
export QCPATH="$qcSoft/qchem5"
export QC="$QCPATH/qchem.librassf-dev"
export QC_EXT_LIBS="$qcSoft/qchem/qc_ext_libs"
export QCSCRATCH="$HOME/.qchem_scratch/"
export QCAUX="$QCPATH/qcaux"
export PATH=$PATH:$QC/bin:$QC/bin/perl

Then, either source this file yourself, or add the following line to your ~/.bashrc to load it by default with each new session:

source $HOME/bashrc.qchem.librassf

Sample Submission Script

A sample submission script for Q-Chem 4:

#PBS -l walltime=00:000:05:00
#PBS -l nodes=1:ppn=24
#PBS -l mem=120GB
#PBS -q nmayhall_lab
#PBS -A qcvt_doe
#PBS -W group_list=nmayhall_lab

# load environment
source $HOME/bashrc.qchem.svn-casman

# Do calculation
cd $PBS_O_WORKDIR
qchem input.in

exit;

To run with Q-Chem 5, just source the appropriate version of the bashrc.qchem file.