Skip to content

Commit

Permalink
added one parameter in namelist SYSTEM called center_atom_for_electri…
Browse files Browse the repository at this point in the history
…c_field to control the zero electric potential point
  • Loading branch information
quanshengwu committed Oct 26, 2023
1 parent a5bb81a commit 2e58306
Show file tree
Hide file tree
Showing 18 changed files with 17,376 additions and 9,107 deletions.
6 changes: 3 additions & 3 deletions examples/TBG-7.34degree/spectrum_unfold_kplane.gnu0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set terminal pngcairo enhanced color font ",30" size 1920,1680
set palette defined ( 0 "white", 1 "#D72F01" )
set palette defined ( 0 "white", 0.2 "black", 1 "#D72F01" )
set output 'spectrum_unfold_kplane.png'
set size 0.9, 1
set origin 0.05,0
Expand All @@ -20,6 +20,6 @@ set ylabel 'k_y'
set colorbox
set pm3d interpolate 2,2
set title 'A(k,E)'
splot 'spectrum_unfold_kplane.dat' u 4:5:(($9 )) w pm3d
splot 'spectrum_unfold_kplane.dat' u 4:5:(($11)) w pm3d
set title 'log(A(k,E))'
splot 'spectrum_unfold_kplane.dat' u 4:5:(log($9 )) w pm3d
splot 'spectrum_unfold_kplane.dat' u 4:5:(log($11+0.1)) w pm3d
1 change: 1 addition & 0 deletions src/dos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ subroutine dos_sparse
eigval(:)= W(1:neval)

!> get density of state
!> dos(e)= \sum_nk \delta(e-e_nk)
do ie= 1, NE
do ib= 1, neval
x= omega(ie)- eigval(ib)
Expand Down
3 changes: 2 additions & 1 deletion src/module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ module para
!> Electric field along the stacking direction of a 2D system in eV/Angstrom
real(dp) :: Electric_field_in_eVpA
real(dp) :: Symmetrical_Electric_field_in_eVpA
integer :: center_atom_for_electric_field ! At this atom, the electric potential is zero
logical :: Inner_symmetrical_Electric_Field

!> a parameter to control the Vacumm thickness for the slab system
Expand All @@ -621,7 +622,7 @@ module para
Add_Zeeman_Field, Effective_gfactor, Zeeman_energy_in_eV, &
Electric_field_in_eVpA, Symmetrical_Electric_field_in_eVpA, &
Inner_symmetrical_Electric_Field, ijmax, &
Vacuum_thickness_in_Angstrom
Vacuum_thickness_in_Angstrom, center_atom_for_electric_field

real(dp),parameter :: alpha= 1.20736d0*1D-6 !> e/2/h*a*a a=1d-10m, h is the planck constant then the flux equals alpha*B*s

Expand Down
9 changes: 7 additions & 2 deletions src/readHmnR.f90
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,13 @@ subroutine get_stacking_direction_and_pos(add_electric_field, pos)
!> shift all the positions together and centered at zero along the electric field
if (add_electric_field>0) then
pos=Origin_cell%Atom_position_direct(add_electric_field, :)
pos= mod(pos, 1d0)-0.5
center= (maxval(pos)+minval(pos))/2d0
pos= mod(pos, 1d0)-0.5d0
if (center_atom_for_electric_field>0) then
center= Origin_cell%Atom_position_direct(add_electric_field, center_atom_for_electric_field)
center= mod(center, 1d0)-0.5d0
else
center= (maxval(pos)+minval(pos))/2d0
endif
pos=pos-center
endif ! add electric field or not

Expand Down
2 changes: 2 additions & 0 deletions src/readinput.f90
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ subroutine readinput
Electric_field_in_eVpA= 0d0
Symmetrical_Electric_field_in_eVpA= 0d0
Inner_symmetrical_Electric_Field= .False.
!> by default we don't set the center atom
center_atom_for_electric_field = -1

!> by default, Vacuum_thickness_in_Angstrom= 20 Angstrom
Vacuum_thickness_in_Angstrom = 20d0
Expand Down
58 changes: 13 additions & 45 deletions utility/twisted_graphene_system_tight_binding/POSCAR
Original file line number Diff line number Diff line change
@@ -1,50 +1,18 @@
POSCAR for twisted bilayer graphene
1.0
2.130422 -6.150000 0.000000
4.260845 4.920000 0.000000
0.000000 0.000000 26.720000
0.000000 -2.460000 0.000000
2.130422 1.230000 0.000000
0.000000 0.000000 33.440000
C
42
10
Direct
0.142857 0.428571 0.374251
0.333333 0.666667 0.374251
0.571429 0.714286 0.374251
0.761905 0.952381 0.374251
-0.000000 -0.000000 0.374251
0.190476 0.238095 0.374251
0.428571 0.285714 0.374251
0.619048 0.523810 0.374251
0.857143 0.571429 0.374251
0.047619 0.809524 0.374251
0.285714 0.857143 0.374251
0.476190 0.095238 0.374251
0.714286 0.142857 0.374251
0.904762 0.380952 0.374251
0.428571 0.142857 0.500000
-0.000000 -0.000000 0.299043
0.333333 0.666667 0.299043
0.666667 0.333333 0.399522
-0.000000 -0.000000 0.399522
0.333333 0.666667 0.500000
0.666667 0.333333 0.500000
0.857143 0.285714 0.500000
0.095238 0.476190 0.500000
0.285714 0.428571 0.500000
0.523810 0.619048 0.500000
0.714286 0.571429 0.500000
0.952381 0.761905 0.500000
0.142857 0.714286 0.500000
0.380952 0.904762 0.500000
0.571429 0.857143 0.500000
0.809524 0.047619 0.500000
-0.000000 -0.000000 0.500000
0.238095 0.190476 0.500000
0.190476 0.952381 0.625749
0.428571 0.142857 0.625749
0.619048 0.095238 0.625749
0.857143 0.285714 0.625749
0.047619 0.238095 0.625749
0.285714 0.428571 0.625749
0.476190 0.380952 0.625749
0.714286 0.571429 0.625749
0.904762 0.523810 0.625749
0.142857 0.714286 0.625749
0.333333 0.666667 0.625749
0.571429 0.857143 0.625749
0.761905 0.809524 0.625749
-0.000000 -0.000000 0.625749
-0.000000 -0.000000 0.600478
0.333333 0.666667 0.600478
0.666667 0.333333 0.700957
-0.000000 -0.000000 0.700957
58 changes: 13 additions & 45 deletions utility/twisted_graphene_system_tight_binding/POSCAR-Folded
Original file line number Diff line number Diff line change
@@ -1,50 +1,18 @@
POSCAR for generated by WannierTools
1.0
2.130422 -6.150000 0.000000
4.260845 4.920000 0.000000
0.000000 0.000000 26.720000
0.000000 -2.460000 0.000000
2.130422 1.230000 0.000000
0.000000 0.000000 33.440000
C
42
10
Direct
0.142857 0.428571 0.374251 C
0.333333 0.666667 0.374251 C
0.571429 0.714286 0.374251 C
0.761905 0.952381 0.374251 C
0.000000 0.000000 0.374251 C
0.190476 0.238095 0.374251 C
0.428571 0.285714 0.374251 C
0.619048 0.523810 0.374251 C
0.857143 0.571429 0.374251 C
0.047619 0.809524 0.374251 C
0.285714 0.857143 0.374251 C
0.476190 0.095238 0.374251 C
0.714286 0.142857 0.374251 C
0.904762 0.380952 0.374251 C
0.428571 0.142857 0.500000 C
0.000000 0.000000 0.299043 C
0.333333 0.666667 0.299043 C
0.666667 0.333333 0.399522 C
0.000000 0.000000 0.399522 C
0.333333 0.666667 0.500000 C
0.666667 0.333333 0.500000 C
0.857143 0.285714 0.500000 C
0.095238 0.476190 0.500000 C
0.285714 0.428571 0.500000 C
0.523810 0.619048 0.500000 C
0.714286 0.571429 0.500000 C
0.952381 0.761905 0.500000 C
0.142857 0.714286 0.500000 C
0.380952 0.904762 0.500000 C
0.571429 0.857143 0.500000 C
0.809524 0.047619 0.500000 C
0.000000 0.000000 0.500000 C
0.238095 0.190476 0.500000 C
0.190476 0.952381 0.625749 C
0.428571 0.142857 0.625749 C
0.619048 0.095238 0.625749 C
0.857143 0.285714 0.625749 C
0.047619 0.238095 0.625749 C
0.285714 0.428571 0.625749 C
0.476190 0.380952 0.625749 C
0.714286 0.571429 0.625749 C
0.904762 0.523810 0.625749 C
0.142857 0.714286 0.625749 C
0.333333 0.666667 0.625749 C
0.571429 0.857143 0.625749 C
0.761905 0.809524 0.625749 C
0.000000 0.000000 0.625749 C
0.000000 0.000000 0.600478 C
0.333333 0.666667 0.600478 C
0.666667 0.333333 0.700957 C
0.000000 0.000000 0.700957 C
58 changes: 13 additions & 45 deletions utility/twisted_graphene_system_tight_binding/POSCAR-SURFACE
Original file line number Diff line number Diff line change
@@ -1,50 +1,18 @@
POSCAR for generated by WannierTools
1.0
2.130422 -6.150000 0.000000
4.260845 4.920000 0.000000
0.000000 0.000000 26.720000
0.000000 -2.460000 0.000000
2.130422 1.230000 0.000000
0.000000 0.000000 33.440000
C
42
10
Direct
0.142857 0.428571 0.698502 C
0.333333 0.666667 0.698502 C
0.571429 0.714286 0.698502 C
0.761905 0.952381 0.698502 C
0.000000 0.000000 0.698502 C
0.190476 0.238095 0.698502 C
0.428571 0.285714 0.698502 C
0.619048 0.523810 0.698502 C
0.857143 0.571429 0.698502 C
0.047619 0.809524 0.698502 C
0.285714 0.857143 0.698502 C
0.476190 0.095238 0.698502 C
0.714286 0.142857 0.698502 C
0.904762 0.380952 0.698502 C
0.428571 0.142857 0.824251 C
0.666667 0.333333 0.824251 C
0.857143 0.285714 0.824251 C
0.095238 0.476190 0.824251 C
0.285714 0.428571 0.824251 C
0.523810 0.619048 0.824251 C
0.714286 0.571429 0.824251 C
0.952381 0.761905 0.824251 C
0.142857 0.714286 0.824251 C
0.380952 0.904762 0.824251 C
0.571429 0.857143 0.824251 C
0.809524 0.047619 0.824251 C
0.000000 0.000000 0.824251 C
0.238095 0.190476 0.824251 C
0.190476 0.952381 0.950000 C
0.428571 0.142857 0.950000 C
0.619048 0.095238 0.950000 C
0.857143 0.285714 0.950000 C
0.047619 0.238095 0.950000 C
0.285714 0.428571 0.950000 C
0.476190 0.380952 0.950000 C
0.714286 0.571429 0.950000 C
0.904762 0.523810 0.950000 C
0.142857 0.714286 0.950000 C
0.333333 0.666667 0.950000 C
0.571429 0.857143 0.950000 C
0.761905 0.809524 0.950000 C
0.000000 0.000000 0.548086 C
0.333333 0.666667 0.548086 C
0.666667 0.333333 0.648565 C
0.000000 0.000000 0.648565 C
0.333333 0.666667 0.749043 C
0.666667 0.333333 0.749043 C
0.000000 0.000000 0.849521 C
0.333333 0.666667 0.849521 C
0.666667 0.333333 0.950000 C
0.000000 0.000000 0.950000 C
Loading

0 comments on commit 2e58306

Please sign in to comment.