Difference between revisions of "Gaussian Guide"

From Storrs HPC Wiki
Jump to: navigation, search
(Document the important %mem memory parameter (Thanks to Lydie for pointing this out).)
(Loading the Gaussian module)
 
(18 intermediate revisions by 8 users not shown)
Line 14: Line 14:
 
</blockquote>
 
</blockquote>
  
== Extra Step before Use ==
+
== Permission ==
 
+
University has a license for gaussian which is available for all Uconn students and faculty. Please send email to us if you need to use gaussian/g16. We have a special group for gaussian users. With your request, we can add you to the group.
Due to the way Gaussian is built by the Gaussian Inc company, you must [[:Category:Help | contact us]] to add you to the <code>gaus09.D.01</code> Linux group to have permission to run the program.
 
You can check whether you are in the group by running the <code>groups</code> command.
 
You should see your Net ID and <code>gaus09.D.01</code> listed.
 
  
 
== Loading the Gaussian module ==
 
== Loading the Gaussian module ==
  
Best practise is to specify the module with the version number for programs to run consistently.
+
Best practice is to specify the module with the version number for programs to run consistently.
 
To see the versions of modules on the cluster, use the <code>module avail</code> command:
 
To see the versions of modules on the cluster, use the <code>module avail</code> command:
 
  module avail gaussian
 
  module avail gaussian
Now we can load the latest available LAMMPS module, which at the time of writing is 28Jun14:
+
Now we can load the latest available Gaussian module, which at the time of writing is Gaussian16:
  module load gaussian/09.D.01
+
  module load gaussian/g16
One can avoid loading the module at each log in, by using <code>module initadd</code>:
+
Users should add the following lines to either their .bashrc, .login, or .profile startup files:
  module initadd gaussian/09.D.01
+
#Commands which provide smooth access to Gaussian.
 +
export GAUSS_SCRDIR=/scratch/gaussian
 +
export g16root=/apps2/gaussian/g16
 +
source  $g16root/bsd/g16.profile
 +
 
 +
One can avoid loading the module at each log in, by using <code>module initadd</code> when typed in the command line and NOT in the .bashrc file:
 +
  module initadd gaussian/g16
  
 
== Running Gaussian ==
 
== Running Gaussian ==
 +
 +
Note: Gaussian g16 is dependent on the Haswell and Skylake CPU architecture
  
 
Our site license for Gaussian does not include TCP-Linda software to run on multiple nodes.
 
Our site license for Gaussian does not include TCP-Linda software to run on multiple nodes.
Line 38: Line 43:
 
  #!/bin/bash
 
  #!/bin/bash
 
  #SBATCH --nodes=1
 
  #SBATCH --nodes=1
  #SBATCH --ntasks=8
+
  #SBATCH --ntasks=24
#SBATCH --partition=Haswell
 
#SBATCH --exclusive
 
 
   
 
   
 
  # Make sure the value of --ntasks above matches %nproc in your
 
  # Make sure the value of --ntasks above matches %nproc in your
Line 46: Line 49:
 
   
 
   
 
  # Run gaussian, using output file of gaussian.out
 
  # Run gaussian, using output file of gaussian.out
  g09 < your_file.com > gaussian.out
+
  g16 < your_file.com > gaussian.out
  
In your Gaussian input .com file, always specify the number of processors using %proc (the maximum allowed by the license is 8) and the amount of memory using %mem (the default memory is just 256MB!).  Conservatively one can use about 80% of the node memory, so for Haswell 128GB RAM nodes we can set 100GB.
+
In your Gaussian input .com file, always specify the number of processors using %proc and the amount of memory using %mem (the default memory is just 256MB!).  Conservatively one can use about 80% of the node memory, so for Haswell 128GB RAM nodes we can set 100GB, and use all 24 cores if we use the node exclusively (#SBATCH --exclusive).
  %proc=8
+
  %proc=24
 
  %mem=100GB
 
  %mem=100GB
  
There are a range of tests on can try with Gaussian as listed in <code>/apps2/gaussian/09.D.01/g09/tests/tests.idx</code>
+
There are a range of tests on can try with Gaussian as listed in <code>/apps2/gaussian/g16/tests/tests.idx</code>
  
 
For example one can try running test 296:
 
For example one can try running test 296:
Line 58: Line 61:
 
  #!/bin/bash
 
  #!/bin/bash
 
  #SBATCH --nodes=1
 
  #SBATCH --nodes=1
  #SBATCH --ntasks=8
+
  #SBATCH --ntasks=24
 
   
 
   
 
  # Make sure the value of --ntasks above matches %nproc in your
 
  # Make sure the value of --ntasks above matches %nproc in your
Line 67: Line 70:
 
  # of a Gaussian test input file.
 
  # of a Gaussian test input file.
 
  test_file=test0296.com
 
  test_file=test0296.com
  cp /apps2/gaussian/09.D.01/g09/tests/com/${test_file} .
+
  cp /apps2/gaussian/g16/tests/com/${test_file} .
 
  sed -i -e "1 s#^#%nproc=8\n%mem=100GB\n#" ${test_file}
 
  sed -i -e "1 s#^#%nproc=8\n%mem=100GB\n#" ${test_file}
 
   
 
   
 
  # Run gaussian, using output file of gaussian.out
 
  # Run gaussian, using output file of gaussian.out
  g09 < ${test_file} > gaussian.out
+
  g16 < ${test_file} > gaussian.out
 +
 
 +
Maryam contributed this nice script that runs Gaussian on a directory with many input files, but only runs Gaussian on incomplete simulations by checking the output file for the presence of the "Normal termination of Gaussian ..." line:
 +
 
 +
#SBATCH --partition=debug
 +
#SBATCH --ntasks=24
 +
#SBATCH --nodes=1
 +
#SBATCH --output=out.slurm
 +
 +
echo > out.slurm
 +
module purge
 +
module load gaussian
 +
 +
# Don't rerun completed simulations
 +
outputs=$(comm -2 -3  <( ls *.com | sed 's/com$/out/' ) <( grep -l  "Normal termination of "  *.out ))
 +
 +
for output in $outputs
 +
do
 +
    input=${output%.out}.com
 +
    echo  g16 $input $output
 +
    g16 $input $output
 +
done
 +
 
 +
 
 +
[[Category:Software]]

Latest revision as of 13:46, 6 May 2019

Gaussian electronic structure modeling
Author Gaussian Inc
Website gaussian.com
Source Proprietary Closed Source
Category Quantum Chemistry
Help User guide
Workshops


From Wikipedia:

Gaussian is a computer program for computational chemistry initially released in 1970 by John Pople and his research group at Carnegie-Mellon University. Originally available through the Quantum Chemistry Program Exchange, it was later licensed out of Carnegie Mellon University, and since 1987 has been developed and licensed by Gaussian, Inc.

Permission

University has a license for gaussian which is available for all Uconn students and faculty. Please send email to us if you need to use gaussian/g16. We have a special group for gaussian users. With your request, we can add you to the group.

Loading the Gaussian module

Best practice is to specify the module with the version number for programs to run consistently. To see the versions of modules on the cluster, use the module avail command:

module avail gaussian

Now we can load the latest available Gaussian module, which at the time of writing is Gaussian16:

module load gaussian/g16

Users should add the following lines to either their .bashrc, .login, or .profile startup files:

#Commands which provide smooth access to Gaussian.
export GAUSS_SCRDIR=/scratch/gaussian
export g16root=/apps2/gaussian/g16
source  $g16root/bsd/g16.profile

One can avoid loading the module at each log in, by using module initadd when typed in the command line and NOT in the .bashrc file:

module initadd gaussian/g16

Running Gaussian

Note: Gaussian g16 is dependent on the Haswell and Skylake CPU architecture

Our site license for Gaussian does not include TCP-Linda software to run on multiple nodes.

Below is a SLURM example script:

#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=24

# Make sure the value of --ntasks above matches %nproc in your
# Gaussian input ".com" file!

# Run gaussian, using output file of gaussian.out
g16 < your_file.com > gaussian.out

In your Gaussian input .com file, always specify the number of processors using %proc and the amount of memory using %mem (the default memory is just 256MB!). Conservatively one can use about 80% of the node memory, so for Haswell 128GB RAM nodes we can set 100GB, and use all 24 cores if we use the node exclusively (#SBATCH --exclusive).

%proc=24
%mem=100GB

There are a range of tests on can try with Gaussian as listed in /apps2/gaussian/g16/tests/tests.idx

For example one can try running test 296:

#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=24

# Make sure the value of --ntasks above matches %nproc in your
# Gaussian input ".com" file!

# None of the test files that Gaussian provides make use of %proc.
# For the sake of testing we will add the line %proc to the beginning
# of a Gaussian test input file.
test_file=test0296.com
cp /apps2/gaussian/g16/tests/com/${test_file} .
sed -i -e "1 s#^#%nproc=8\n%mem=100GB\n#" ${test_file}

# Run gaussian, using output file of gaussian.out
g16 < ${test_file} > gaussian.out

Maryam contributed this nice script that runs Gaussian on a directory with many input files, but only runs Gaussian on incomplete simulations by checking the output file for the presence of the "Normal termination of Gaussian ..." line:

#SBATCH --partition=debug
#SBATCH --ntasks=24
#SBATCH --nodes=1
#SBATCH --output=out.slurm

echo > out.slurm
module purge
module load gaussian

# Don't rerun completed simulations
outputs=$(comm -2 -3  <( ls *.com | sed 's/com$/out/' ) <( grep -l  "Normal termination of "  *.out ))

for output in $outputs
do 
    input=${output%.out}.com
    echo  g16 $input $output
    g16 $input $output
done