CASTEP > CASTEP jobs > Running CASTEP in standalone mode

Running CASTEP in standalone mode

The most convenient way of running CASTEP is via the Materials Studio interface, which performs all the preparatory tasks required to run a CASTEP job. However, in some circumstances, it may be necessary to run CASTEP in standalone mode with a set of input files prepared elsewhere. For example, you may wish to run a calculation on a server that has not been configured as a gateway, i.e., a computer that does not communicate with your Materials Studio client (perhaps because a firewall prevents automatic file transfer and job launch).

For more general information on using standalone mode, see the Running jobs in standalone mode help topic.


There are five distinct steps involved in using Materials Studio to run standalone CASTEP jobs:

Each step is discussed in more detail below.

Generate the input files

CASTEP requires various input files that contain details of the calculation. More information about these files can be found in the CASTEP file formats topic. You can create these files using a text editor, such as WordPad on Windows or vi on Linux. However, because the information contained in the input files is quite complex, you should use Materials Studio to generate them for you. You can create the required files using the CASTEP Job Files dialog, see the Running jobs in standalone mode help topic for further information.

Only the .param input file is displayed in the Project Explorer. The other input files are saved as hidden files. You should ensure that your Windows folder settings allow you to view hidden files so that you are able to see all of the files you need to copy to the server in order to run CASTEP. It may also help to turn off the Windows option of hiding file extensions for known file types.

Transfer the input files to the server

If you generated the input files manually using a text editor on the server machine, then no file transfer is required. However, if you generated the files on your PC using Materials Studio, you must transfer them to the server before you can start the calculation.

If you are unable to access the hard drive on the server, you should use the File Transfer tool to transfer files from the client to the server.

Execute the job

To assist you in running CASTEP in standalone mode, a batch/shell file called RunCASTEP is supplied. It can be found in the directory in which the CASTEP executables are located, usually etc/CASTEP/bin/ in the main Materials Studio directory. RunCASTEP scripts are used to start CASTEP jobs in standalone mode. is provided for Linux servers, while RunCASTEP.bat is provided for Windows servers.

Usage: [-h] [-np number of cores] [-q queue name] seedname (Linux)


RunCASTEP [-h] [-np number of cores] [-q queue name] seedname (Windows)
Argument Description
-h Displays the help text.
-np Specifies the number of cores on which to run CASTEP. When this option is not specified a single core is used.
number of cores The number of cores to use.
-q Submits the job to the specified queue.
queue name The name of the queue on which to run the job.
seedname The seed used to identify the set of CASTEP input and output files. The input files should be present in the directory in which the CASTEP script is started.

If you wish to calculate properties, you should execute the script for the main run first: -np 4 seedname

When that run is complete, you should make copies of the .check file that will be used in all subsequent properties runs:

cp seedname.check seedname_BandStr.check
cp seedname.check seedname_DOS.check
cp seedname.check seedname_Optics.check

When the appropriate copies have been made, execute RunCASTEP for each properties run: -np 2 seedname_DOS -np 2 seedname_BandStr -np 4 seedname_Optics

These jobs can be run independently because they do not share input or output files.

Download the output files from the server

When the CASTEP calculation is complete, you must transfer the output files back to your PC for analysis in Materials Studio. See Running jobs in standalone mode for further information.

To transfer the output files back to your PC

  1. Transfer the output files to the client PC using either copy and paste or the File Transfer tool.
  2. A complete list of the output files that are generated and descriptions of their contents can be found in the CASTEP file formats topic. All of the files, seedname.*, seedname_BandStr.*, seedname_DOS.*, seedname_Optics.*, seedname_PhonDOS.*, seedname_PhonDisp.*, and seedname_Subset*.*, should be downloaded from the server.

After you have transferred the output files, you may wish to modify their attributes such that all of them except the .castep file are hidden files. This avoids cluttering up the display in the Project Explorer.

If you have transferred files into a Materials Studio project folder, but you cannot see them in the Project Explorer, try using the Refresh button Refresh to update the Project Explorer.

Open the output files in Materials Studio

Provided that you have transferred the correct files from the server to your PC and stored them in a folder in a Materials Studio project, you should be able to make use of the CASTEP analysis options described in the topic Analyzing CASTEP results. Specifically, you can open the 3D Atomistic document containing the starting structure and update it, create a trajectory document and animate it, visualize volumetric properties, calculate DOS and optical spectra, and plot band structure.

See Also:

Manipulating files
CASTEP Job Files dialog
Analyzing CASTEP results

Accelrys Materials Studio 8.0 Help: Wednesday, December 17, 2014
Legal Notices