Gaussian Sample Batch Example

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

REM --- Call G03 setup file
call setup_gaussian.bat
 
REM --- Set ROOTDIR, OUTDIR, INPUT_FILE, and OUTPUT_FILE variables.
set ROOTDIR=\\tc.cornell.edu\tc\users\%USERNAME%\gaussian
set OUTDIR=%ROOTDIR%\output
mkdir %OUTDIR%
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
 
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:
 
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 output directory
copy %GAUSS_SCRDIR%\%CHECKPOINT_FILE% %OUTDIR%
 
REM --- Clean up gaussian scratch dir and user temp files from this job
del /S /Q T:\%GAUSS_SCRDIR%
del /S /Q T:\%USERNAME%
 
vsched -c