Nanotube in Castep

To make a suitable .cell file from the graphene sheet,

$ c2x -y=7,0 -v --cell graphene.cell tube.cell

A tube.param was also created containing:

WRITE_CST_ESP : true
WRITE_FORMATTED_POTENTIAL : true
CUT_OFF_ENERGY : 400 eV

and castep run as

  $ castep tube

The run took about a minute on a desktop, and used under 1GB of memory.

The potential far from the tube (i.e. at (0,0,0)) and at the centre of the tube (i.e. at (0.5,0.5,0.5)) can then be recovered as:

$ c2x -z='(0,0,0)' tube.pot_fmt 
Also reading tube.cell
Potential at (0.000000,0.000000,0.000000): 3.977488e+00
$ c2x -z='(0.5,0.5,0.5)' tube.pot_fmt 
Also reading tube.cell
Potential at (0.500000,0.500000,0.500000): 1.007447e+00

or

$ c2x -z='(0,0,0)' tube.cst_esp 
Also reading tube.cell
ESP at (0.000000,0.000000,0.000000): 3.977501e+00
$ c2x -z='(0.5,0.5,0.5)' tube.cst_esp 
Also reading tube.cell
ESP at (0.500000,0.500000,0.500000): 1.007451e+00

So the potential difference is about 2.9V. One can also ask c2x to calculate the potential from the charge density:

$ c2x -Ec -z='(0.0,0.0,0.0)' tube.check
Potential_Volts at (0.000000,0.000000,0.000000): -3.886088e+00
$ c2x -Ec -z='(0.5,0.5,0.5)' tube.check
Potential_Volts at (0.500000,0.500000,0.500000): -3.275329e+00

Now a difference of 0.611V. Why the discrepancy? Castep's potential files include the exchange-correlation potential, whereas c2x calculates just the electrostatic potential. The charge density at the centre of the tube is sufficient to give an exchange-correlation potential of around 2V.

This assertion can be checked:

$ c2x -c -Z='(0.0,0.0,0.0)' tube.check
Density at (0.000000,0.000000,0.000000): -1.967008e-06
PW XC potential at -0.000002 eA^-3 = 0.000000 V
$ c2x -c -Z='(0.5,0.5,0.5)' tube.check
Density at (0.500000,0.500000,0.500000): 1.599576e-03
PW XC potential at 0.001600 eA^-3 = -2.272577 V

Whilst the XC function used by c2x is quite crude, and not the same as used by Castep, it should be reasonable for low densities. Here it suggests that without the XC potential, the potential at (0.5,0.5,0.5) would have been 3.280024V, leading to a difference of 0.697V. Not perfect agreement with 0.611V, but much better than 2.970V.