Biowulf at the NIH
Q-Chem on Biowulf
qchem_logo Q-Chem 2.1 is an ab initio electronic structure program developed by Q-Chem Inc. It is capable of performing first principles calculations on both the ground and excited states of molecules.

Q-Chem 2.1 brings together a variety of advanced computational methods and tools in an integrated ab initio software package. Q-Chem 2.1 greatly expands the features and capabilities over previous versions of Q-Chem, including a number of methods that are not available in any other package.

Q-Chem setup

The Q-Chem executables are located in /usr/local/qchem-2.1.0.3. These executables are built with the MPICH and the Portland Group Compilers.

The current executable is designed to run fairly efficiently on Fast Ethernet or Gigabit Ethernet via standard message passing. However, myrinet capable executables will be made available upon request.

Q-Chem requires four shell environment variables in order to run calculations:

QC
defines the location of the Q-Chem directory structure. The qchem.install shell script determines this auto matically.
QCAUX
defines the location of the auxiliary informat ion required by Q-Chem, which includes the license required to run Q-Chem. If not explicitly set by the user, this defaults to $QC/aux.
QCSCRATCH
defines the directory in which Q-Chem will store temporary files. Q-Chem will usually remove these files on successful completion of the job, but they can be saved, if so wished. Therefore, QCSCRATCH should not reside in a directory t hat will be automatically removed at the end of a job, if the files are to be kept for further calculations. Note that many of these files can be very large, and it should be ensured that the volume that contains this directory has sufficient disk space available. The QCSCRATCH directory should be periodically checked for scratch files remaining from abnormally terminated jobs. QCSCRATCH defaults to the working directory if not explicitly set. Please see section 2.6.1 for details on saving temporary files and consult your systems administrator.
QCLOCALSCR
on certain platforms, such as Linux clusters, it is sometimes preferable to write the temporary files to a disk lo cal to a node. QCLOCALSCR specifies this directory. The temporary files will be copied to QCSCRATCH at the end of the job, unless the job is terminated abnormally. In such cases Q-Chem will attempt to remove the files in QCLOCALSCR, but may not be able to due to access restrictions. Please specify this variable only if required.
Submitting a Q-Chem batch job

For basic information about setting up an Q-Chem jobs, see the Q-Chem manual (PDF). Also see Batch Queuing System in the Biowulf user guide, especially the section on Running MPICH Jobs under Batch.

It is usually convenient to put the QChemm environment variable setup into the .tcshrc or .bashrc file, or alternatively, into a separate file that is sourced in the batch script. For example,

#!/bin/csh
# This file is /home/username/qchem.init
#
setenv QC /usr/local/qchem-2.1.0.3
setenv QCAUX $QC/aux
setenv QCSCRATCH /scratch
if (-e ${QC}/bin/qchem.setup) source ${QC}/bin/qchem.setup
unset noclobber
This file is sourced in the batch scripts below to set up the QChem environment variables.

Sample script for a Serial Q-Chem run:

#!/bin/csh
# This file is runjob.qchem
#
#PBS -N Example
#PBS -m be
#PBS -k oe

source /home/username/qchem.init
cd $PBS_O_WORKDIR
$QC/bin/qchem input.dat output.dat

This runs a single processor Q-Chem job and is submitted with the following....

qsub -v np=1 -l nodes=1:p2800 runjob.qchem
Parallel Q-Chem jobs

Sample script for a Parallel Q-Chem run:

#!/bin/csh
# This file is runjob.qchem
#
#PBS -N Example
#PBS -m be
#PBS -k oe

setenv PATH /usr/local/mpich/bin:$PATH
source /home/username/qchem.init
cd $PBS_O_WORKDIR
$QC/bin/qchem -np 2 input.dat output.dat

This runs a parallel Q-Chem job on 2 processors and is submitted with the following....

qsub -v np=2 -l nodes=1:p2800 runjob.qchem
For sample Q-Chem input files please look at the files in /usr/local/qchem-2.1.0.3/samples Both input files and reference (output) files for all sample calculations are provided to help users become acquainted with running the program.
Interactive Q-Chem jobs

Users should submit Q-Chem jobs in batch under most circumstances. For debugging purposes it may be useful to occasionally run a job interactively. Interactive jobs should not be run on the Biowulf login node. Instead, an interactive node should be allocated and the job run on that node. Here is an example:

For bash:

[joe@biobos]$ qsub -I -l nodes=1
qsub: waiting for job 511136.biobos to start
qsub: job 511136.biobos ready

[joe@p934 ~]$ QC=/usr/local/qchem-2.1.0.3; export QC
[joe@p934 ~]$ QCAUX=$QC/aux; export QCAUX
[joe@p934 ~]$ QCSCRATCH=/scratch; export QCSCRATCH
[joe@p934 ~]$ noclobber=""
[joe@p934 ~]$ if  [ -e ${QC}/bin/qchem.setup.sh ] ; then
>    . ${QC}/bin/qchem.setup.sh
>fi
[joe@p934 ~]$ qchem infile outfile

For (t)csh...

[joe@biobos]$ qsub -I -l nodes=1
qsub: waiting for job 511136.biobos to start
qsub: job 511136.biobos ready

[joe@p231 ~]$ setenv QC /usr/local/qchem-2.1.0.3
[joe@p231 ~]$ setenv QCAUX $QC/aux
[joe@p231 ~]$ setenv QCSCRATCH /scratch
[joe@p231 ~]$ if (-e ${QC}/bin/qchem.setup) source ${QC}/bin/qchem.setup
[joe@p231 ~]$ unset noclobber
[joe@p231 ~]$ qchem infile outfile

In the above examples, a simple interactive Q-Chem job has been run with the command qchem infile outfile. There are several other ways to run a QChem job, as below:

SERIAL Q-CHEM: The qchem shell script can be used in either of the following ways:

     qchem infile outfile

     qchem infile outfile savename

     qchem -save infile outfile savename
PARALLEL Q-CHEM: Running the parallel version of Q-Chem interactively is the almost the same as running the serial version, except that the path should include MPICH, and an additional argument -np n must be given that specifies the number of processors to use.

To set the path, use

     setenv PATH /usr/local/mpich/bin:$PATH (tcsh)
     or
     PATH=/usr/local/mpich/bin:$PATH; export PATH (bash)

The qchem shell script can be used in either of the following ways:
     qchem -np n infile outfile

     qchem -np n infile outfile savename

     qchem -save -np n infile outfile savename
where n is the number of processors to use. If the np switch is not given Q-Chem will default to running locally on a single processor.
Documentation
Q-Chem Inc. Website
Q-Chem User's