G03 (Gaussian 03)

The following text shows the commands in the sample batch command, along with a description of what each section is doing.
 
Red indicates sections which need some customization by the user, with items in red bold italics ALWAYS needing customization for the individual user name or directory/file names. Black sections would normally not need any modification.

The .xml file sets the machine requirements and provides information for the Velocity Scheduler to schedule the job. This section requires modification by the user.

gaussian.xml
 
<?xml version="1.0" ?>
<!-- Sample XML Job File -->
<job>
<nodes>1</nodes>
<minutes>20</minutes>
<type>batch</type>
<affiliation>serial</affiliation>
<run>\tc.cornell.edu\tc\users\your_userid\gaussian\gaussian.bat</run>
</job>

 

gaussian.bat

The next section calls the G03 setup file.
This section should not be modified by the user.
REM --- Call G03 setup file 
call setup_gaussian.bat
The next section defines variables:
ROOTDIR, which points to the folder containing the input file(s)
OUTDIR, where you will find the output
INPUT_FILE, which is the name of the input file
OUTPUT_FILE, which is the name of the output file
CHECKPOINT_FILE, which is the name of the checkpoint file, if you are going to use one.
Defining variables in one place makes it easy to modify the script for other jobs.
This section should be modified by the user.
 
REM --- Set ROOTDIR, OUTDIR, INPUT_FILE, and OUTPUT_FILE variables.
set ROOTDIR=\\tc.cornell.edu\tc\users\%USERNAME%\gaussian
set OUTDIR=%ROOTDIR%\output
set INPUT_FILE=test1.gjf
set OUTPUT_FILE=test1.out
REM --- Also set the checkpoint filename if you are using one.
REM --- If your G03 input file creates a checkpoint file with, for example,
REM --- "%chk=test1", then the checkpoint file will be named test1.chk
set CHECKPOINT_FILE=test1.chk
 
The next section makes a temporary directory on the local T: drive. It then cleans up any pre-existing files in the temporary directories and copies the input file into the temporary directories.
This section should not normally be modified by the user. 
REM --- Create temp working directory on T: (we will run G03 from there)
call TDircreate.bat
cd /D T:\%USERNAME%
REM --- Clean up any pre-existing files in the 
REM --- gaussian scratch folder (the variable GAUSS_SCRDIR is set by 
REM --- the call to setup_gaussian.bat)
del /S /Q %GAUSS_SCRDIR%
REM --- Copy the input file from ROOTDIR into the working directory
copy %ROOTDIR%\%INPUT_FILE% T:
The next section executes G03W and then copies the output file(s) back to the user's output directory.
This section should not normally be modified by the user, although jobs which do not use a create checkpoint file can comment out the line copying the checkpoint file (leaving the command in the script will not cause a problem). Notice the warning that I/O should always be specified with the full pathname; it is not sufficient to simply "cd" to the directory before calling g03.exe. 
REM --- Execute G03 
REM --- IMPORTANT! Always specify full path name for I/O files
g03.exe T:\%USERNAME%\%INPUT_FILE% T:\%USERNAME%\%OUTPUT_FILE%
 
REM --- Copy the necessary files back to the output directory
copy T:\%USERNAME%\%OUTPUT_FILE%  %OUTDIR%
REM --- If applicable, copy checkpoint file back to the output directory 
copy %GAUSS_SCRDIR%\%CHECKPOINT_FILE% %OUTDIR%
 
The next section cleans up the local temporary space on T: drive. The last line releases the node. This section should not normally be modified by the user.
REM Clean up gaussian scratch dir and user temp files from this job
del /S /Q %GAUSS_SCRDIR%
del /S /Q T:\%USERNAME%
 
vsched -c