Running ORCA on Grex

Introduction#


ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry with specific emphasis on spectroscopic properties of open-shell molecules. It features a wide variety of standard quantum chemical methods ranging from semi-empirical methods to DFT to single - and multi-reference correlated ab initio methods. It can also treat environmental and relativistic effects.

User Responsibilities and Access#


ORCA is a proprietary software, even if it is free it still requires you to agree to the ORCA license conditions. We have installed ORCA on Grex, but to access the binaries, each of the ORCA users has to confirm they have accepted the license terms.

The procedure is as follow:

  • First, register at ORCA forum .
  • You will receive a first email to verify the email address and activate the account. Follow the instructions in that email.
  • After the registration is complete, go to the ORCA download page, and accept the license conditions. You will get a second email stating that the “registration for ORCA download and usage has been completed”.
  • Then contact us (via the Alliance support for example) quoting the ORCA email and stating that you also would like to access ORCA on Grex.

The same procedure is applied to get access to ORCA on the Alliance’s clusters .

System specific notes#


To see the versions installed on Grex and how to load them, please use module spider orca and follow the instructions. Both ORCA-4 and ORCA-5 are available on Grex.

To load ORCA-5, use:

module load gcc/4.8 ompi/4.1.1 orca/5.0.2

To load ORCA-4, use:

module load gcc/4.8 ompi/3.1.4 orca/4.2.1

Note:

The first released version of ORCA-5 (5.0.1) is available on Grex. However, ORCA users should use the versions released after (as for now: 5.0.2 since it addresses some bugs of the two first releases 5.0.0 and 5.0.1). We may remove these versions any time.

Using ORCA with SLURM#


In addition to the different keywords required to run a given simulation, users should make sure to set two additional parameters, like Number of CPUs and maxcore in their input files:

  • maxcore: This option sets the “max” memory per core. This is the upper limit under ideal conditions where ORCA can (and apparently often does) overshoot this limit. It is recommended to use no more than 75 % of the physical memory available. So, if the base memory is 4 GB per core, one could use 3 GB. The synatxe is as follow:
%maxcore 3000

Basically, one can use 75 % of the total memory requested by SLURM divided by number of CPUs asked for.

  • Number of CPUs:

ORCA can run in multiple processors with the aid of OpenMPI. All the modules are installed with the recommended OpenMPI version. To run ORCA in parallel, you can simply set the PAL keyword. For instance, a calculation using four processors requires:

!HF DEF2-SVP PAL4

or 8:

!HF DEF2-SVP PAL8

For more than eight processors (!PAL8), the explicit %PAL option has to be used:

!HF DEF2-SVP
%PAL NPROCS 16 END

When running ORCA calculations in parallel, always use the full path to ORCA:

  • On Grex, you can use:
ORCAEXEC=`which orca`

${ORCAEXEC} your-orca-input.in > your-orca-output.txt
  • On the Alliance clusters, the path is defined via an environment variable EBROOTORCA that is set by the module:
${EBROOTORCA}/orca your-orca-input.in > your-orca-output.txt

Example on input file#


Example of ORCA input file
orca-example.inp
# Benzene RHF Opt Calculation
%pal nprocs 8 end
! RHF TightSCF PModel
! opt

* xyz 0 1
     C    0.000000000000     1.398696930758     0.000000000000
     C    0.000000000000    -1.398696930758     0.000000000000
     C    1.211265339156     0.699329968382     0.000000000000
     C    1.211265339156    -0.699329968382     0.000000000000
     C   -1.211265339156     0.699329968382     0.000000000000
     C   -1.211265339156    -0.699329968382     0.000000000000
     H    0.000000000000     2.491406946734     0.000000000000
     H    0.000000000000    -2.491406946734     0.000000000000
     H    2.157597486829     1.245660462400     0.000000000000
     H    2.157597486829    -1.245660462400     0.000000000000
     H   -2.157597486829     1.245660462400     0.000000000000
     H   -2.157597486829    -1.245660462400     0.000000000000
*

Sample Script for running ORCA on Grex#


Script example for running ORCA on Grex
run-orca-grex.sh
#!/bin/bash

#SBATCH --ntasks=8
#SBATCH --mem-per-cpu=2500M
#SBATCH --time=0-3:00:00
#SBATCH --job-name="ORCA-test"

# Adjust the number of tasks, memory walltime above as necessary

# Load the modules: 

module load gcc/4.8 ompi/4.1.1 orca/5.0.2

# Assign the input file:

ORCA_INPUT_NAME=`ls *.inp | awk -F "." '{print $1}'`
ORCA_RAW_IN=${ORCA_INPUT_NAME}.inp

# Specify the output file:

ORCA_OUT=${ORCA_INPUT_NAME}.out

echo "Current working directory is `pwd`"

NUM_PROCS=$SLURM_NTASKS

echo "Running on $NUM_PROCS processors."
echo "Creating temporary input file ${ORCA_IN}"

ORCA_IN=${ORCA_RAW_IN}_${SLURM_JOBID}

cp ${ORCA_RAW_IN} ${ORCA_IN}
echo "%PAL nprocs $NUM_PROCS" >> ${ORCA_IN}
echo "   end "                >> ${ORCA_IN}
echo " "                      >> ${ORCA_IN}

# The orca command should be called with a full path:

echo "Starting run at: `date`"

ORCAEXEC=`which orca`

${ORCAEXEC} ${ORCA_IN} > ${ORCA_OUT}

echo "Program finished with exit code $? at: `date`"

Assuming the script above is saved as run-orca-grex.sh, it can be submitted with:

sbatch run-orca-grex.sh

Sample Script for running NBO with ORCA on Grex#


The input file should include the keyword NBO.

Script example for running NBO with ORCA on Grex
run-nbo-orca-grex.sh
#!/bin/bash

#SBATCH --ntasks=32
#SBATCH --mem-per-cpu=4000M
#SBATCH --time=7-0:00:00
#SBATCH --job-name=nbo

# Load the modules:

module load gcc/4.8  ompi/4.1.1 orca/5.0.2 
module load nbo/7.0 

EBROOTORCA=/global/software/cent7/orca/5.0.2_linux_x86-64_openmpi411
export GENEXE=`which gennbo.i4.exe`
export NBOEXE=`which nbo7.i4.exe`

# Assign the input file:

ORCA_INPUT_NAME=`ls *.inp | awk -F "." '{print $1}'`
ORCA_RAW_IN=${ORCA_INPUT_NAME}.inp

# Specify the output file:

ORCA_OUT=${ORCA_INPUT_NAME}.out
echo "Current working directory is `pwd`"
NUM_PROCS=$SLURM_NTASKS

echo "Running on $NUM_PROCS processors."
echo "Creating temporary input file ${ORCA_IN}"

ORCA_IN=${ORCA_RAW_IN}_${SLURM_JOBID}
cp ${ORCA_RAW_IN} ${ORCA_IN}

echo "%PAL nprocs $NUM_PROCS" >> ${ORCA_IN}
echo "   end "                >> ${ORCA_IN}
echo " "                      >> ${ORCA_IN}

# The orca command should be called with a full path:

echo "Starting run at: `date`"

${EBROOTORCA}/orca ${ORCA_IN} > ${ORCA_OUT}

echo "Program finished with exit code $? at: `date`"

Assuming the script above is saved as run-orca-grex.sh, it can be submitted with:

sbatch run-nbo-orca-grex.sh

For more information, visit the page running jobs on Grex