-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathmodule.f90
162 lines (112 loc) · 3.74 KB
/
module.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
module para
! use mpi
implicit none
include 'mpif.h'
! output file name
character*40 :: filename
! disorder type
character*40 :: disorder_type
! some constant for mpi
integer,parameter :: mpi_dp=mpi_double_precision
integer,parameter :: mpi_dc=mpi_double_complex
integer,parameter :: mpi_cw=mpi_comm_world
integer,parameter :: mpi_in=mpi_integer
! double precision
integer,parameter :: Dp=kind(1.0d0)
! number of bands in a primitive cell, not include spin degenercy
integer,parameter :: Nband=1
integer, parameter :: ijmax=2
! Nx is the length of nanoribbon along[11-20] direction,
! we set x direction the growing direction, Nx is the width
! of the centre zone.
integer :: Nx
! Ny is the width of nanoribbon
integer :: Ny
! Np is principle layer thickness along x direction
integer :: Np
! Ndim is the dimension of H00, usually Ndim=30*Ny*Np
! 30 is the total orbitals in a unit cell
integer :: ndim
! number of R points, read from HmnR.data
integer :: Nrpts
! a parameter to control soc
! Soc=0 means no spin-orbit coupling
! Soc!=0 means no spin-orbit coupling
integer :: Soc
! cpu index
integer :: cpuid
! cpu number we used
integer :: num_cpu
! number of gpu
integer :: num_gpu
! the number of B
integer :: numB
! the number of disorder samples
integer :: Ndis
! the number of omega
integer :: omeganum
! random number seed
integer :: Seed
! Gpu device number
integer :: gpu_device
! disorder rate
real(Dp) :: Rate
! disorder strength , onsite energy maximum amplitude
real(Dp) :: disorder_strength
! a infinite small number
real(Dp) :: eta
! magnetic strength interval
real(Dp) :: minB
real(Dp) :: maxB
! omega interval
real(Dp) :: minomega
real(Dp) :: maxomega
! circumference ratio pi
real(dp),parameter :: Pi= 3.14159265359d0
! complex constant
complex(dp),parameter :: zi=(0.0d0, 1.0d0)
complex(dp),parameter :: zone=(1.0d0, 0.0d0)
complex(dp),parameter :: zzero=(0.0d0, 0.0d0)
! parameters for H(k)
! lattice constant
real(dp), parameter :: M = 0.40d0
real(dp), parameter :: phi= Pi/3d0
real(dp), parameter :: t1 = 0.20d0
real(dp), parameter :: t0 = 1.00d0
real(dp), parameter :: A = 1d0
real(dp), parameter :: AA= 1d0
real(dp), parameter :: B =-1d0
real(dp), parameter :: C = 0d0
real(dp), parameter :: D = 0d0
!real(dp), parameter :: M =-2d0
complex(dp), parameter :: vsp= -zi*A/2d0/AA
complex(dp), parameter :: vss= (B+D)/AA/AA
complex(dp), parameter :: vpp= (-B+D)/AA/AA
complex(dp), parameter :: Es= C+M-4d0*(B+D)/AA/AA
complex(dp), parameter :: Ep= C-M-4d0*(-B+D)/AA/AA
! R coordinates
integer, allocatable :: Irvec(:,:)
! Hamiltonian m,n are band indexes
complex(dp), allocatable :: HmnR(:,:,:)
! no of degeneracy of R point
integer, allocatable :: ndegen(:)
contains
subroutine now(time_now)
implicit none
integer :: time_new(8)
real(Dp) :: time_now
call Date_and_time(values=time_new)
time_now=time_new(3)*24*3600+time_new(5)*3600+&
time_new(6)*60+time_new(7)+time_new(8)/1000d0
return
end subroutine now
subroutine show_now
implicit none
integer :: time_new(8)
call Date_and_time(values=time_new)
write(*,"(a11,i4,a,i2,a,i2,a2,i2,a,i2,a,i2)")&
' Now is: ',time_new(1),'/',time_new(2),'/',time_new(3),' ',&
time_new(5),':',time_new(6),':',time_new(7)
return
end subroutine show_now
end module para