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.
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.
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.
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.
RunCASTEP.sh is provided for
Linux servers, while
RunCASTEP.bat is provided for Windows servers.
RunCASTEP.sh [-h] [-np number of cores] [-q queue name] seedname (Linux)
RunCASTEP [-h] [-np number of cores] [-q queue name] seedname (Windows)
||Displays the help text.|
||Specifies the number of cores on which to run CASTEP. When this option is not specified a single core is used.|
||The number of cores to use.|
||Submits the job to the specified queue.|
||The name of the queue on which to run the job.|
||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:
RunCASTEP.sh -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:
RunCASTEP.sh -np 2 seedname_DOS RunCASTEP.sh -np 2 seedname_BandStr RunCASTEP.sh -np 4 seedname_Optics
These jobs can be run independently because they do not share input or output files.
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
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 to update the Project Explorer.
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.
CASTEP Job Files dialog
Analyzing CASTEP results