Using Gaussian 09

http://www.arsc.edu/support/howtos/usingg09.html

 

Using Gaussian 09

This document is an introduction to using Gaussian 09 on ARSC systems.

Contents

Introduction

Gaussian 09 is a software package used for calculating molecular electronic structure and properties. The package includes a wide range of ab initio and semi-empirical methods for energy, gradient, frequency and property calculations.

Beginning users are advised to read the first two chapters of the book Exploring Chemistry with Electronic Structure Methods (Foresman and Frisch, Gaussian, Inc. 1998) for a general introduction to Gaussian. A copy of this book is available in the ARSC library.

If you are publicizing results obtained from the use of Gaussian software, please refer to the output file generated by the software for proper citation information.

Setting Up Your Environment

Gaussian 09 is installed in the directory /usr/local/pkg/gaussian. To enable execution of a Gaussian 09 program, users must set the proper environment variables as shown below:

Tcsh / C-shell users:

   % setenv GAUSS_SCRDIR $WORKDIR
   % setenv g09root /usr/local/pkg/gaussian/gaussian-09.A.01
   % source $g09root/g09/bsd/g09.login

Bash / Korn shell users:

   % export GAUSS_SCRDIR=$WORKDIR
   % export g09root=/usr/local/pkg/gaussian/gaussian-09.A.01
   % . $g09root/g09/bsd/g09.profile

If you are a regular Gaussian user, you may want to add the commands listed above to your .cshrc (tcsh/csh users) or .profile (bash/ksh users) file.

Input Files

Each Gaussian job requires an input file (known as an 'input deck') specifying the type of calculation, basis set, and molecular specification of the input data. Input files contain ASCII text only and are prepared using a text editor. Gaussian input files require a filename with a .gjf or .com extension, for example ethane.gjf or water.com.

An example input file for a Restricted Hartree-Fock single point energy calculation on a water molecule using the 6-31G(d) Gaussian basis set is listed below:

   #P RHF/6-31G(d) Test
   
   My test program: Water -- single point energy
   
   0 1
   O   -0.464   0.177   0.0
   H   -0.464   1.137   0.0
   H    0.441  -0.143   0.0

The first line indicates the type of calculation and basis set. Line two must be left blank. The third line is a comment line. Line four is also blank. The remaining lines contain the molecular charge, spin multiplicity, atom types, and Cartesian coordinates. Input text is not case sensitive and extra whitespace (spaces or tabs) is allowed within a line. Sections of the input file are separated by a blank line. Coordinates can be specified as Cartesian (x, y, and z) or in the Z-matrix format.

Consult the Gaussian User's Reference for proper keyword usage and input file format. The directories:

   cd $g09root/g09/tests/com
   cd $g09root/g09/tests

contain input files which can be used as examples or templates for your own calculations. If an input file contains incorrect data or an incompatible format, the output files generated during program execution will display an error.

Scratch Files

Gaussian 09 creates scratch files during each job. The number and size of these scratch files depends on the type of calculation being used. For example, scratch files produced for a Hartree-Fock SCF calculation include:

  • checkpoint file (myjob.chk)
  • read-write file (myjob.rwf)
  • two electron integral file (myjob.int)
  • two electron integral derivative file (myjob.d2e)

The file suffix or extension (e.g. .chk) denotes the type of file. The user can, and should, set the environment variable GAUSS_SCRDIR to direct Gaussian to place scratch files in a directory other than the current working directory. The recommended location is within the $WORKDIR directory. Use the following to set the environment variables:

Tcsh / C-shell users:

   % setenv GAUSS_SCRDIR $WORKDIR

Bash / Korn shell users:

   % export GAUSS_SCRDIR=$WORKDIR

If the GAUSS_SCRDIR variable is not set, Gaussian will use the current working directory for scratch storage. Jobs utilizing a user's home directory for scratch storage could cause disk quota problems. Gaussian scratch files for all but the most trivial calculations may be large.

Scratch file locations can also be assigned within the input (.com or .gjf) file. Scratch files need not use the default naming convention or even reside on the same disk or filesystem. For example:

   %Chk=$HOME/the_checkpoint_file
   %RWF=$WORKDIR/project/ScratchFiles/my_read_write_file
   %Int=$WORKDIR/project/integrals/my_integral_file
   %D2E=$WORKDIR/project/my_integral_derivative_file

Please make sure the scratch directories exist before running your calculation.

By default, all Gaussian scratch files are removed when a job terminates normally. Abnormal or premature termination of a job will leave scratch files in place. The %NoSave command added to the top of the input file can be used to prevent the removal of selected scratch files. See the Gaussian User's Guide for additional details.

Memory

The %Mem directive may be added to the top of a Gaussian input file to request additional physical memory for a calculation, for example:

   %Mem=512MB

requests a total of 512 MB of physical memory. The %Mem memory specification can be in KB, MB, or GB units.

Users who request additional memory should exercise caution. Requests for (unused) excessive memory can cause performance degradation for your job, and for other users.

Running Gaussian 09 in the PBS job scheduler

Gaussian 09 jobs are best run in the batch queue environment known as PBS. Two files are required to submit a job to PBS: (1) the Gaussian input file, and (2) a batch script specifying the job characteristics. Example batch scripts are shown below.

For a more in depth introduction to batch environments please see "Using PBS".

Example PBS Script for a Single Node Parallel Job on midnight
#!/bin/bash
#PBS -q standard
#PBS -l walltime=1:00:00
#PBS -l select=1:ncpus=4:node_type=4way
#PBS -j oe 

### Returns to the directory where the script was submitted.
cd $PBS_O_WORKDIR

### Set up Gaussian environment
export GAUSS_SCRDIR=$WORKDIR
export g09root=/usr/local/pkg/gaussian/gaussian-09.A.01
. $g09root/g09/bsd/g09.profile

### Run the calculation
g09 myjob.com myjob.out
Also, add the number of shared processors to the top of the input data file using the following format:

%NProcShared = 4
Example PBS Script for a Multi-Node Parallel Job on midnight
#!/bin/bash
#PBS -q standard
#PBS -l walltime=1:00:00
#PBS -l select=2:ncpus=16:node_type=16way
#PBS -j oe 

### Returns to the directory where the script was submitted.
cd $PBS_O_WORKDIR

### Set up Gaussian environment
export GAUSS_SCRDIR=$WORKDIR
export g09root=/usr/local/pkg/gaussian/gaussian-09.A.01
. $g09root/g09/bsd/g09.profile

### Run the calculation
run_g09 linda_job.com linda_job.out

The input deck should include the number of linda tasks the job should use:

%nProcl=2

as well as the number of shared processors:

%NProcShared = 16

The "run_g09" executable sets up environment variables required by linda

NOTE: not all gaussian component programs are designed to take advantage of Linda parallelization. Links in $g09root/g09 ending with the suffix .exel are executables using linda.

Example PBS Script for a Single Node Parallel Job on pingo
#!/bin/bash
#PBS -q standard
#PBS -l walltime=1:00:00
#PBS -l mppwidth=1
#PBS -l mppdepth=8
#PBS -j oe 

### Returns to the directory where the script was submitted.
cd $PBS_O_WORKDIR

### Set up Gaussian environment
export GAUSS_SCRDIR=$WORKDIR
export g09root=/usr/local/pkg/gaussian/gaussian-09.A.01
. $g09root/g09/bsd/g09.profile

### Run the calculation
aprun -n 1 -d 8 g09 myjob.com myjob.out

Also, add the number of shared processors to the top of the input data file using the following format:

%NProcShared = 8

NOTE: Support for multi-node gaussian jobs is not available on pingo at this time.

The qsub command is used to submit the job to the PBS queueing system. If your PBS script is named myjob.pbs then use:

   % qsub myjob.pbs

The "qmap" or "qstat <job_id> " commands can be used to monitor the progress of a job. The man page for qsub gives complete details for its usage.

For additional information, please see our web page containing detailed information about using the PBS Batch Scheduler.

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值