OPTIM/Q-Chem Tutorial

From Docswiki
Jump to navigation Jump to search

Setup Q-Chem

First ensure that Q-Chem is installed: if

 qchem

gives

 Need at least to specify the input file.
 Usage: qchem [ -save ] [ -np procs ] infile [ outfile ] [ dir ]

then skip to the next section. Otherwise you will need to add the following line to your ~/.bashrc file, and then source your ~/.bashrc

 . ~ajwt3/code/qchem/qcsetup.bash

H2O test

create a new directory with the following files h2o.inp

 $comment
 water    HF   3-21G*   Single point energy
 $end
 
 $molecule
 0  1
 O        -0.4160001815        0.0000000000        0.0454252753
 H        -0.9343018760        0.0000000000       -0.8673296731
 H         0.3503028923        0.0000000000        0.0194028911
 $end
 
 $rem
 EXCHANGE           HF       Exact exchange
 BASIS              3-21G*   Basis Set
 SCF_CONVERGENCE    8        Tight convergence
 jobtype force
 sym_ignore true
 $end

h2o

 $comment
 water    HF   3-21G*   Single point energy
 $end
 
 $molecule
 0  1
 O        -0.4160001815        0.0000000000        0.0454252753
 H        -0.9343018760        0.0000000000       -0.8673296731
 H         0.3503028923        0.0000000000        0.0194028911
 $end
 
 $rem
 scf_guess read
 EXCHANGE           HF       Exact exchange
 BASIS              3-21G*   Basis Set
 SCF_CONVERGENCE    8        Tight convergence
 jobtype force
 sym_ignore true
 $end

and odata

 STEPS           20
 DEBUG
 QCHEM 'qchem -save' 'h2o' 'h2osavedir'
 BFGSMIN 1.0D-5
 POINTS

h2o.inp will be used to create an initial scf calculation which will be used to restart the OPTIM runs

 qchem -save h2o.inp h2o.out h2osavedir

This will create h2o.out as well as $QCSCRATCH/h2osavedir where the converged calculation will save its files. Without the -save, Q-Chem will delete its working files. Check that it's actually worked:

 ajwt3@dexter:~/calc/qchem_optim_test/test1$ tail h2o.out 
  Total job time:  0.12s(wall), 0.11s(cpu) 
  Wed Sep 18 17:44:58 2013
 
         *************************************************************
         *                                                           *
         *  Thank you very much for using Q-Chem.  Have a nice day.  *
         *                                                           *
         *************************************************************

If not then email me to work out what's wrong.

Now we can inspect the QCHEM line of the odata file. The first option is how to run Q-Chem. The second is the input file name, and the third is Q-Chem's working directory. The only difference between h2o and h2o.inp is that the former includes the line

 scf_guess read

which indicates it should restart from the previous calculation.

Now you can run OPTIM and sit back and relax.