QNANO
Example: Graphene in external potential

Graphene in external potential

Directory: "examples/graphene/05_potential:"

This examples shows how to add local potentials V(R_i) to tight-binding calculations. The potentials are prepared before the actual calculation and stored in a potential file. This file contains a real number per line corresponding to V(R_i) for each atom i in a sample (we have to use the same position file for generation of the potential and for the diagonalization).

To run the example execute

$QNANO_DIR/examples/graphene/05_potential/run_example.sh

The first part of the example is again the generation of a bilayer graphene structure

$QNANO_DIR/bin/generate -materialfile $QNANO_DIR/resources/graphene.dat \
-cut_hexagon_armchair $N -outfile pos_monolayer.dat

$QNANO_DIR/bin/add_positions \
-positions pos_monolayer.dat pos_monolayer.dat  \
-lattice_units_materialfile $QNANO_DIR/resources/graphene.dat \
-shift_LU 0.666667 -0.333333 1  -outfile pos_bilayer.dat

IMPORTANT: Up to this stage the origin of the sample is still the point from which the underlying lattice is generated before the hexagon is cut out. Here, however, we want to center the potential on the center of the sample. The command:

$QNANO_DIR/bin/center_positions -positions pos_bilayer.dat -outfile pos_bilayer.dat

shifts all atom positions so that the origin is the center of the sample.

Now, after the structure is generated, we generate the potential. Here, we apply a bias between the upper and the lower layer, which amounts to applying a constant potential on the atoms in the upper layer by V=0.3 eV and in the lower layer by -V. We use a linear potential V(r)=a*(r*direction), where direction is a unit vector (normalized internally). Since linear potentials are given in units of eV/nm, we use bash tools to calculate the linear potential strength strz and then generate the potential:

V=0.3       #potential on upper layer: V, on bottom layer: -V, in eV
strz=$(echo 2*$V/0.335|bc -l)     #in program: units eV/nm 

$QNANO_DIR/bin/linear_potential -positions pos_bilayer.dat  \
-outfile test_pot.dat -strength $strz -direction 0 0 1

In addition to the bias, we apply a 2d parabolic confinement potential V(r)=strength*(x^2+y^2), where x and y are the coordinates orthogonal to "direction", truncated after a radius of 2.5 nm on both layers and add this to the bias potential:

parabV=0.075  #strength of the parabolic confinement potential in eV/nm^2
 
$QNANO_DIR/bin/parabolic_potential_2d -positions pos_bilayer.dat  \
-add_to test_pot.dat -outfile test_pot.dat -strength $parabV  \
-direction 0 0 1 -truncate_radius 2.5

To display the potential we just need to add the "potential" option in

$QNANO_DIR/bin/QNANO2ps -positions pos_bilayer.dat -potential test_pot.dat \
-boxwidthz 0.2 -translatez 0.2 -outfile pot_upper.ps
$QNANO_DIR/bin/QNANO2ps -positions pos_bilayer.dat -potential test_pot.dat \
-boxwidthz 0.2 -translatez -0.2 -outfile pot_lower.ps

Similarly, we also just have to specify the additional "potential" option for the diagonalization:

$QNANO_DIR/bin/tightbinding_slepc -resources_dir $QNANO_DIR/resources \
-positions pos_bilayer.dat -potential test_pot.dat \
-eigenvalue_filename "energies_bias_conf.dat" \
-eps_target 0.45 -eps_nev 20 -eps_max_it 1000000  \
-EV_filename_pattern "EV*_bias_conf.dat"  -nr_print  1