# CASTEP jobs

> What HiveBoard shows for a CASTEP job on a Slurm cluster: geometry, MD and phonon progress, enthalpy, force and stress charts, and the 3-D cell.

Source: https://hiveboard.dev/docs/codes/castep · Section: Simulation codes · HiveBoard 0.1.7 · Updated 2026-10-19

## In short

- HiveBoard recognises a CASTEP folder by its seed files — .castep, .param, .castep_bin — or by CASTEP keywords in the .param file.
- Geometry optimisations count iterations against geom_max_iter and chart the enthalpy, and |F|max and Smax against their tolerances; MD, phonons and band structures have counters of their own.
- An error is read from <seed>.0001.err, which CASTEP never deletes — check its date before trusting it.

A CASTEP run is a seed name: `<seed>.param` (what to do) and `<seed>.cell` (the crystal) go in; `<seed>.castep` (the log), the `.geom` and `.md` trajectories, and the `.check` and `.castep_bin` restarts come out. HiveBoard reads the inputs and the log, and draws the trajectories. Following the job installs nothing on the cluster and changes nothing in the folder. In the job list, your own job carries the code tag **CASTEP** and its kind of run, taken from `task`.

CASTEP appends a new run to an existing `.castep` file. HiveBoard's step counts and energies are the latest in the file; the settings it reads from the log's header describe the first run the file holds.

## What HiveBoard shows

### Progress and time left

| Kind | Counts | Against |
|---|---|---|
| Geometry opt | Geometry iterations finished | `geom_max_iter` (the log's, else the `.param`'s) |
| MD | MD steps finished | the number of MD steps (the log's, else `md_num_iter`) |
| Phonons, E-field response | q-points, else perturbations at the current q-point | their number |
| Bands, Spectral | k-points of the path finished | their number |
| Single point | Cycles of the latest SCF | `max_scf_cycles` |

The time left is the time per step so far times the steps left ("~…s per geometry iteration × up to … left (often finishes sooner)"), never longer than the time before the wall-time limit. When the log ends with CASTEP's "Total time" line, the bar is full.

Typical status sentences: "Optimising the geometry: … of up to … iterations done.", "Geometry optimisation converged after … iterations.", "Molecular dynamics: … of … steps done.", "Transition state found: barrier … eV from the reactant."

### Figures and charts

The [Overview](/docs/job/overview-tab) shows the figures that apply: **Final energy** and **Free energy** (eV), **Enthalpy**, **Geometry iterations**, **Max force** and **Max stress** (hover them for the tolerances), **MD steps**, **Simulated time**, **Temperature**, **Conserved energy**, **Pressure**, **Perturbations**, **q-points**, **Band k-points**, **Barrier (forward)** and **Barrier (reverse)**, **SCF cycle**, **Atoms**, **k-points**, **Warnings** (as CASTEP counts them), **Run time**, **Peak memory** and **Version**.

The charts:

- a geometry optimisation — **Enthalpy per geometry iteration**, **Maximum force** and **Maximum stress**, the last two with lines at their tolerances;
- MD — **Temperature** and **Conserved energy** (its drift, in meV);
- MD and TS search — **Potential energy** per SCF;
- every run — **SCF energy gain per atom (latest cycles)**, on a log scale against the electronic tolerance.

A chart appears once it has two points.

### Errors and warnings

CASTEP reports an error in `<seed>.0001.err`, not in the log; HiveBoard quotes it: "The CASTEP error file says: …". Warnings say when SCF cycles reached `max_scf_cycles` without reaching the ground state, and when a geometry optimisation used all its iterations. "No output update for N min — job may be stalled." appears when the `.castep` log has not changed for more than 15 minutes while the job runs.

### Setup

The [Setup](/docs/job/setup-tab) tab's **Calculation setup** shows Task, Functional, Plane-wave cutoff, Basis precision, k-mesh, k-point spacing, Electronic tol., SCF cycles allowed, Metals method, Smearing, Spin polarised, Dispersion, Optimiser, Force tolerance, Ensemble, Time step, Target temperature, Thermostat and Parallel — from the log where it states them, from the `.param` and `.cell` otherwise.

HiveBoard does not restart CASTEP runs: **Continue** is offered for VASP only. CASTEP continues a run with `continuation : default` in the `.param` file, from the `.check` file, which you set up yourself.

## Kinds of run it tells apart

`task` in the `.param` file decides; without it CASTEP runs a single point. HiveBoard takes the first that fits:

| Kind | What it means |
|---|---|
| Geometry opt | Relaxation of the ions, and of the cell unless it is fixed (task GeometryOptimization) |
| MD | Ab initio molecular dynamics (task MolecularDynamics) |
| TS search | Transition-state search by LST/QST or NEB (task TransitionStateSearch) |
| Phonons | Lattice dynamics by linear response or finite displacement (task Phonon) |
| E-field response | Dielectric permittivity and polarisability (task Efield) |
| Bands | Band structure along a k-point path (task BandStructure) |
| Spectral | Density of states, optical or core-level spectra (task Spectral, Optics, Elnes) |
| NMR | Chemical shielding and electric field gradients (task MagRes) |
| Single point | Energy (and forces) at a fixed geometry — also what CASTEP runs when no task is given |

## The 3-D structure

The [Structure tab](/docs/job/structure-tab) shows the first of these that yields atoms:

1. `<seed>.geom` — one frame per finished geometry iteration, with the cell.
2. `<seed>.md` — one frame per MD step, with the cell.
3. The fractional positions the `.castep` log prints for every configuration, with the cell it states.
4. The `.cell` file: `POSITIONS_FRAC` with `LATTICE_CART`, or `POSITIONS_ABS` in ångström (or in bohr or nm when the block says so).

Trajectories show up to their last 40 frames. A queued job shows only the `.cell` geometry — see [Queued jobs and reused folders](/docs/job/queued-and-reused-folders).

## Files it recognises

The **What it is** column of the [Files tab](/docs/job/files-tab) names these files:

| Role | Names | What it is |
|---|---|---|
| Parameters | `*.param` | Parameters: task, xc_functional, cut_off_energy, convergence and MD settings |
| Cell | `*.cell` | The crystal: lattice, atomic positions, k-points, pseudopotentials, constraints |
| Log | `*.castep` | The log — everything CASTEP reports (a new run is appended to it) |
| Geometry trajectory | `*.geom` | One frame per geometry-optimisation iteration (atomic units) |
| MD trajectory | `*.md` | One frame per MD step (atomic units) |
| Error file | `*.err` | Written only when CASTEP stops with an error |
| Checkpoints | `*.check`, `*.castep_bin` | Checkpoint (wavefunctions, density, geometry) — what a continuation reads; checkpoint without the wavefunctions |
| Results | `*.bands`, `*.phonon` | Eigenvalues at every k-point; phonon frequencies and eigenvectors |
| Others | `*.usp`, `*.bib`, `*.cst_esp`, `*.den_fmt` | Pseudopotentials; references for the methods this run used; electrostatic potential; charge density on the grid |

The checkpoints, `.cst_esp` and `.den_fmt` are marked as large: the download button on the row asks before copying one to your computer.

## How HiveBoard recognises a CASTEP folder

- **Tell-tale names**: `*.castep`, `*.param` and `*.castep_bin` mean CASTEP on their own.
- **Signature**: a `.param` file whose top sets CASTEP keywords such as `task`, `xc_functional`, `cut_off_energy`, `spin_polarised` or `max_scf_cycles`; or a log that begins with "CASTEP version" or CASTEP's banner in large letters.
- **Shared names**: `*.cell`, `*.geom` and `*.check` count only with the signature.

HiveBoard goes by the folder's files, not by your batch script or the program it starts (`castep.mpi`, `castep.serial`). More in [How codes are recognised](/docs/codes/how-codes-are-recognised).

## What it was checked against

Real CASTEP files of versions 16.1 and 24/25.1.

HiveBoard is an independent program: it reads the files CASTEP writes and is not made by, or connected with, CASTEP's developers.

## Known limits

- CASTEP never deletes `<seed>.0001.err`, so an error file left by an earlier run reads as a current failure.
- A cell given as `LATTICE_ABC` is not read as a cell.
- The k-points are in the `.cell` file, and a queued job keeps only its `.param`, so they are not shown while the job is queued.
- A variable-cell run is drawn in its last cell in every frame.
- In a folder that holds several calculations, the newest files of each kind are picked separately and may belong to different runs.

## Related

- [The twenty supported codes](https://hiveboard.dev/docs/codes/supported-codes.md)
- [How codes are recognised](https://hiveboard.dev/docs/codes/how-codes-are-recognised.md)
- [VASP jobs](https://hiveboard.dev/docs/codes/vasp.md)
- [FHI-aims jobs](https://hiveboard.dev/docs/codes/fhi-aims.md)
