Nanotube in Quantum Espresso

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

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

The ecutwfc parameter was set to 30 (in Rydbergs, so about 400eV), and C.UPF was supplied by gunzipping a suitable C.UPF.gz.

Then PWSCF was run:

$ pw.x -in tube.in > tube.log

To access the potential, a second input file, plot.in, was written containing:

&INPUTPP
  plot_num = 11
/
&PLOT
  iflag = 3,
  output_format = 6,
  fileout = 'pot.cube'
/

and QE's post-processor run:

$ pp.x -in plot.in 

This produces an output file pot.cube whose units are believed to be Rydbergs. As we want eV, we should process this as:

$ c2x --constants
[...]
One Rydberg = 13.60569301000 eV
[...]
$ c2x -R=13.605693 -z='(0,0,0)'  pot.cube 
Density at (0.000000,0.000000,0.000000): 4.715189e+00
$ c2x -R=13.605693 -z='(0.5,0.5,0.5)'  pot.cube 
Density at (0.500000,0.500000,0.500000): 4.067286e+00

So a potential difference of about 0.648V. One can also ask c2x to calculate the potential from the charge density:

$ c2x -Ec -z='(0,0,0)'  pwscf.xml 
Potential_Volts at (0.000000,0.000000,0.000000): -3.881837e+00
$ c2x -Ec -z='(0.5,0.5,0.5)'  pwscf.xml 
Potential_Volts at (0.500000,0.500000,0.500000): -3.261881e+00

Now a difference of 0.620V.