 Back
 Visualisation
 Cell Manipulation
 Code Support
 Notes
 Links
check2xsf
NAME
check2xsf  converts various crystal formats including density grid dataSYNOPSIS
check2xsf [bBkmvx] [FORMAT] [OPERATION] infile [outfile]DESCRIPTION
check2xsf converts primarily a CASTEP .check file to various output formats, additionally extracting densities (charge, spin, band or psi) and forces. It can also read CASTEP .cell files and PDB files. It is a sort of Babel with support for gridded data and .check files.
It may have been compiled to give access to some functions from spglib too.
An input file whose name ends '.pdb' is assumed to be in pdb format. Otherwise, if the first byte is either zero, 10 or 30 it is assumed to be a .check file, else it is assumed to be a .cell file. It can also read .orbitals files (which are identical to .check files in format), and .castep_bin files (which lack wavefunctions). Furthermore, it can read .chdiff files and .cst_esp files. In these cases it needs a .cell or a .check file as well in order to obtain unit cell information.
OPTIONS
 a
 rotate as though outputing in abc format, i.e. place a along x axis, b in xy plane, and abc form a right hand set. Useful if one wants a dx file consistent with a pdb file. See also 3.
 A
 accumulate (sum) bands requested by b= or B=.
 b[=range]
 include specified bands as psi (real).
 B[=range]
 include specified bands as densities (psi*conjg(psi)).
 c
 include charge density.
 C
 find "compact" (nearcubic) set of cell vectors.
 d
 read also a corresponding .chdiff file, and output its contents. The filename given must still be that of a .cell or .check file, as a .chdiff file contains no axes.
 e
 read also a corresponding .cst_esp file, and output its contents. The filename given must still be that of a .cell or .check file, as a .cst_esp file contains no axes.
 e=tol
 set symmetry tolerance to given number of Angstroms
 H
 shift atoms by half a grid cell. For use with xplor data format, see below.
 i=nx,ny,nz
 Fourier interpolate onto specified grid size. New grid may be coarser or finer than original. Any dimension given as zero is replaced by old grid size. If reading wavefunction, any grid truncation is done after transforming back to real space and converting to density etc.
 k[=range]
 include given kpoints for bands (default range is 1).
 l
 if kpoints are to be included in a .cell file, explicitly list them rather than using the MP generation parameters.
 L
 output in abc format assuming that abc describes a lefthanded set of axes. Do not use this unless you understand why you should not!
 m[=a,b,c]
 assume input is molecule, not crystal. Try to avoid outputing a cell, shift if some coordinates are negative, or if a,b,c given shift by those numbers of FFT grid cells.
 P
 find primitive cell.
 P=p1:p2:nn
 output data as line of nn points from p1 to p2. Express p's as either fractional coordinates in the form (x,y,z), or an atom position as, e.g., Si3 for silicon atom number 3.
 R
 don't attempt to rescale densities, but output them raw.
 s
 include spin density.
 S[=range]
 include specified spins or spinors for bands (default range is , and the spins are numbered 0 and 1).
 t=(x1,y1,z1)(x2,y2,z2)[(x3,y3,z3)]
 rotate coordinate system so that the first vector becomes the second. First vector given in relative coordinates. If third axis given, it is used as the rotation axis. Else the rotation axis will be perpendicular to the two axes given.
 T=(x1,y1,z1)(x2,y2,z2)[(x3,y3,z3)]
 rotate coordinate system so that the first vector becomes the second. All vectors given in absolute coordinates. If third axis given, it is used as the rotation axis. Else the rotation axis will be perpendicular to the two axes given.
 u
 use atomic units (Bohrs) when writing .cell files and 1D data.
 v
 be verbose. Far too much output can be generated if specified more than twice.
 w
 weight bands by occupancies, or sqrt(occ) if not calculating density. W weight bands by occupancies and kpoint weight, or sqrt thereof if not calculating density.
 x=(x1,x2,x3)(y1,y2,y3)(z1,z2,z3)
 expand unit cell to new cell specified in terms of the old cell axes.
 X=(x1,x2,x3)(y1,y2,y3)(z1,z2,z3)
 expand unit cell to new cell specified in absolute coordinates.
 z=x,y,z
 print to stdout data at given point, and set output type to null.
 3

when moving from a left hand set of axes to a right hand set, rather than
exchanging the 2nd and 3rd axes, preserve the 3rd and exchange the 1st
and 2nd. This transformation is required if the input is cartesian and
left handed, and an abc output is requested. Specifying this flag twice
will cause the 1st and 3rd axes to be exchanged.
FORMATS
The following output formats are recognised.
 cell
 CASTEP .cell, cartesian cell, fractional coordinates. The output contains just the lattice and positions blocks, so is not a valid input to CASTEP, but can easily be made so.
 cell_abc
 CASTEP .cell, abc cell, fractional coordinates.
 cell_abs
 CASTEP .cell, cartesian cell, absolute coordinates.
 cell_abc_abs
 CASTEP .cell, abc cell, absolute coordinates.
 cif
 a very basic and rigid format which may be compatible with some CIFreading software.
 cml
 Chemical Markup Language.
 cube
 Gaussian cube. Atoms and at most one data set.
 dx
 Data Explorer. Data set only.
 fdf
 Siesta. Current support is very partial. If you want a density, you must name the output file on the command line, the filename must end ".fdf", and the density will appear in a corresponding ".RHO" file.
 gnu
 Gnuplot command file for 1D data.
 null
 Null output. Throw away all output, but still write some useful information the input to stderr.
 pdb
 PDB
 pdbn
 PDB, but label the atoms with element symbol and number within that species, e.g. C8, H24, Ca2, rather than just with element symbol. The whole string can contain no more than four characters, so * is used for the numeric part if it would not otherwise fit.
 py
 a python dictionary, compatible with the Atoms data structure from ASE.
 pya
 a python ASE Atoms data structure.
 shelx
 a subset of the SHELX97 format.
 vasp
 VASP output. One should almost certainly specify R as well.
 xplor
 Xplor format. Data set only. The grid used in this format is offset by half a grid cell compared to Castep, and as interpolating is inexact, this program does not in this case. Also the grid axes are described in terms of a, b, c, alpha, beta, gamma, so information about orientation in space is lost. To produce a compatible pdb file of atomic coordinates, specify Hc when creating the pdb file.
 xsf
 XCrysDen format. Default. The only format in which multiple data sets are supported.
 xyz

XYZ format. Atoms only, no unit cell.
Where a range is required, it can be specified as a single integer, two integers separated by a hyphen (all integers in the given range), or a commaseparated list of any of these elements. Only for the xsf output format is a range including more than a single integer meaningful.
OPERATION
If check2xsf has been compiled with spglib, the following spglib operations are available.
 int
 call spg_get_dataset() and report international symbol
 list
 call spg_get_dataset() and list symmetry ops
 point
 call spg_get_dataset() followed by spg_get_pointgroup()
 primitive
 call spg_find_primitive()
 refine
 call spg_refine_cell()
 schoen
 call spg_get_schoenflies()
 symmetry

call spg_get_dataset() and keep symmetry ops
NOTES
For cell and pdb formats, just the unit cell and atomic positions are read or written. For the dx and xplor formats, just a single data set is written. For the VASP format atomic positions and a data set are written, but information regarding atomic species cannot be recorded. For the Gaussian cube format atomic positions and at most one data set are recorded, and for the XCrysDen format the unit cell, atomic positions, forces, and any number of data sets are recorded.
Note that the pdb format offers a very low precision for storing coordinates, and, because it stores the unit cell in abc format, and the atoms in absolute coordinates, a rotation is likely to be required to place a on the cartesian x axis, etc. If so, it will be done automatically. The same is true for the abc varients of the cell format and for the Xplor file format. This rotation can be specified explicitly for other formats. Additionally the axes must form a righthanded set. If this is not the case, two axes will be interchanged. By default, b and c are exchanged, but the flag 3 will cause a and b to be exchanged instead.
The cif reader reads little more than check2xsf's cif output. It is very basic, and will fail to read correctly a large number of valid cif files. There is currently no intention to produce a proper cif reader.
When outputting psi it is assumed that it is possible to make psi real by unwinding any phase produced by the kpoint, and then multiplying all points by the same arbitrary complex constant. If this is not so, the band was probably nonsense anyway. The final choice of a factor of 1 is arbitrary. This scheme produces nonsense if one attempts to plot a degenerate band.
When doing the conversions resulting from x, a new grid will be chosen of similar density to the old, and the data interpolated onto the new using trilinear interpolation. Extrapolating psis (rather than densities) is meaningless except at gamma, for the phase due to the k point is not considered.
Densities by default are in Angstroms**3, and psis in Angstroms**1.5.
EXAMPLES
To extract the charge density in xsf format

check2xsf c input.check output.xsf
To extract the first four bands as psi at the second kpoint in xsf format

check2xsf b=14 k=2 input.check output.xsf
To convert a check file to a pdb file

check2xsf pdb input.check output.pdb
To convert a cell to something containing two repeat units in the a and b directions, and one in the c direction

check2xsf cell x='(2,0,0)(0,2,0)(0,0,1)' in.cell out.cell
Assuming the above cell was a 3.5A cube, the same in absolute coordinates

check2xsf cell x='(7,0,0)(0,7,0)(0,0,3.5)' in.cell out.cell
VIEWERS
This code was written with the following viewers in mind. For densities, xcrysden and jmol, for structures gdis.
BUGS
None know.
Please report others to MJR.
SEE ALSO
babel(1).
Index
This document was created by man2html, using the manual pages.
Time: 13:51:55 GMT, January 17, 2017