Skip to content

CASTEP

CASTEP is a leading code for calculating the properties of materials from first principles. Using density functional theory, it can simulate a wide range of properties of materials proprieties including energetics, structure at the atomic level, vibrational properties, electronic response properties etc. In particular it has a wide range of spectroscopic features that link directly to experiment, such as infra-red and Raman spectroscopies, NMR, and core level spectra.

Using CASTEP on ARCHER2

CASTEP is only available to users who have a valid CASTEP licence.

If you have a CASTEP licence and wish to have access to CASTEP on ARCHER2, please make a request via the SAFE, see:

Please have your license details to hand.

Note on using Relativistic J-dependent pseudopotentials

These pseudopotentials cannot be generated on the fly by CASTEP and so are available in the following directory on ARCHER2:

/work/y07/shared/apps/core/castep/pseudopotentials
/work/y07/shared/castep/pseudopotentials

Running parallel CASTEP jobs

The following script will run a CASTEP job using 2 nodes (256 cores). it assumes that the input files have the file stem text_calc.

#!/bin/bash

# Request 2 nodes with 128 MPI tasks per node for 20 minutes
#SBATCH --job-name=CASTEP
#SBATCH --nodes=2
#SBATCH --tasks-per-node=128
#SBATCH --cpus-per-task=1
#SBATCH --time=00:20:00

# Replace [budget code] below with your project code (e.g. t01)
#SBATCH --account=[budget code]
#SBATCH --partition=standard
#SBATCH --qos=standard

# Load the CASTEP module, avoid any unintentional OpenMP threading by
# setting OMP_NUM_THREADS, and launch the code.
module load castep
export OMP_NUM_THREADS=1
srun --distribution=block:block --hint=nomultithread castep.mpi test_calc
#!/bin/bash

# Request 2 nodes with 128 MPI tasks per node for 20 minutes
#SBATCH --job-name=CASTEP
#SBATCH --nodes=2
#SBATCH --tasks-per-node=128
#SBATCH --cpus-per-task=1
#SBATCH --time=00:20:00

# Replace [budget code] below with your project code (e.g. t01)
#SBATCH --account=[budget code]
#SBATCH --partition=standard
#SBATCH --qos=standard

# Setup the batch environment
module load epcc-job-env 

# Load the CASTEP module, avoid any unintentional OpenMP threading by
# setting OMP_NUM_THREADS, and launch the code.
module load castep
export OMP_NUM_THREADS=1
srun --distribution=block:block --hint=nomultithread castep.mpi test_calc

Using serial CASTEP tools

Serial castep tools are available in the standard CASTEP module.

We also provide a set of CASTEP tools compiled for serial use on the login nodes or in job submission scripts. You can access these through the castep-tools module:

module load castep-tools

Compiling CASTEP

The latest instructions for building CASTEP on ARCHER2 may be found in the GitHub repository of build instructions: