Module Gaussian16

Module Gaussian16

Gaussian 16 is a licensed software and your user needs to be explicitly allowed to run Gaussian 16. Please reach out to tsresearch@vcu.edu to request the permissions to run Gaussian 16.

Interactive job

Open an interactive session to a compute node. Adjust the number of CPUs (--cpus-per-task 1) and the amount of memory (--mem 8G) needed for your job. Increase the number of --cpus-per-task only when using code that can run in parallel.

srun --cpus-per-task 1 --mem 8G --pty bash

Load the Gaussian16 module:

module load gaussian16/C.01

When loading the Gaussian 16 module, a scratch folder will be automatically created in /tmp/g16_scratch_yourusername

Prepare your .com input file. As an example, here is water.com (Important: there must be two blank lines at the end of the file, otherwise Gaussian 16 won't run):

water.com
# SP, RHF/STO-3G punch=archive trakio scf=conventional Gaussian Test Job 00 Water with archiving 0 1 O H 1 0.96 H 1 0.96 2 109.471221

Run Gaussian 16:

g16 < water.com >> Gaussian16_interactive.OUT.log

 

[user@athena1 ~]$ srun --cpus-per-task 1 --mem 8G --pty bash ## start on the head node [user@athena201 ~]$ module load gaussian16/C.01 ## now on a compute node [user@athena201 ~]$ g16 < water.com >> Gaussian16_interactive.OUT.log [user@athena201 ~]$ tail Gaussian16_interactive.OUT.log 5,0.\PG=C02V [C2(O1),SGV(H2)]\\@ The archive entry for this job was punched. Cherishing children is the mark of a civilized society. -- Joan Ganz Cooney Job cpu time: 0 days 0 hours 0 minutes 0.5 seconds. Elapsed time: 0 days 0 hours 0 minutes 0.5 seconds. File lengths (MBytes): RWF= 6 Int= 1 D2E= 0 Chk= 1 Scr= 1 Normal termination of Gaussian 16 at Wed Nov 29 17:04:55 2023. [user@athena201 ~]$ exit ## leave the compute node exit [user@athena1 ~]$ ## now back on the head node

Batch Job

Prepare your .com input file. As an example, here is water.com (Important: there must be two blank lines at the end of the file, otherwise Gaussian 16 won't run):

water.com
# SP, RHF/STO-3G punch=archive trakio scf=conventional Gaussian Test Job 00 Water with archiving 0 1 O H 1 0.96 H 1 0.96 2 109.471221

Create the Slurm job script file.  Adjust the number of CPUs (--cpus-per-task 1) and the amount of memory (--mem 8G) needed for your job. Increase the number of --cpus-per-task only when using code that can run in parallel.

Gaussian16_slurm_script.sh
#!/bin/bash #SBATCH --job-name Gaussian16_job #SBATCH --output Gaussian16_job_output.log #SBATCH --error Gaussian16_job_error.log #SBATCH --cpus-per-task=1 #SBATCH --mem 8G module load gaussian16/C.01 g16 < water.com >> Gaussian16_job_output.log

Submit the job to Slurm:

sbatch Gaussian16_slurm_script.sh

Monitor the execution of your job in the Slurm queue:

squeue -u $USER

The job may show up in the queue as running (R) or pending (PD). When the job completes, it will disappear from the queue and you can check the output.

[user@athena1 ~]$ sbatch Gaussian16_slurm_script.sh Submitted batch job 400 [user@athena1 ~]$ squeue -u $USER JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) ## JOBID 400 completed and exited the queue [user@athena1 ~]$ tail Gaussian16_job_output.log The archive entry for this job was punched. A true friend is someone who is there for you when he'd rather be anywhere else. -- Len Wein Job cpu time: 0 days 0 hours 0 minutes 0.5 seconds. Elapsed time: 0 days 0 hours 0 minutes 0.5 seconds. File lengths (MBytes): RWF= 6 Int= 1 D2E= 0 Chk= 1 Scr= 1 Normal termination of Gaussian 16 at Wed Nov 29 13:34:39 2023.

Multithreaded (SMP) Job

Prepare your .com input file.  As an example, here is morphine.com (Important: there must be two blank lines at the end of the file, otherwise Gaussian 16 won't run), which will use up to 8 processors with shared memory:

%NoSave %NProcShared=8 #p hf/6-31g(d,p) scf=direct name=bunty morphine dual proc g98 energy calc 0 1 c n 1 nc2 c 2 cn3 1 cnc3 c 3 cc4 2 ccn4 1 dih4 c 4 cc5 3 ccc5 2 dih5 c 5 cc6 4 ccc6 3 dih6 c 5 cc7 4 ccc7 3 dih7 c 7 cc8 5 ccc8 4 dih8 c 8 cc9 7 ccc9 5 dih9 c 9 cc10 8 ccc10 7 dih10 c 3 cc11 4 ccc11 5 dih11 c 11 cc12 3 ccc12 4 dih12 c 12 cc13 11 ccc13 3 dih13 c 13 cc14 5 ccc14 7 dih14 o 14 oc15 13 occ15 5 dih15 c 14 cc16 13 ccc16 12 dih16 c 16 cc17 14 ccc17 13 dih17 c 17 cc18 16 ccc18 14 dih18 o 8 oc19 9 occ19 10 dih19 o 16 oc20 17 occ20 18 dih20 c 2 cn21 3 cnc21 4 dih21 h 18 hc22 12 hcc22 13 dih22 h 9 hc23 10 hcc23 4 dih23 h 10 hc24 9 hcc24 8 dih24 h 11 hc25 3 hcc25 4 dih25 h 17 hc26 18 hcc26 12 dih26 h 20 ho27 16 hoc27 17 dih27 h 11 hc28 3 hcc28 4 dih28 h 3 hc29 4 hcc29 10 dih29 h 4 hc30 10 hcc30 9 dih30 h 8 hc31 9 hcc31 10 dih31 h 19 ho32 8 hoc32 9 dih32 h 6 hc33 5 hcc33 4 dih33 h 6 hc34 5 hcc34 4 dih34 h 1 hc35 2 hcn35 3 dih35 h 1 hc36 2 hcn36 3 dih36 h 21 hc37 2 hcn37 3 dih37 h 21 hc38 2 hcn38 3 dih38 h 21 hc39 2 hcn39 3 dih39 h 7 hc40 5 hcc40 4 dih40 nc2 1.437612 cn3 1.469665 cnc3 116.013 cc4 1.566218 ccn4 111.038 dih4 13.513 cc5 1.538708 ccc5 105.483 dih5 49.934 cc6 1.555288 ccc6 107.845 dih6 -67.658 cc7 1.566515 ccc7 116.470 dih7 168.237 cc8 1.531666 ccc8 114.119 dih8 -8.109 cc9 1.510705 ccc9 112.103 dih9 -31.912 cc10 1.318595 ccc10 121.936 dih10 40.834 cc11 1.539327 ccc11 113.923 dih11 -68.477 cc12 1.513697 ccc12 111.499 dih12 38.343 cc13 1.383313 ccc13 119.077 dih13 -5.750 cc14 1.375508 ccc14 108.836 dih14 8.310 oc15 1.357433 occ15 112.753 dih15 2.758 cc16 1.376259 ccc16 122.362 dih16 -7.607 cc17 1.390421 ccc17 116.683 dih17 -4.102 cc18 1.384741 ccc18 121.135 dih18 9.929 oc19 1.393744 occ19 112.893 dih19 166.410 oc20 1.367196 occ20 121.591 dih20 -167.067 cn21 1.444642 cnc21 113.069 dih21 148.738 hc22 1.079199 hcc22 120.558 dih22 178.650 hc23 1.075356 hcc23 121.966 dih23 178.857 hc24 1.076339 hcc24 120.248 dih24 177.174 hc25 1.087403 hcc25 107.634 dih25 161.146 hc26 1.076539 hcc26 120.669 dih26 178.434 ho27 .948983 hoc27 108.375 dih27 82.510 hc28 1.086097 hcc28 111.454 dih28 -82.099 hc29 1.086440 hcc29 106.331 dih29 -67.899 hc30 1.092171 hcc30 107.854 dih30 81.448 hc31 1.086168 hcc31 108.252 dih31 -77.137 ho32 .951573 hoc32 108.679 dih32 -89.016 hc33 1.083216 hcc33 110.399 dih33 148.772 hc34 1.088171 hcc34 108.894 dih34 -94.706 hc35 1.093117 hcn35 112.093 dih35 63.969 hc36 1.085656 hcn36 108.833 dih36 -179.095 hc37 1.086043 hcn37 109.699 dih37 170.059 hc38 1.094269 hcn38 113.379 dih38 -68.538 hc39 1.081921 hcn39 110.354 dih39 52.119 hc40 1.079548 hcc40 112.263 dih40 117.102

Create the Slurm job script file.  Adjust the number of CPUs (--cpus-per-task 8) and the amount of memory (--mem 32G) needed for your job. Increase the number of --cpus-per-task only when using code that can run in parallel.

Gaussian16_slurm_script.sh
#!/bin/bash #SBATCH --job-name Gaussian16_job #SBATCH --output Gaussian16_job_output.log #SBATCH --error Gaussian16_job_error.log #SBATCH --ntasks=1 #SBATCH --cpus-per-task=8 #SBATCH --mem 32G module purge module load gaussian16/C.01 g16 < morphine.com >> Gaussian16_job_output.log

Monitor the execution of your job in the Slurm queue:

squeue -u $USER

The job may show up in the queue as running (R) or pending (PD). When the job completes, it will disappear from the queue and you can check the output.

[user@athena1 ~]$ sbatch Gaussian16_slurm_script.sh Submitted batch job 405 [user@athena1 ~]$ squeue -u $USER JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) ## Job is running with JOBID 405 405 cpu Gaussian user R 0:03 1 athena213 [user@athena1 ~]$ squeue -u $USER JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) ## JOBID 405 completed and exited the queue [user@athena1 ~]$ tail Gaussian16_job_output.log The archive entry for this job was punched. The chemist is a guest at the physicist's table and frequently dines well. -- Richard Bersohn Job cpu time: 0 days 0 hours 4 minutes 39.0 seconds. Elapsed time: 0 days 0 hours 0 minutes 35.9 seconds. File lengths (MBytes): RWF= 94 Int= 0 D2E= 0 Chk= 11 Scr= 1 Normal termination of Gaussian 16 at Wed Nov 29 18:36:30 2023.