QChem

Webpage: Q-Chem 5.4 Manual

A Q-Chem input file has two key parts:
Part_1 is the molecule specification, and Part_2 is “rem” variable set-up that defines what type of calculation it is/specifics of the job. See the details below.

Part_1 Three different ways to specify molecule in a QChem job:

1) Cartesian coordinate in Ångstroms:
-------------------------------------
  $molecule
  [charge] [multiplicity]
  [Cartesian coordinates in Ångstroms]
  $end

2) Read from a previous calculation:
------------------------------------
  $molecule
  read
  $end

3) Read from a file:
--------------------
  $molecule
  read filename
  $end

  Here, "filename" should have the standard Q-Chem format, i.e.,
  [charge] [multiplicity]
  [Cartesian coordinates in Ångstroms]

Part_2 General syntax of a $rem variable is:

$rem
REM_VARIABLE   VALUE
$end

or:

$rem
REM_VARIABLE  =  VALUE
$end

Note that the "=" sign is ignored by the code

A complete input for sigle-point electronic energy calculation of an ethylene cation using QChem is:

$molecule
1 2
  C      0.000000    0.000000    0.000000
  C      1.332000    0.000000    0.000000
  H     -0.574301    0.000000   -0.928785
  H     -0.574301    0.000000    0.928785
  H      1.906301    0.000000    0.928785
  H      1.906301    0.000000   -0.928785
$end

$rem
  jobtype          sp
  method           wb97x-d
  basis            6-31+g(d)
  unrestricted     true
  scf_convergence  8
  thresh           14
  symmetry         false
  sym_ignore       true
$end

Here is an example script that runs Q-Chem 5.4.2 job:

#!/bin/bash
#
#SBATCH -J my_qchem_job
#SBATCH -e my_qchem_job.e
#SBATCH -o my_qchem_job.o
#
#SBATCH --mail-user=your_username@mpip-mainz.mpg.de
#SBATCH --mail-type=FAIL
#
#SBATCH --mem=60000
#SBATCH --ntasks-per-node=20
#SBATCH --partition=CPU_Std20
#SBATCH --time=24:00:00

ulimit -s unlimited
ulimit -t unlimited

job=${SLURM_JOB_NAME}
workdir=${SLURM_SUBMIT_DIR}

#---------Define TEMP directory and JOB directory------------------------------
#------------------------------------------------------------------------------
TMPDIR=/usr/scratch/$USER
mkdir -p $TMPDIR/$SLURM_JOB_ID
JOBDIR=$TMPDIR/$SLURM_JOB_ID

#---------Write job run details at the begining of output----------------------
#------------------------------------------------------------------------------
echo "Node running the job is: ${SLURM_JOB_NODELIST}" >> $workdir/$job.out
echo "TEMP Job directory is: ${JOBDIR}" >> $workdir/$job.out
echo "PWD is: ${workdir}" >> $workdir/$job.out
echo "Slurm Job ID is: ${SLURM_JOB_ID}" >>  $workdir/$job.out
echo " " >> $workdir/$job.out
echo "----------Output from QChem starts now----------" >> $workdir/$job.out
echo " " >> $workdir/$job.out

#---------Go to TEMP and bring input files from JOBDIR-------------------------
#-------(MUST change to your MPIP machine number pckrXYZ)----------------------
cd $JOBDIR

rsync -ar pckrXYZ:$workdir/$job.in $JOBDIR/

#---------QChem binaries and scratch space-------------------------------------
#------------------------------------------------------------------------------
export QC=/sw/linux/q-chem/5.4.0
export QCPLATFORM=LINUX_Ix86_64
export QCAUX=/sw/linux/q-chem/5.4.0/qcaux
export QCSCRATCH=$JOBDIR
export QCRSH=ssh
export QCMPI=mpich3

#---------Run the code---------------------------------------------------------
#------------------------------------------------------------------------------
/sw/linux/q-chem/5.4.0/bin/qchem -nt 20 $job.in >> $workdir/$job.out

#---------Copy files: from job_dir BACK to your work_dir-----------------------
#------------------------------------------------------------------------------
rsync -ar $JOBDIR/*.* $workdir

#---------Clean up: remove JOBDIR from the scratch space-----------------------
#------------------------------------------------------------------------------
rm -rf $JOBDIR