
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.
Installing c2x
The following should work in an empty directory. Note the abuse of
* to match the unknown version number of c2x downloaded. Version
2.0.2 of spglib is used, as it is the last version which compiles
with the Makefile included with c2x 2.41b and earlier.
$ sudo apt install curl
$ curl -O https://www.c2x.org.uk/downloads/c2x.tgz $ curl -O https://www.c2x.org.uk/downloads/spglib-2.0.2.tgz $ tar -xf c2x.tgz $ tar -xf spglib-2.0.2.tgz $ cd spglib-2.0.2/src/ $ cp ../../c2x_*/Makefile.spglib Makefile $ make $ cp spglib.h libsymspg.a ../../c2x_* $ cd ../../c2x_* $ make $ cp c2x ~/bin
Adding cellsym
$ ln -s c2x ~/bin/cellsym
0 Comments