Abstract

The c2x code fills two distinct roles. Its first role is in acting as a converter between the binary format .check files from the widely-used Castep [1] electronic structure code and various visualisation programs. Its second role is to manipulate and analyse the input and output files from a variety of electronic structure codes, including Castep, Onetep and Vasp, as well as the widely-used ‘Gaussian cube’ file format. Analysis includes symmetry analysis, and manipulation arbitrary cell transformations. It continues to be under development, with growing functionality, and is written in a form which would make it easy to extend it to working directly with files from other electronic structure codes.Data which c2x is capable of extracting from Castep’s binary checkpoint files include charge densities, spin densities, wavefunctions, relaxed atomic positions, forces, the Fermi level, the total energy, and symmetry operations. It can recreate .cell input files from checkpoint files. Volumetric data can be output in formats useable by many common visualisation programs, and c2x will itself calculate integrals, expand data into supercells, and interpolate data via combinations of Fourier and trilinear interpolation. It can extract data along arbitrary lines (such as lines between atoms) as 1D output.C2x is able to convert between several common formats for describing molecules and crystals, including the .cell format of Castep. It can construct supercells, reduce cells to their primitive form, and add specified k-point meshes. It uses the spglib library [2] to report symmetry information, which it can add to .cell files.C2x is a command-line utility, so is readily included in scripts. It is available under the GPL and can be obtained from http://www.c2x.org.uk. It is believed to be the only open-source code which can read Castep’s .check files, so it will have utility in other projects. Program summaryProgram Title: c2xProgram Files doi:http://dx.doi.org/10.17632/wj5hcj7x39.1Licensing provisions: GPLv3Programming language: CNature of problem: C2x is able to extract a large variety of data from Castep’s [1] large, binary-format, output files to facilitate further processing or visualisation. These binary files are optimised for rapid input and output by Castep, but are impossible to read without detailed knowledge of their internal structure, which varies between different versions of Castep. In them wavefunctions are stored as plane wave coefficients, so need to be Fourier transformed before they can be visualised in real space. C2x can manipulate the input files of Castep, and other common crystallographic formats, performing functions useful for setting up calculations, such as supercell construction, format conversions, and symmetry analysis.Different electronic structure codes use different file formats for outputting densities. C2x is able to convert between some of the major formats, allowing visualisation and post-processing tools targeted at one electronic structure code to be used with others.Solution method: C2x is a command-line utility written in standard C. It is able to process large (multi-GB) binary files efficiently, extracting much smaller datasets. C2x has considerable knowledge of the structure of the checkpoint files as written by various versions of Castep. Wavefunctions are optionally converted to densities, and then transformed to real space using its own FFT routine. Weighted sums of densities from multiple bands can be accumulated. C2x interpolates volumetric data by using user-specified combinations of trilinear and Fourier interpolation. For symmetry analysis it relies on the existing spglib [2] library, which is also used by Castep. It supports cell transformations with the axes of the new cell expressed in absolute terms, or in terms of the original axes. It has its own internal representation of the unit cell and its contents, and has several routines for converting this to and from common crystallographic file formats.C2x is able to read densities from Castep’s binary formats, and both read and write Castep’s formatted density files, Vasp’s formatted density files, and the .cube files used by Gaussian and Onetep.Additional comments: Primary site for distribution and documentation: www.c2x.org.uk[1] S. J. Clark, M. D. Segall, C. J. Pickard, P. J. Hasnip, M. J. Probert, K. Refson, M. Payne, First principles methods using CASTEP, Z. Kristall. 220 (2005) 567–570.[2] A. Togo, Spglib, a library for finding and handling crystal symmetries [cited 2017-02-23].https://atztogo.github.io/spglib/

Highlights

  • Programs such as CASTEP [1] calculate the electronic properties of systems, but, in order to gain insights from their results, it is necessary to have a means of presenting or post-processing their output

  • The c2x code is able to extract data from this file into formats compatible with many visualisation programs, and does so without reading the whole file into memory, so works well on modest computers. It fits in with a workflow of performing a calculation on a remote supercomputer, extracting data on a modest login node, and transferring the small dataset extracted to a local computer for visualisation

  • One can transfer the whole output to the local computer, and run c2x

Read more

Summary

Introduction

Programs such as CASTEP [1] calculate the electronic properties of systems, but, in order to gain insights from their results, it is necessary to have a means of presenting or post-processing their output. Functionality has been extended considerably since, an early extension being the ability to extract spin densities, this being used in studies of Fe(II) [6] It provides for a range of processing of the input and output of Castep (and similar codes). C2x converts between various molecule and crystal description file formats in a similar fashion to Open Babel [14] It can read and write Castep’s .cell format, including those extensions introduced by Onetep, the chg, chgcar and poscar formats of VASP 5, PDB [15], Shelx-97 [16], and subsets of both XSF and CIF [17]. Documentation is available both in the form of a standard UNIX man page, and from the website http://www.c2x.org.uk

Visualisation of 3D grid data
Interpolation
Cell manipulation
Structure of code
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.