Q-Chem 4.3 User’s Manual

3.26 Multiple Jobs in a Single File: Q-Chem Batch Job Files

It is sometimes useful to place a series of jobs into a single ASCII file. This feature is supported by Q-Chem and is invoked by separating jobs with the string @@@ on a single line. All output is subsequently appended to the same output file for each job within the file.

Note: The first job will overwrite any existing output file of the same name in the working directory. Restarting the job will also overwrite any existing file.

In general, multiple jobs are placed in a single file for two reasons:

  1. To use information from a prior job in a later job

  2. To keep projects together in a single file

The @@@ feature allows these objectives to be met, but the following points should be noted:

Using batch files with the @@@ separator is clearly most useful for cases relating to point 1 above. The alternative would be to cut and paste output, and/or use a third command line argument to save scratch files between separate runs.

For example, the following input file will optimize the geometry of H$_{2}$ at HF/6-31G*, calculate vibrational frequencies at HF/6-31G* using the optimized geometry and the self-consistent MO coefficients from the optimization and, finally, perform a single point energy using the optimized geometry at the MP2/6-311G(d,p) level of theory. Each job will use the same scratch area, reading files from previous runs as instructed.

Example 3.18  Example of using information from previous jobs in a single input file.

$comment
   Optimize H-H at HF/6-31G*
$end

$molecule
   0 1
   H
   H  1  r

   r = 1.1
$end

$rem
   JOBTYPE       opt    Optimize the bond length
   METHOD        hf
   BASIS         6-31G*
$end

@@@

$comment
   Now calculate the frequency of H-H at the same level of theory.
$end

$molecule
   read
$end

$rem
   JOBTYPE       freq    Calculate vibrational frequency
   METHOD        hf
   BASIS         6-31G*
   SCF_GUESS     read    Read the MOs from disk
$end

@@@

$comment
  Now a single point calculation at at MP2/6-311G(d,p)//HF/6-31G*
$end

$molecule
   read
$end

$rem
   METHOD        mp2
   BASIS         6-311G(d,p)
$end

Note: (1) Output is concatenated into the same output file.
(2) Only two arguments are necessarily supplied to the command line interface.