Skip to content

Setting up AaronTools

Steven E. Wheeler edited this page Jul 11, 2018 · 27 revisions

Table of Contents

Overview

This tutorial will walk you through setting up AaronTools.

AaronTools is a collection of Perl modules for building, manipulating, and probing molecular structures, parsing Gaussian09 output files, and interacting with HPC queuing systems.

Requirements for AaronTools

  1. Perl (reasonably recent version)
  2. Perl modules Math::Vector::Real and Math::MatrixReal (available from CPAN)
  3. AaronTools

Setting Up AaronTools

(below, we assume you are using BASH or a related shell)

Minimal Install

If you only wish to use AaronTools to build, manipulate, and probe molecular structures and to parse Gaussian09 output files, but not submit or monitor jobs, the minimal setup is as follows:

1. Create a directory where you will keep the main files for AaronTools

 cd /home/group/wheeler
 mkdir QChASM

The preferred way to set up AaronTools is to have one central copy in a location accessible by all users. If individuals wish to add their own custom ligands, TS libraries, etc., these are kept in $HOME/Aaron_libs

2. Define an environmental variable QCHASM

This will point to the directory you just created

 echo 'export QCHASM=/home/group/wheeler/QChASM' >> ~/.bashrc

3. Define an environmental variable PERL_LIB

This points to the directory where Math::Vector::Real and Math::MatrixReal are installed

 echo 'export PERL_LIB=/home/group/wheeler/Perl' >> ~/.bashrc
 source ~/.bashrc

4. Change into $QCHASM and clone AaronTools from GitHub

 cd $QCHASM
 git clone https://github.com/QChASM/Aaron.git

5. Run Simple Tests

To make sure everything is set up correctly and all required software is in place, you can run a series of quick tests

 cd $QCHASM/AaronTools/tests
 ./test_simple_install

This will run X tests, which cover basic functionalities of AaronTools. Ignore any warnings unless there is an indication of a failed test.

6. Add AaronTools to your PATH

 echo 'export PATH=$PATH:$QCHASM/AaronTools/bin' >> ~/.bashrc

Full Install

To enable AaronTools to submit and monitor Gaussian jobs on an HPC cluster, you will also need:

  1. Gaussian09 (Gaussian16 support coming soon!)
  2. Moab/Torque (PBS), LSF, or Slurm queuing software
Note: A full install of AaronTools is required for AARON (https://github.com/QChASM/Aaron/wiki).

7. Define an environmental variable QUEUE_TYPE

This tells AaronTools which queuing software your cluster uses. "PBS" (Moab/Torque), "Slurm", and "LSF" queue types are currently supported.

 echo 'export QUEUE_TYPE=PBS' >> ~/.bashrc

8. Create template.job

You need to create a file called template.job in $QCHASM/AaronTools that contains a generic job submission script for your HPC cluster. AaronTools will use this generic job script to construct submission scripts for individual jobs.

The easiest way to do this is to generate a job submission script for a typical Gaussian09 computation and then make the following replacements:

job name -> $jobname

wall time (in hours) -> $walltime

number of cores -> $numprocs

Note: AaronTools will not specify the number of cores or memory in the G09 input file, so the job submission script (template.job) must take care of this when it calls g09 via -p=XXX and -m=XXX or by creating a Default.Route file. See the example below for the former, which we find to be preferable.

For job parameters that depend on the number of processors (e.g. memory), you need to define a &forumula& section at the bottom of template.job to calculate these:

For example

 &formula&
 $memory=$numprocs*2
 $G09memory=$numprocs*1.5
 &formula&

will determine the memory requested for the node ($memory, 2GB per core) and the memory allotted to Gaussian09 ($G09memory, 1.5GB per core, being careful to only run on an even number of cores!) based on $numprocs

For example, suppose this was a normal job submission script for your cluster for an input file called water.com (using Moab/Torque in this case):

 #PBS -S /bin/bash
 #PBS -N water
 #PBS -q wheeler_q
 #PBS -l nodes=1:ppn=28:Intel
 #PBS -l walltime=12:00:00
 #PBS -l mem=56gb
 module purge
 module load gaussian/09-Intel-SSE4_2
 export GAUSS_SCRDIR=/lscratch/$USER/$PBS_JOBID
 trap "rm -r $GAUSS_SCRDIR" 0 1 2 3 9 13 14 15
 mkdir -p $GAUSS_SCRDIR
 . $g09root/g09/bsd/g09.profile
 cd $GAUSS_SCRDIR
 find $PBS_O_WORKDIR -maxdepth 1 -name "*.chk" -exec cp {} . \;
 g09 -m="42GB" -p=28 $PBS_O_WORKDIR/water.com $PBS_O_WORKDIR/water.log
 if [ -e *.chk ]; then
   for chkfile in *.chk; do
     cp $chkfile.chk $PBS_O_WORKDIR/.
   done
 fi
 exit

Your template.job file would look like this:

 #PBS -S /bin/bash
 #PBS -N $jobname
 #PBS -q wheeler_q
 #PBS -l nodes=1:ppn=$numprocs:Intel
 #PBS -l walltime=$walltime:00:00
 #PBS -l mem=$memorygb
 module purge
 module load gaussian/09-Intel-SSE4_2
 export GAUSS_SCRDIR=/lscratch/$USER/$PBS_JOBID
 trap "rm -r $GAUSS_SCRDIR" 0 1 2 3 9 13 14 15
 mkdir -p $GAUSS_SCRDIR
 . $g09root/g09/bsd/g09.profile
 cd $GAUSS_SCRDIR
 find $PBS_O_WORKDIR -maxdepth 1 -name "*.chk" -exec cp {} . \;
 g09 -m="$G09memoryGB" -p=$numprocs $PBS_O_WORKDIR/water.com $PBS_O_WORKDIR/water.log
 if [ -e *.chk ]; then
   for chkfile in *.chk; do
     cp $chkfile.chk $PBS_O_WORKDIR/.
   done
 fi
 exit
 &formula&
 $memory=$numprocs*2
 $G09memory=$numprocs*1.5
 &formula&

9. Run Full Tests

To make sure everything is set up correctly and all required software is in place, run the full set of tests

 cd $QCHASM/AaronTools/tests
 ./test_full_install

This will run 8 tests, which cover basic functionalities of AaronTools. Ignore any warnings unless there is an indication of a failed test.

After test 0007, it is important to check the file $QCHASM/AaronTools/tests/0007/test.job, which is generated by AaronTools based on your template.job. Make sure that the number of cores and walltime are correctly specified.

The most likely test to fail is 0007, which tests the ability of AaronTools to submit, find, and kill jobs on the queue. The most likely reason for failure is problems with template.job. If 0007 fails, check test.job, which was generated by AaronTools based on $QCHASM/AaronTools/template.job and adjust $template.job accordingly. Contact catalysttrends@uga.edu if you continue to have problems.

Clone this wiki locally