NERSCPowering Scientific Discovery Since 1974

Q-Chem

Description 

Q-Chem is a comprehensive ab initio quantum chemistry package for accurate predictions of molecular structures, reactivities, and vibrational, electronic and NMR spectra. The new release of Q-Chem 5 represents the state-of-the-art of methodology from the highest performance DFT/HF calculations to high level post-HF correlation methods:

  • Fully integrated graphic interface including molecular builder, input generator, contextual help and visualization toolkit (See amazing image below generated with IQmol; multiple copies available free of charge);
  • Dispersion-corrected and double hybrid DFT functionals;
  • Faster algorithms for DFT, HF, and coupled-cluster calculations;
  • Structures and vibrations of excited states with TD-DFT;
  • Methods for mapping complicated potential energy surfaces;
  • Efficient valence space models for strong correlation;
  • More choices for excited states, solvation, and charge-transfer;
  • Effective Fragment Potential and QM/MM for large systems;
  • For a complete list of new features, click here.

How to Access Q-Chem

NERSC uses modules to manage access to software.  To use the default version of Q-Chem, type:

%  module load qchem

Running Q-Chem on Cori and Edison

To run Q-Chem parallel jobs interactively on Cori or Edison, you need to request a batch session using the salloc command in your run directory, e.g., the following command request one Haswell node on Cori for 1 hour, 

% salloc -N 1 -q interactive -C haswell -t 1:00:00

There is no interactive QOS on Edison, so to run Q-Chem interactively on Edison, do

% salloc -N 1 -q debug -t 30:00

When the batch session returns with a shell prompt, you will be on a compute node. Then execute the following commands to run Q-Chem 

% module load qchem
% qchem -slurm -np 2 -nt 2 <Q-Chem input file>

The above qchem command will run the code with two MPI tasks (-np 2) each with two OpenMP threads (-nt 2) on a Cori Haswell node. 

To run batch jobs, you need to submit a batch script using the sbatch command. Here is a sample batch scripts:

Sample job script for Cori

#!/bin/bash -l
#SBATCH -q debug
#SBATCH -N 2
#SBATCH -t 00:30:00
#SBATCH -J my_job
#SBATCH -L SCRATCH
#SBATCH -C haswell

module load qchem
qchem -slurm -np 4 -nt 2 B3LYP_water.in
 

This script requests to run qchem on two Cori Haswell nodes with four MPI tasks (-np 4) (2 MPI tasks per node) and two OpenMP threads (-nt 2) per task.

Sample job script for Edison

#!/bin/bash -l
#SBATCH -q debug
#SBATCH -N 2
#SBATCH -t 00:30:00
#SBATCH -J my_job
#SBATCH -L SCRATCH

module load qchem
qchem -slurm -np 4 -nt 2 B3LYP_water.in
  

If you run single node Q-Chem jobs and do not need all the cores and memory available on the node, you can run your jobs under the shared QOS, which then you will be charged less. For more information about using the shared QOS, see our running jobs page. Here is a sample job script to run Q-Chem with the shared QOS:

Sample job script to run under the shared QOS

#!/bin/bash -l
#SBATCH -q shared
#SBATCH -n 2
#SBATCH -t 1:00:00
#SBATCH -J my_job
#SBATCH -L SCRATCH

module load qchem
qchem -slurm -np 2 -nt 1 B3LYP_water.in
 

The above script requests two cores (-n 2) (four CPUs in total) for 1 hour.

Sample job script to run Q-Chem in serial

#!/bin/bash -l
#SBATCH -q shared
#SBATCH -n 1
#SBATCH -t 1:00:00
#SBATCH -J my_job
#SBATCH -L SCRATCH

module load qchem
qchem -seq -nt 1 B3LYP_water.in
 

Note that the -seq option allows you to invoke qchem without the parallel job launcher, srun. This is recommended for short Q-Chem jobs, especially if you need to run many short Q-Chem jobs in serial with job arrays. 

Documentation

Q-Chem 5.0 Manual [PDF] [Html]

Availability

PackagePlatformCategoryVersionModuleInstall DateDate Made Default
Q-Chem cori applications/ chemistry 5.1 qchem/5.1 2018-06-27
Q-Chem cori applications/ chemistry 5.1.2 qchem/5.1.2 2019-02-14
Q-Chem cori applications/ chemistry 5.1beta qchem/5.1beta 2018-04-03 2018-04-03
Q-Chem edison applications/ chemistry 5.1 qchem/5.1 2018-06-28
Q-Chem edison applications/ chemistry 5.1.2 qchem/5.1.2 2019-02-14
Q-Chem edison applications/ chemistry 5.1beta qchem/5.1beta 2018-04-24 2018-04-24