molpro on dirac

molpro2002

Molpro is an ab initio quantum chemistry package.

The manual is in /usr/local/Cluster-Docs/Molpro2002, as well as from the molpro website. There are also example input files in /usr/local/Cluster-Docs/Molpro2002/examples. The serial version of molpro is called molpros. Remember that there is a limit of 2 GB on the size of a file, which may affect integral files. The keyword to recalculate, rather than store integrals is gdirect.

There is a sample job submission script called runmolpros.example in /usr/local/sbin, which is also shown below.

Copy the script from /usr/local/sbin and rename it to something appropriate. Edit the line:

      #PBS -l walltime=02:00:00

replacing 02:00:00 (2 hours) by the amount of time your job will need (plus a safely margin).

Edit the line:

      setenv MYDIR ${HOME}/TMOLPRO2

replacing TMOLPRO2 by the path, relative to your home directory, of the directory where your input file is and where you want your output file to go. ${HOME} is automatically expanded to the path of your home directory.

Edit the line:

      setenv MYINFILE long.com

replacing long.com by the name of your input file. Molpro apparently likes your input file to be called something.com, and the output file is then called something.log. Submit the job with the command:

      qsub your_filename

where your_filename is the name you have given to the script.

The script will create a scratch directory on the node where your job will run and set up the molpro variables. It will create a file called rundat in your working directory, giving the node on which the job is running and the name of the scratch directory. It will then run the job and afterwards delete the scratch directory. If molpro crashes the scratch directory will still be deleted, but if you kill the job, you should delete the scratch directory yourself, getting the information from the rundat file.

#!/bin/tcsh -f
#
# edit this line for the amount of time you need
#PBS -l walltime=02:00:00
#
# merge stderr with stdout
#PBS -j oe
#
#-----------------------------------------------
#     this section needs altering
#
#  the directory where your input is and output
#  will go. ${HOME} is your home directory
setenv MYDIR ${HOME}/TMOLPRO2
#
#  the name of your input file
setenv MYINFILE long.com
#
#-----------------------------------------------
#      this section does not need altering
#
#  get name for scratch directory and create it
setenv JOBNO "`echo $PBS_JOBID | sed s/.dirac.chm.bris.ac.uk//`"
setenv SCRATCHDIR "/data/${PBS_O_LOGNAME}.${JOBNO}"
mkdir ${SCRATCHDIR}
#
#  do molpro setup
setenv MOLPRO_SCRDIR ${SCRATCHDIR}
setenv MOLPRO_RCFILE molpros_2002_3.rc
#
#  store name of node and scratch directory in file
#  rundat in file directory
hostname > ${MYDIR}/rundat
echo ${SCRATCHDIR} >> ${MYDIR}/rundat
#
#  move to working directory
cd ${MYDIR}
#
#  run molpros
molpros ${MYINFILE}
#
#  delete scratch directory
rm -fr ${SCRATCHDIR}