UoC crest

Check2xsf and Lines and Points

Sometimes it is useful, if less pretty, to visualise data along a particular line. An example might be along a line joining two atoms to see if a particular band shows signs of an increase in density between the atoms (and so might be considered to be bonding) or not.

Check2xsf version 1.08 adds this functionality, and can output either raw data, or data suitable for Gnuplot. The end-points of the lines can be specified either as fractional co-ordinates, or in terms of the positions of atoms. The output can be simply raw data, with # introducing comments, or a valid (if minimalist) gnuplot command file.

The ethene molecule and its sigma-like orbits is considered again.

Ethene sigma MOs

These wavefunctions can be plotted along the line joining the carbon atoms, and are plotted as densities here.

check2xsf -B=1-5 -P=C1:C2:50 --gnu ethene.check ethene.gnu
gnuplot ethene.gnu

This requests the first five bands as densities, plotted along the path from carbon atom 1 to carbon atom 2, with 50 points, and with commands inserted to make the result a valid gnuplot file. This is then viewed with gnuplot.

ethene density on line

The first band is clearly bonding. The second seems to have a node half way between the atoms, the fourth is again bonding, but more tightly localised, and the fifth seems to have the whole of the line between the carbon atoms on its nodal plane. The third is not seen, so presumably it has the same density on this line as either the fourth or fifth and has been over-written in the plot. It can easily be determined that this is so, and, like the fifth band, it is zero at all points on this line. This fits perfectly with the 3D plots, in which bands one to three make up the top row, and four and five the bottom row.


To produce its output, check2xsf uses trilinear interpolation from the FFT grid. There are only about a dozen FFT points on this line, so there has been a considerable degree of interpolation. An alternative is FFT interpolation, and this should be preferable when bands and band densities are being considered. Check2xsf can also do this, with a specified new grid which must be denser, in all directions, than the original grid.

check2xsf -B=1-5 -P=C1:C2:50 -i=100,100,100 --gnu ethene.check ethene.gnu
gnuplot ethene.gnu

The above uses FFT interpolation onto a 100x100x100 grid, followed by trilinear interpolation. The output is very similar, but subtly different, most noticeably with the fourth band being closer to zero at the start and end of the line, and being smoother.

ethene density on line with Fourier interpolation

Atom Identification

Finally, with more complicated systems it is important to identify atoms correctly. If -v is specified, the fractional co-ordinates of the line will be given to stderr, in a form such as

Requested line (0.587320,0.500000,0.500000) to (0.412680,0.500000,0.500000) with 50 points.
One can also specify fractional co-ordinates directly. The above examples can be expressed equivalently with
which reveals that the line is, in some sense, backwards. You may need to put arguments containing brackets in quotes to prevent your shell becoming upset.

A Point

A very minimalist approach, at least for visualisation, is to request data at a single point.

check2xsf   -B=1-5 -z=0.5,0.5,0.5 ethene.check
band_k1_b1 at (0.500000,0.500000,0.500000): 4.280454e-01
band_k1_b2 at (0.500000,0.500000,0.500000): 2.514473e-08
band_k1_b3 at (0.500000,0.500000,0.500000): 1.456411e-08
band_k1_b4 at (0.500000,0.500000,0.500000): 6.065443e-01
band_k1_b5 at (0.500000,0.500000,0.500000): 2.346600e-10

Again one can add Fourier interpolation as above with -i, but, as the point chosen here was an FFT grid point, nothing should change, provided it is also an FFT grid point on the new grid.

check2xsf -i=100,100,100  -B=1-5 -z=0.5,0.5,0.5 ethene.check
band_k1_b1 at (0.500000,0.500000,0.500000): 4.280454e-01
band_k1_b2 at (0.500000,0.500000,0.500000): 2.514473e-08
band_k1_b3 at (0.500000,0.500000,0.500000): 1.456411e-08
band_k1_b4 at (0.500000,0.500000,0.500000): 6.065443e-01
band_k1_b5 at (0.500000,0.500000,0.500000): 2.346600e-10

As expected.