Raad2: Gaussian

From Research Computing Website


Sample Small Job File

#!/bin/bash
#SBATCH --job-name=gaussian_small
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --time=01:00:00
#SBATCH --partition=s_long
#SBATCH --qos=sl
#SBATCH --hint=nomultithread
#SBATCH --gres=craynetwork:0    # Do not remove this line if you are submitting to s_short, s_long and s_debug

# Specify your Input file instead
INPUT_FILE="water_test.com"

# Create scratch directory for job
export MYSCRATCH=/ddn/scratch/${SLURM_JOB_ID}_$USER
mkdir -m 700 $MYSCRATCH

# GAUSSIAN ENVIRONMENT
# Using the GAUSSIAN system module installed on Raad2
echo "Loading Gaussian module..."
module load gaussian/g09

# Verify module loaded correctly (g09root is set by the module)
if [ -z "$g09root" ]; then
    echo "ERROR: g09root environment variable not set. Module load failed?"
    exit 1
fi

# Set environment variable to make Gaussian aware of scratch directory
export GAUSS_SCRDIR=$MYSCRATCH

# Change to Job submission directory
cd  $SLURM_SUBMIT_DIR

# Launch Gaussian
echo "Starting Gaussian 09..."
srun $g09root/g09/g09 <com_file>
srun g09 < $INPUT_FILE

# Remove temporary scratch Directory
echo "Job finished. Cleaning up scratch..."
rm -rf $MYSCRATCH
echo "Done."

Sample Large Job File

#!/bin/bash
#SBATCH --job-name=gaussian_large
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=24
#SBATCH --time=168:00:00
#SBATCH --partition=l_long
#SBATCH --qos=ll
#SBATCH --hint=nomultithread


# Specify your Input file instead
INPUT_FILE="water_test.com"

# Create scratch directory for job
export MYSCRATCH=/ddn/scratch/${SLURM_JOB_ID}_$USER
mkdir -m 700 $MYSCRATCH

# GAUSSIAN ENVIRONMENT
# Using the GAUSSIAN system module installed on Raad2
echo "Loading Gaussian module..."
module load gaussian/g09

# Verify module loaded correctly (g09root is set by the module)
if [ -z "$g09root" ]; then
    echo "ERROR: g09root environment variable not set. Module load failed?"
    exit 1
fi

# Set environment variable to make Gaussian aware of scratch directory
export GAUSS_SCRDIR=$MYSCRATCH

# Change to Job submission directory
cd  $SLURM_SUBMIT_DIR

# Launch Gaussian
echo "Starting Gaussian 09..."
srun $g09root/g09/g09 <com_file>
srun g09 < $INPUT_FILE

# Remove temporary scratch Directory
echo "Job finished. Cleaning up scratch..."
rm -rf $MYSCRATCH
echo "Done."
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
© 2025 | RComputing