TCM
UoC crest

CASTEP

The density functional theory code CASTEP was orginally developed in TCM. It has since become a commercial product, sold by Accelrys (now renamed Biovia), but also distributed in source form with a licence to UK and EU academics. More details of this arrangement can be found at castep.org.

Because the code is commercial, not freely distributable, the directory in which it is kept in TCM is restricted to those known to have signed a UKCP licence, or those deemed to be collaborating with Prof Payne. If the output of the command 'groups' includes the word 'castep' then our fileserver thinks you are in this category.

Other CASTEP Information in TCM

I find MJR's CASTEP page to be a useful summary. Well, I would, wouldn't I?

Building and Running Castep

You are always free to get the source directly from UKCP, and to build according to the instructions therein. The following merely describes TCM-specific alternatives to this route.

Source, and other resources, can be found in /rscratch/CASTEP. These include pre-built binaries found in /rscratch/CASTEP/bin. These binaries are not fully tested. I am not sure I know what 'fully tested' would mean. However, if one is reported as being broken, it will be removed.

An Alternative Build System

TCM (well, MJR) maintains an alternative build system for Castep, as the 1,200 lines of Castep makefiles confuse him. Compiling on the local scratch disk would be recommended, and building a new Castep executable by this route is as easy as:

pc0:/scratch/mjr19/Castep$ cp /rscratch/CASTEP/Source/compile-6.1 .
pc0:/scratch/mjr19/Castep$ ./compile-6.1 /rscratch/CASTEP/Source/CASTEP-6.1.1
Compiling constants.F90  (1 of 68)
Compiling trace.F90  (2 of 68)
[...]
Compiling castep.f90  (68 of 68)
Linking

Total compile time: 988 s

(Of course -6.1 should be replaced by whatever version you wish to build.)

This will leave a directory full of many object files and modules, which you may wish to get rid of with a quick

rm *.o *.mod
or, if you wish to type more letters, the equivalent
./compile-6.1 clean
Most importantly, that directory will contain an executable called castep.serial. To find how Castep was bulit, read the compile script! At the time of writing, the default was to use Intel's compilers with fairly high optimisation, and the non-threaded version of Intel's maths kernel library for BLAS and FFTs.

I find this method easier to use if I want to fiddle with modifying compiler options or libraries (by editting compile-6.1). It is made available in case anyone else prefers it too. If two lines of the compile script are changed (FC=mpifort and COMMS=mpi) it will build a parallel version, at which point choosing a different name for the final executable would be sensible.

What's in a Name?

CASTEP: CAmbridge Serial Total Energy Package, from the days when the parallel version was CETEP: Cambridge and Edinburgh Total Energy Package. CETEP was simply a fork of CASTEP, albeit with major new functionality. It merged back into CASTEP, and thus made CASTEP's acronym somewhat misleading - CASTEP is no longer serial, nor is it solely a Cambridge project. Of the seven current members of the CASTEP Development Group, five did CASTEP research whilst in TCM.

Further CASTEP Support in TCM

This is driven by demand. If all Castep users are in a state of happy independence, it is pointless me doing anything. If they are not, it would be reasonable to remind me that having done a PhD and PostDoc with Castep, I ought to be able to offer some level of support.