Recent Changes - Search:

edit SideBar

Scripts For Calculating Harmonic Frequencies By Finite Differences In Parallel

For those who wish to run harmonic frequency calculations via VIB=FINDIF in parallel, the following might be helpful. The actual "nuts and bolts" of such a calculation is described in Calculating Harmonic Frequencies By Finite Differences In Parallel, but the following (csh, sorry) scripts can help and might be useful.

First, we start with the ZMAT file

   water 
H
O 1 R
H 2 R 1 A

R = 0.964203501252364
A = 103.602079370900668

*CFOUR(CALC=CCSD[T],BASIS=ANO0,CC_CONV=9,LINEQ_CONV=9
SCF_CONV=9,DROPMO=1
FREQ_ALGORITHM=PARALLEL,VIB=FINDIF)

which is used in the example above. The following csh script will generate all of the files needed to run the job, and generate all the run scripts, provided you are willing to use the "run.dummy" script that is used as a template for all other run scripts.

run.dummy script:

#$ -S /bin/csh
#$ -N job.xxxxx
#PBS -l nodes=1
#$ -l vf=500M
set codedir=(~stanton/git/aces2)
set basisdir=(~stanton/git/aces2/basis)
set workdir=(~stanton/n2co/excite/ccsdt/anharm/play)
set tmpdir=(/scr/stanton/job.xxxxx)
set path=(~/git/aces2/bin $path)
mkdir $tmpdir
cd $tmpdir
rm *
cp $workdir/zmatxxxxx ZMAT
cp $basisdir/GENBAS GENBAS
xaces2 > $workdir/out.xxxxx
xja2fja
cp FJOBARC $workdir/fja.xxxxx
cd ..

Note that the lines in blue are specific to your particular queuing system; those in red depend on how and where you have built the program (which probably will rarely change), the directory where you have the ZMAT file with the optimized geometry (which will probably always change). It is just the black lines (and black text in the otherwise red line) that is/are important, since this script serves as a template for the script below:

Script for generating input files and runscripts

Script pfindif_setup

#!/bin/csh
#!
#! Run this script to initialize and then set up files and runscripts for
#! parallel FINDIF harmonic calculation.
#!
xjoda > xjodaout
xsymcor > xsymcorout
foreach k (zmat*)
grep -i "parallel findif" $k >& /dev/null
if ($status == 0)then
set l = `echo $k | sed 's/zmat//' `
sed s/job.xxxxx/job.000.$l/g < run.dummy > run.tmp
sed /'set workdir'/d < run.tmp > run.tmp2
sed '/set tmpdir/ i\set workdir=\('$PWD''\) < run.tmp2 > run.tmp3
sed s/xxxxx/$l/g < run.tmp3 > run.000.$l
rm run.t*
else
echo "file $k is of wrong type and is not used"
endif
end

Procedure for running jobs

1. Create a directory, and place a ZMAT file similar to that at the top of the file in place.
2. Create an appropriate run.dummy script with all black lines from the template above unaltered, and put it in the same directory.
3. Run the script above.
4. Run, at your leisure (or all at once) the run scripts, which will be called run.000.xxx.

5. Proceed to step 4 in Calculating Harmonic Frequencies By Finite Differences In Parallel

Edit - History - Print - Recent Changes - Search
Page last modified on December 28, 2012, at 06:48 PM
CFOUR is partially supported by the U.S. National Science Foundation.