This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
howto:gaussian [2015/04/29 09:15] alopis [Gaussian at CHPC] |
howto:gaussian [2025/10/17 09:51] (current) alopis [Easy Gaussian09 and Gaussian16 PBS creation and submission] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Gaussian at CHPC ====== | ====== Gaussian at CHPC ====== | ||
| - | | + | This license can only be used by CHPC registered users, which are associated with either |
| + | Gaussian can be run over 1 or 2 nodes (see example below) | ||
| - | Gaussian can be run over single nodes or more than one node (see examples below), with an example input file below these. These two case are also possible using Job Arrays (see example scripts further below) which allow multiple jobs to be submitted as if they were one job (containing sub-jobs) | + | ====Easy Gaussian09 |
| + | In order to see all available Easy Scripts, first include/ | ||
| - | There are two modules of Gaussian 09 at CHPC which can be used. | + | module load chpc/ |
| - | Here is an example on how to access them: | + | |
| - | embele@login01: | + | Execute **qg09_E01** |
| - | embele@login01: | + | |
| - | embele@login01: | + | |
| - | + | ||
| - | + | ||
| - | ====Example PBSPro job script for Single Node Jobs (multiple CPU' | + | |
| - | <file bash gaussian_single.qsub> | + | This script handles PBS setup and submission. |
| + | Also takes care of jobs running over more than one node with LINDA and does cleanup of temporary GAU files when job is completed/ | ||
| - | #! /bin/sh | + | EXAMPLE1 |
| + | Enter project name/shortname | ||
| + | CHEM0100 | ||
| + | Enter input file (with .com or .gjf extension) | ||
| + | test.gjf | ||
| + | Enter number of nodes on which to run job | ||
| + | 1 | ||
| + | Enter total walltime (hour: | ||
| + | 2:00 | ||
| + | Enter email address | ||
| + | testing@gmail.com | ||
| + | Generated pbs file for test | ||
| + | Do you wish to submit job to cluster (y/n) | ||
| + | y | ||
| + | |||
| + | |||
| + | EXAMPLE2 [PLEASE TAKE NOTE OF EMPTY SPACES] | ||
| + | Enter project name/ | ||
| + | CHEM0100 | ||
| + | Enter input file (with .com or .gjf extension) | ||
| + | test.gjf | ||
| + | Enter number of nodes on which to run job | ||
| | | ||
| - | | + | |
| - | # nodes; walltime; your directory on scratch for standard out and error files ; email of job starting, | + | |
| - | # ending and errors | + | |
| | | ||
| - | | + | |
| - | | + | |
| - | #PBS -l walltime=2: | + | |
| - | #PBS -q workq | + | |
| - | #PBS -o / | + | y |
| - | | + | |
| - | | + | |
| - | #PBS -M MY_EMAIL_ADDRESS.com | + | |
| - | # End of comments | + | |
| | | ||
| - | # (2) This is to clean up temporary files which are left behind if Gaussian crashes. No changes required below. | ||
| - | cleanup_scratch() { | ||
| - | echo " | ||
| | | ||
| - | cd " | + | If you wish to use the utility **formchk** (to create readable format files for visualisers) please do the following. |
| - | rm -rfv " | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | | + | |
| - | exit 0 | + | |
| - | } | + | |
| | | ||
| - | | + | |
| - | | + | |
| | | ||
| - | # End of comments (2) No changes required above. | + | Then the command **formcheck** should be available |
| - | + | ||
| - | + | ||
| - | # (3) You can remove this 1st line below after you've run the script once, but is no problem if it remains. | + | |
| - | mkdir / | + | |
| - | + | ||
| - | # (4) Please leave this line unchanged. Creating a subdirectory with your jobid for Gaussian temporary files | + | |
| - | # which are removed after job. | + | |
| - | # Previously everone' | + | |
| - | mkdir / | + | |
| - | + | ||
| - | # (5) Change to your work directory. Specify if explictly if you find issues. | + | |
| - | cd $PBS_O_WORKDIR | + | |
| - | + | ||
| - | echo "My job starts here" | + | |
| - | date | + | |
| - | + | ||
| - | # (6) Please leave unchanged. This new module specifies the new directory for Gaussian variable GAUSS_SCRDIR | + | |
| - | # for temporary files directory. | + | |
| - | source / | + | |
| - | module add gaussian/ | + | |
| - | source / | + | |
| - | # (6) Please leave unchanged | + | |
| - | + | ||
| - | # (7) Edit your job input and log file names here. | + | |
| - | g09 < molecule.com > molecule.log | + | |
| - | + | ||
| - | # (8) Leave following unchanged. | + | |
| - | # Normal exit of script: clean up temporary files - Gaussian should | + | |
| - | # Remove the Gaussian scratch directory where temporary files are written. It is | + | |
| - | # / | + | |
| - | # If abnormal termination (walltime or job killed) then function subroutine cleanup_scratch will clear | + | |
| - | # temporary files. | + | |
| - | + | ||
| - | rm -rfv " | + | |
| - | + | ||
| - | echo " | + | |
| - | date | + | |
| - | ====Example PBSPro job script for 2 nodes or more:==== | + | |
| - | Please include the following line at the top of your input file (an example .com is provided below): | ||
| - | %lindaworkers=LINDA | ||
| - | <file bash gaussian_multiple.qsub> | + | You can use a **checkpoint |
| - | # | + | https:// |
| - | + | ||
| - | # (1) These are standard type lines for PBS job specification. Modify them for your own requirements - choice of | + | |
| - | # nodes; walltime; your directory on scratch for standard out and error files ; email of job starting, | + | |
| - | # ending and errors. | + | |
| - | + | ||
| - | #PBS -N molecule.job | + | |
| - | #PBS -l select=2:ncpus=12: | + | |
| - | #PBS -l walltime=03: | + | |
| - | #PBS -q workq | + | |
| - | #PBS -m abe | + | |
| - | #PBS -o /export/home/ | + | |
| - | #PBS -e / | + | |
| - | #PBS -M MY_Email_Address.com | + | |
| - | # End of comments (1) Make changes above. | + | |
| - | + | ||
| - | # (2) This is to clean up temporary files which are left behind if Gaussian crashes. No changes required below. | + | |
| - | cleanup_scratch() { | + | |
| - | echo " | + | |
| - | + | ||
| - | cd " | + | |
| - | rm -rfv " | + | |
| - | echo " | + | |
| - | echo " | + | |
| - | date | + | |
| - | exit 0 | + | |
| - | } | + | |
| - | + | ||
| - | # Associate function " | + | |
| - | trap ' | + | |
| - | + | ||
| - | # End of comments (2) No changes required above. | + | |
| - | + | ||
| - | # (3) You can remove this first line below after you've run the script once, but won't be problem if it remains. | + | |
| - | mkdir / | + | |
| - | + | ||
| - | # (4) Please leave this line unchanged. Creating a subdirectory with your jobid for temporary Gaussian files | + | |
| - | # which are removed after job. | + | |
| - | # Previously everone' | + | |
| - | mkdir / | + | |
| - | + | ||
| - | # (5) Change to your work directory. Specify if explictly if you find issues. | + | |
| - | # cd " | + | |
| - | cd / | + | |
| - | + | ||
| - | echo "My job starts here" | + | |
| - | date | + | |
| - | pwd | + | |
| - | + | ||
| - | # (6) Please leave unchanged. This new module specifies the new directory for Gaussian variable GAUSS_SCRDIR | + | |
| - | # for temporary files directory. | + | |
| - | source / | + | |
| - | module add gaussian/ | + | |
| - | source / | + | |
| - | # (6) Please leave unchanged | + | |
| - | + | ||
| - | # (7) Edit your job input and log file names here. In this these are molecule.com and molecule.log. | + | |
| - | # Please leave remaining text unchanged. | + | |
| - | LINDA=`cat $PBS_NODEFILE | uniq | tr ' | + | |
| - | echo linda: $LINDA | + | |
| - | cat molecule.com | sed "s/LINDA/$LINDA/" | + | |
| - | g09 < temp$$.inp > molecule.log | + | |
| - | # (7) Edit as specified above please. | + | |
| - | + | ||
| - | # (8) Leave following unchanged. | + | |
| - | # Normal exit of script: clean up temporary files - Gaussian should do this anyway, but to be safe. | + | |
| - | # Remove the Gaussian scratch directory where temporary files are written. It is | + | |
| - | # / | + | |
| - | # If abnormal termination (walltime or job killed) then function subroutine cleanup_scratch will clear | + | |
| - | # temporary files. | + | |
| - | + | ||
| - | rm -rfv " | + | |
| - | + | ||
| - | echo " | + | |
| - | date | + | |
| + | https:// | ||
| + | https:// | ||
| + | https:// | ||
| - | Example of a gaussian input file, note the blank lines within | + | Very occassionally |
| - | + | ||
| - | %nprocshared=12 | + | |
| - | %nprocl=1 | + | |
| - | #P HF/6-31G* IOP(6/ | + | |
| - | + | ||
| - | Title Card Required | + | |
| - | + | ||
| - | 0 1 | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | + | ||
| - | + | ||
| + | Please **recheck** your molecular **geometry very carefully** to ensure there are no issues - this will result in calculations which take much longer than necessary. | ||