QNANO
|
Directory: "examples/graphene/04_bilayer:"
As we have seen previously
$QNANO_DIR/bin/generate -materialfile $QNANO_DIR/resources/graphene.dat \ -cut_hexagon_armchair 8 -outfile positions_armchair_hex8.dat
generates a hexagonal armchair graphene flake with 8 hexagonal rings per side.
To generate an AB-stacked bilayer, we copy the postion file of the monolayer, shift it and add it to another monolayer:
$QNANO_DIR/bin/add_positions \ -positions positions_armchair_hex8.dat positions_armchair_hex8.dat \ -lattice_units_materialfile $QNANO_DIR/resources/graphene.dat \ -shift_LU 0.666667 -0.333333 1 -outfile bilayer_armchair_hex8.dat
"add_positions" takes two position files, here they are the same. The second position file will be shifted by a vector defined by "shift_LU". The "_LU" suffix indicates that the vector is given in lattice units, i.e., the periodic lattice vectors. To this end, we also need a material file "lattice_units_materialfile" from which the lattice vectors are read.
Note that "$QNANO_DIR/resources/graphene.dat" contains information about the lattice:
lattice_type hex2D_vdW lattice_constant 0.142 0.142 0.335 ! nm
In turn, the lattice file "$QNANO_DIR/resources/hex2D_vdW.dat" lists the positions of the atoms in one unit cell (in lattice units) as
position 0.0 0.0 0.0 position 0.6666667 -0.3333333 0.
and the lattice vectors (x, y and z coordinates are to be multiplied with the respective lattice constants from the material file)
primitive_vector_1 1.5 0.8660254 0.0 primitive_vector_2 1.5 -0.8660254 0.0 primitive_vector_3 0.0 0.0 -1.
Thus, the shift by "0.6666667 -0.3333333 1" will shift the A atoms in a lower layer (note the -1 in primitive_vector_3) below the corresponding B atoms in the upper layer.
The remaining steps in the example script are the diagonalization (cf. previous example) and plotting of the results. In order to plot charge densities on the upper and lower layers independently, we use
$QNANO_DIR/bin/QNANO2ps -positions bilayer_armchair_hex8.dat \ -displayEV EV0_bilayer_armchair_hex8.dat \ -boxwidthz 0.2 -translatez 0.2 -outfile EV0_upper.ps $QNANO_DIR/bin/QNANO2ps -positions bilayer_armchair_hex8.dat \ -displayEV EV0_bilayer_armchair_hex8.dat \ -boxwidthz 0.2 -translatez -0.2 -outfile EV0_lower.ps
which uses the additional options "boxwidthz" and "translatez". If "boxwidthz" is defined (similar "boxwidthx" and "boxwidthy"), only those atoms are plotted that are located within a box around the center with a width defined by "boxwidthz" (in nm). "translatez" shifts the center of this box along the z-axis. Note that for graphene the interlayer distance is about 0.335 nm, so that the upper layer has z-coordinate 0.1675 nm while the lower layer has z-coordinate -0.1675 nm.