c2x

ethene pi bond

C2x, or check2xsf as it was first known, was developed in the TCM Group in Cambridge. It reads and writes a selection of file formats which relate to DFT electronic structure codes. It is not simply a conversion utility, but it can also perform manipulations and some analysis. It can form supercells and find primitive cells. If linked with the excellent spglib symmetry finder, it provides access to functionality from that package. It can interpolate densities via a combination of trilinear and Fourier interpolation, integrate densities and calculate their dipole moments, analyse bands for inversion symmetry, and symmetry-expand eigenvalues for use with Fermi surface plotting.

Originally supporting just Castep, c2x now supports Abinit, Onetep, Quantum Espresso, Siesta and VASP as well. It thus can be considered to be a little like OpenBabel, but with an emphasis on different codes, and support for volumetric data.

One use of c2x is extracting volumetric data (charge density, colinear spin density, or charge density from a given band) for visualisation. It supports output formats compatible with XCrysDen, VESTA, VMD and Jmol amongst others, and can also produce 1D data in a format suitable for gnuplot. The ethene π bond above is from the 2016 version of XCrysDen.

Another use of c2x is to use one package's post-processing tools with another's. It can, for instance, convert a Castep .check file into a .chgcar file readable by VASP post-processors.

It can perform many cell manipulations, forming supercells or primitive cells, adding or removing vacuum, and rolling sheets into nanotubes. It can calculate electrostatic potentials from charge densities, and also calculate post hoc dipole correction energies for some geometries.

Getting c2x

C2x can be downloaded from its downloads page, as source or MacOS or Linux binaries. It is also available in Homebrew, and several Linux distributions.

News

Version 2.50a released, 27th November 2026. Adds support for filling and colouring DoS plots, and colouring phonon bandstructures. Supports static visualisation of phonons. Also has improvements to Blöchl's method for DoSes.

Version 2.50 released, 16th June 2026. Adds support for phonon DoSes and bandstructures, and has various minor improvements and fixes.

Version 2.42a released, 30th August 2025. Adds support for locally-projected densities of states, and has various bugfixes.

Version 2.42 released, 12th March 2025. Various bug fixes, and adds support for electronic density of states calculations (with smearing or Blöchl's method) and simple electronic band structure plots.

Version 2.41b released, 30th January 2024. Fixes to support XML output from Quantum Espresso versions >=7.0.

Version 2.41a released, 28th December 2023. Fixes long-standing bug in reading angdeg in Abinit input. MacOS ARM binary provided for the first time.

Version 2.41 released, 22nd September 2023. Major new features are the support for vector fields, most notably spinors, and support for calculating first and irreducible Brillouin zones. The accumlation and integration routines have been rewritten to provide greater accuracy, cylindrical weighted and accumulated plots now multiply by the c axis length (an incompatible change), FFT interpolation for points added, and miscellaneous small improvements and fixes.

Version 2.40e released, 9th February 2023. This adds tricubic interpolation as an alternative to trilinear (--tricubic), and has some basic support for .mol/.mdl files. It also marks the first attempt to use Homebrew for distribution.

Version 2.40d released, 23rd December 2022. This adds spherical averaging, is better at retaining symmetry operations after a basis change (use -n for the old behaviour), and has some I/O improvements. Other minor changes listed in the change log.

Version 2.40c released, 19th February 2022. The only advertised changes are some bug fixes, particularly to PDBx output, and to Elk input.

Version 2.40b released, 27th January 2022. A collection of relatively minor bugfixes and added features. Most notably improved Siesta support, and -2 symmetry axes are now described as mirror and glide planes. More details in the change log.

Debian 11 "Bullseye" released, 14th August 2021, including the first "stable" Debian c2x package.

Ubuntu 21.04 released, 22nd April 2021, and it includes a c2x package in its universe repository. I believe that this is the first major stable Linux distribution to include c2x. (There is also a Debian package in bullseye, which is currently "testing", not "stable".)

Older News

Citing c2x

If you find it useful in your published research, the traditional academic acknowledgement of a citation would be appreciated. C2x: a tool for visualisation and input preparation for Castep and other electronic structure codes, MJ Rutter, Computer Physics Communications, 225 174-179 (2018). Once such papers are noticed, they are added to this list.