User Tools

Site Tools


howto:gaussian

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howto:gaussian [2015/04/10 15:47]
alopis [Example PBSPro job script for Single Node Jobs (multiple CPU's):]
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 ======
  
-  * **NOTE : You should always run your jobs on directory ''scratch5''**+This license can only be used by CHPC registered users, which are associated with either **South African** or **SKA partner** higher education institutions
  
 +Gaussian can be run over 1 or 2 nodes (see example below) 
  
-There are two modules of Gaussian 09 at CHPC which can be used. +====Easy Gaussian09 and Gaussian16 PBS creation and submission====
-Here is an example on how to access them:+
  
-  embele@login01:~/scratch5 $ module avail                   ### list available modules +In order to see all available Easy Scripts, first include/load this module - even better if your add this line to your .bashrc:
-  embele@login01:~/scratch5 $ module add gaussian/g09.D01    ### load g09 version D01 (previous) or +
-  embele@login01:~/scratch5 $ module add gaussian/g09.anton  ### load g09 version anton (new, Recommended) +
-  +
-  +
-====Example PBSPro job script for Single Node Jobs (multiple CPU's):====+
  
-<file bash gaussian_single.qsub>+  module load chpc/easy_scripts
  
-Please include the following line at the top of your input (.com) file:+Execute **qg09_E01** or **qg16_A03** or **qg16_B01** or **qg16_C01**
  
-%lindaworkers=LINDA+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/killed. Examples of these scripts are provided below.
  
-  #! /bin/sh +              EXAMPLE1 
-   +  Enter project name/shortname 
-  # (1) These are standard type lines for PBS job specification. Modify them for your own requirements - choice of +  CHEM0100 
-  # nodes; walltime; your directory on scratch for standard out and error files ; email of job starting, +  Enter input file (with .com or .gjf extension
-  # ending and errors +  test.gjf 
-   +  Enter number of nodes on which to run job 
-  #PBS -N molecule.job +  1 
-  #PBS -l select=1:ncpus=12:jobtype=westmere,place=free:group=nodetype +  Enter total walltime (hour:minute
-  #PBS -l walltime=2:31:00 +  2:00 
-  #PBS -q workq      +  Enter email address 
-  #PBS -o /export/home/aslopis/scratch5/Gaussian_Support/C60_4/molecule.out +  testing@gmail.com 
-  #PBS -e /export/home/aslopis/scratch5/Gaussian_Support/C60_4/molecule.err +  Generated pbs file for test 
-  #PBS -m abe +  Do you wish to submit job to cluster (y/n
-  #PBS -M MY_EMAIL_ADDRESS.com +  y
-  # End of comments (1)  Make changes above. +
-   +
-  # (2This is to clean up temporary files which are left behind if Gaussian crashes. No changes required below.    +
-  cleanup_scratch() { +
-      echo "Deleting inside signal handler, meaning I either hit the walltime, or deleted the job using qdel" +
-   +
-      cd "$PBS_O_WORKDIR" +
-      rm -rfv "$GAUSS_SCRDIR" +
-     echo "---" +
-     echo "Signal handler ending time:" +
-     date +
-     exit 0 +
-  } +
-   +
-  # Associate function "cleanup_scratch" with the TERM signal (and others), which is usually how jobs get killed+
-  trap 'cleanup_scratch' SIGTERM SIGHUP SIGINT SIGQUIT SIGFPE SIGKILL SIGALRM +
-   +
-  # End of comments (2) No changes required above. +
-   +
-   +
-  # (3) You can remove this 1st line below after you've run the script once, but is no problem if it remains.   +
-  mkdir  /lustre/SCRATCH5/gau/$USER +
-   +
-  # (4) Please leave this line unchanged. Creating a subdirectory with your jobid for Gaussian temporary files  +
-  # which are removed after job. +
-  # Previously everone's Gaussian temporary files were written in /SCRATCH5/gau +
-  mkdir  /lustre/SCRATCH5/gau/$USER/$PBS_JOBID +
-   +
-  # (5Change to your work directory. Specify if explictly if you find issues. +
-  cd $PBS_O_WORKDIR +
-   +
-  echo "My job starts here" +
-  date +
-   +
-  # (6) Please leave unchangedThis new module specifies the new directory for Gaussian variable GAUSS_SCRDIR  +
-  for temporary files directory. +
-  source /etc/profile.d/modules.sh +
-  module add gaussian/g09.anton +
-  source /opt/gridware/applications/gaussian/g09/bsd/g09.profile +
-  # (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 do this anyway, but to be safe. +
-  # Remove the Gaussian scratch directory where temporary files are written. It is    +
-  # /lustre/SCRATCH5/gau/$USER/$PBS_JOBID +
-  # If abnormal termination (walltime or job killedthen function subroutine cleanup_scratch will clear  +
-  # temporary files. +
-   +
-    rm -rfv "$GAUSS_SCRDIR" +
-   +
-    echo "Normal execution ending time:" +
-    date +
-====Example PBSPro job script for 2 nodes or more:====+
  
-<file bash gaussian_multiple.qsub> 
  
-  #!/bin/bash+    EXAMPLE2 [PLEASE TAKE NOTE OF EMPTY SPACES] 
 +  Enter project name/shortname 
 +  CHEM0100 
 +  Enter input file (with .com or .gjf extension) 
 +  test.gjf 
 +  Enter number of nodes on which to run job
      
-  (1These are standard type lines for PBS job specification. Modify them for your own requirements - choice of  +  Enter total walltime (hour:minute)
-  # nodes; walltime; your directory on scratch for standard out and error files ; email of job starting,  +
-  # ending and errors.+
      
-  #PBS -N molecule.job +  Enter email address 
-  #PBS -l select=2:ncpus=12:jobtype=westmere,place=free:group=nodetype +  testing@gmail.com 
-  #PBS -l walltime=03:59:00 +  Generated pbs file for test 
-  #PBS -q workq  +  Do you wish to submit job to cluster (y/n) 
-  #PBS -m abe +  y
-  #PBS -o /export/home/aslopis/scratch5/Gaussian_Support/C60_1/molecule.out +
-  #PBS -e /export/home/aslopis/scratch5/Gaussian_Support/C60_1/molecule.err +
-  #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 "Deleting inside signal handler, meaning probably either hit walltime, or deleted the job using qdel" 
      
-    cd "$PBS_O_WORKDIR" +If you wish to use the utility **formchk** (to create readable format files for visualisers) please do the following.
-    rm -rfv "$GAUSS_SCRDIR" +
-    echo "---" +
-    echo "Signal handler ending time:" +
-    date +
-    exit 0 +
-  }+
      
-  # Associate function "cleanup_scratch" with the TERM signal (and others), which is usually how jobs get killed. +  module load chpc/gaussian16/C01 
-  trap 'cleanup_scratch' SIGTERM SIGHUP SIGINT SIGQUIT SIGFPE SIGKILL SIGALRM+  source $g16root/g16/bsd/g16.profile
      
-  # End of comments (2) No changes required above. +Then the command **formcheck** should be available for useOther Gaussian commands should also be availablesuch as **freqchk** and **chkchk**.
-   +
-  # (3) You can remove this first line below after you've run the script once, but won'be problem if it remains.   +
-  mkdir  /lustre/SCRATCH5/gau/$USER +
-   +
-  # (4) Please leave this line unchanged. Creating a subdirectory with your jobid for temporary Gaussian files +
-  # which are removed after job. +
-  # Previously everone'Gaussian temporary files were written in /SCRATCH5/gau +
-  mkdir  /lustre/SCRATCH5/gau/$USER/$PBS_JOBID +
-   +
-  # (5) Change to your work directory. Specify if explictly if you find issues. +
-  # cd "$PBS_O_WORKDIR" +
-  cd /export/home/aslopis/scratch5/Gaussian_Support/C60_1 +
-   +
-  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 /etc/profile.d/modules.sh +
-  module add gaussian/g09.anton +
-  source /opt/gridware/applications/gaussian/g09/bsd/g09.profile +
-  # (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 '\n' "," | sed 's|,$||'+
-  echo linda: $LINDA +
-  cat molecule.com | sed "s/LINDA/$LINDA/" > temp$$.inp +
-  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    +
-  #  /lustre/SCRATCH5/gau/$USER/$PBS_JOBID +
-  # If abnormal termination (walltime or job killed) then function subroutine cleanup_scratch will clear  +
-  # temporary files. +
-   +
-    rm -rfv "$GAUSS_SCRDIR" +
-   +
-    echo "Normal execution ending time:" +
-    date+
  
  
  
 +You can use a **checkpoint file (.chk)** which will allow you to continue with a 2nd (or subsequent) calculation from close to where the initial/previous calculation ended. This is especially helpful for jobs which exceed walltime limits or have stopped for another reason. There is info online including from Gaussian website, these links may be helpful too:
  
-Example of a gaussian input file, note the blank lines within the file: +https://gaussian.com/faq2
-   + 
-  %nprocshared=12 +https://gaussian.com/restart/ 
-  %nprocl=1 + 
-  #P HF/6-31G*  IOP(6/33=2,6/41=10,6/42=17) SCF=Tight Pop=MK +https://gaussian.com/tip4/ 
-          + 
-  Title Card Required +https://www.researchgate.net/post/How-can-I-res... 
-   + 
-  0 1 +Very occassionally  a checkpoint file may be corrupted, so keeping the most recent backup copy of a good checkpoint (.chk) file can be helpfulOtherwise in these circumstances the calculation may need to be started from scratch or the most recent molecular geometry (the coordinated of all the atoms) could be used from the Gaussian output (.log) file
-                   -3.19550100    0.11344600   -0.18511100 +
-   O                 -3.05859100    0.83554400   -1.15941100 +
-   N                 -2.14200500   -0.25446800    0.60848900 +
-   H                 -2.32841200   -0.78506500    1.44398900 +
-   C                 -0.75900100    0.12341400    0.36048900 +
-                    0.14379200   -0.42259800    1.48678900 +
-                    0.59047400   -1.84630300    1.03238900 +
-                    1.59689900    0.10938400    1.28248900 +
-                    0.08697100   -2.05959700   -0.42431100 +
-                    2.05278100   -1.31402200    0.82788900 +
-   C                 -0.14011000   -0.59319400   -0.87441100 +
-   C                  1.35866600   -2.48501300   -1.17731100 +
-                    1.32989700   -0.05621300   -1.07501100 +
-                    1.66721100    0.99508300    0.02128900 +
-                    2.20428100   -1.28752400   -0.71551100 +
-                    0.60162500    2.08159700    0.02358900 +
-                   -0.63668200    1.58111300    0.28218900 +
-                    0.86964000    3.24909300   -0.21751100 +
-                   -1.43757500    2.10622300   -0.04521100 +
-                    2.93691800    1.56466600   -0.15981100 +
-                    2.76333000    2.51016900   -0.30861100 +
-                   -0.28050600   -0.28619200    2.48278900 +
-                    0.43696300   -2.68340100    1.71298900 +
-                    2.07960500    0.56667700    2.14378900 +
-                   -0.78403700   -2.70728500   -0.52611100 +
-                    2.86017500   -1.79913300    1.37408900 +
-                   -0.75990800   -0.47138600   -1.76101100 +
-                    1.22276500   -2.52601100   -2.26181100 +
-                    1.75375300   -3.44771800   -0.83891100 +
-                    1.50280200    0.34398500   -2.07391100 +
-                    3.22968200   -1.22473700   -1.07621100 +
-                   -4.55170800   -0.42883700    0.22928900 +
-                   -5.23089700    0.41157200    0.38338900 +
-                   -4.52881600   -1.04383700    1.13088900 +
-                   -4.94951500   -1.02253200   -0.59631100 +
-          +
-         +
  
 +Please **recheck** your molecular **geometry very carefully** to ensure there are no issues - this will result in calculations which take much longer than necessary.
/app/dokuwiki/data/attic/howto/gaussian.1428673679.txt.gz · Last modified: 2021/12/09 16:42 (external edit)