-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.out
220 lines (220 loc) · 9.53 KB
/
test.out
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
0a1
> !This is the main file for the NEGF program.
9,10c10,11
< real(8), allocatable, dimension(:) :: TwoIntsCompact,transm,current,energy_list,mo_ener,B0_coeff
< real(8), allocatable, dimension(:,:) :: Smat_le,Smat_re,Smat_cen,Smat,coupling_mat,mo_coeff,mo_coeff2
---
> real(8), allocatable, dimension(:) :: TwoIntsCompact,transm,current,energy_list,mo_ener,B0_coeff,readarray
> real(8), allocatable, dimension(:,:) :: Smat_le,Smat_re,Smat_cen,Smat,coupling_mat,mo_coeff,mo_coeff2,temp_gf,temp_gf2,gf_rt
15c16
< character(len=100) :: inputfile,outfile,option
---
> character(len=100) :: inputfile,outfile,mo_file,option,readstring
17,18c18,19
< logical :: dft_flag,pyscf,maple,use_b0,molcas
< integer :: i,j,k,counter,counter2,current_values,norb,numact,energy_val,volt_val,ioerror,numocc,numvirt
---
> logical :: dft_flag,pyscf,maple,use_b0,molcas,write_ruqt_data
> integer :: i,j,k,l,counter,counter2,current_values,norb,numact,energy_val,volt_val,ioerror,numocc,numvirt,scheck
25c26
< real(8) :: time_start,time_end
---
> real(8) :: time_start,time_end,readtemp
33c34
< Call ReadInput(inputfile,norb,numfcore,numfvirt,numocc,numvirt,size_l,size_r,size_c,energy_start,energy_end,delta_en,volt_start,volt_end,delta_volt,inputcode,KT,ElectrodeType,Fermi_enl,Fermi_enR,CalcType,localden_fermi_l,localden_fermi_r,doubles,numatomic,functional,num_threads,use_b0,b0_type)
---
> Call ReadInput(inputfile,norb,numfcore,numfvirt,numocc,numvirt,size_l,size_r,size_c,energy_start,energy_end,delta_en,volt_start,volt_end,delta_volt,inputcode,KT,ElectrodeType,Fermi_enl,Fermi_enR,CalcType,localden_fermi_l,localden_fermi_r,doubles,numatomic,functional,num_threads,use_b0,b0_type,write_ruqt_data)
102c103,104
< Call PartitionHS_MetalWBL(Smat,H_Two,size_l,size_r,size_c,size_lc,size_lcr,Smat_le,Smat_re,Smat_cen,H_Two_le,H_Two_re,H_Two_cen,H_Two_le_trans,H_Two_re_trans)
---
> Call PartitionHS_MetalWBL(Smat,H_Two,size_l,size_r,size_c,size_lc,size_lcr,Smat_le,Smat_re,Smat_cen,H_Two_le,H_Two_re,H_Two_cen,H_Two_le_trans,H_Two_re_trans,write_ruqt_data,inputfile)
> outfile = trim(inputfile) // ".ruqt_dat"
105c107
< Call Electrodes_MetalWBL(Sigma_l,Sigma_r,Smat_re,Smat_le,H_Two_le,H_Two_re,localden_fermi_l,localden_fermi_r,size_c,size_lc,size_lcr,size_l,size_r,H_Two_le_trans,H_Two_re_trans)
---
> Call Electrodes_MetalWBL(Sigma_l,Sigma_r,Smat_re,Smat_le,H_Two_le,H_Two_re,localden_fermi_l,localden_fermi_r,size_c,size_lc,size_lcr,size_l,size_r,H_Two_le_trans,H_Two_re_trans,write_ruqt_data,inputfile)
206c208
< gfc_r = energy*Smat_cen-H_Two_cen
---
> gfc_r = energy*Smat_cen-H_Two_cen
241a244,245
>
>
243a248,320
> else if (trim(ElectrodeType).eq."Bulk_energies".or.trim(ElectrodeType).eq."bulk_energies".or.trim(ElectrodeType).eq."bulkenergies".or.trim(ElectrodeType).eq."Bulk_Energies".or.trim(ElectrodeType).eq."Bulkenergies") then
>
> allocate(mo_coeff(1:numatomic,1:norb))
> allocate(mo_coeff2(1:norb,1:numatomic))
> allocate(gf_rt(1:norb,1:norb))
> allocate(readarray(1:numatomic))
> allocate(energy_list(1:energy_val))
> allocate(temp_gf(1:numatomic,1:norb))
> allocate(temp_gf2(1:norb,1:numatomic))
>
> write(*,*) "Reading in Orbital Coefficients"
> mo_coeff=0
> mo_coeff2=0
> ioerror=0
> scheck=0
> energy_val = abs(int((energy_start-energy_end)/delta_en))
> mo_file=trim(inputfile) // ".RasOrb"
> open(unit=7,file=mo_file,action='read',iostat=ioerror)
> do while (scheck.eq.0.and.ioerror.ge.0)
> read(7,'(A)',iostat=ioerror) readstring
> ! write(*,*) 'read line',readstring
> scheck=index(readstring,"ORBITAL")
> end do
> do i=1,norb
> ! write(*,*) 'reading array'
> read(7,*) readarray
> ! write(*,*) 'read array',i
> mo_coeff(i,1:numatomic)=readarray
> mo_coeff2(1:numatomic,i)=readarray
> read(7,*) readstring
> end do
>
> !write(*,*) "Printing natural orbital coefficients"
> !do i=1,norb
> ! do j=1,numatomic
> ! write(*,*) i,j,mo_coeff(i,j)
> ! end do
> !end do
>
>
> energy = energy_start
> counter=1
> do k=1,energy_val
> energy = (energy_start + (k-1)*delta_en)/27.2114
> energy_list(k) = energy
>
> if((hf_flag.eqv..true.).or.(dft_flag.eqv..true.)) then
> gf_rt = 0
> gf_rt = energy*Smat-H_Two
>
> temp_gf = gf_rt
> temp_gf2 = 0
> call matmul_dgemm2(temp_gf,mo_coeff2,temp_gf2)
> call matmul_dgemm2(mo_coeff,temp_gf2,gf_rt)
> gf_rt = inv_real(gf_rt)
>
> else if((cisd_flag.eqv..true.).or.(rdm_flag.eqv..true.)) then
> write(*,*) "Feature not supported for CISD and 2-RDM"
> stop
>
> end if
> end do
>
> write(*,*) "Printing Diagonal Elements of Green's Function to .dat file"
> do i=1,norb
> write(*,*) gf_rt(i,i)
> end do
>
> deallocate(gf_rt)
> deallocate(energy_list)
> deallocate(temp_gf)
> deallocate(temp_gf2)
>
473,474d549
<
<
721c796
< subroutine Electrodes_MetalWBL(Sigma_l,Sigma_r,Smat_re,Smat_le,H_Two_le,H_Two_re,localden_fermi_l,localden_fermi_r,size_c,size_lc,size_lcr,size_l,size_r,H_Two_le_trans,H_Two_re_trans)
---
> subroutine Electrodes_MetalWBL(Sigma_l,Sigma_r,Smat_re,Smat_le,H_Two_le,H_Two_re,localden_fermi_l,localden_fermi_r,size_c,size_lc,size_lcr,size_l,size_r,H_Two_le_trans,H_Two_re_trans,write_ruqt_data,inputfile)
724c799
< integer :: size_lc,size_c,size_lcr,i,j,size_l,size_r
---
> integer :: size_lc,size_c,size_lcr,size_l,size_r,i,j,ioerror
728c803,804
<
---
> logical :: write_ruqt_data
> character(len=100) :: inputfile,outfile
753,754c829,830
< call matmul_dgemm2(H_Two_re_trans,Sigma_R_temp,Sigma_R_temp2)
< call matmul_dgemm2(Sigma_R_temp2,H_Two_re,Sigma_R_temp3)
---
> call matmul_dgemm2(H_Two_re_trans,Sigma_R_temp,Sigma_R_temp2)
> call matmul_dgemm2(Sigma_R_temp2,H_Two_re,Sigma_R_temp3)
759a836,852
> if(write_ruqt_data) then
> outfile = trim(inputfile) // ".partdat"
> open(unit=8,file=outfile,access='append',action='write',iostat=ioerror)
>
> write(8,*) "RUQT Coupling Matrices"
> do j=1,size_c
> do i=1,size_c
> write(8,*) j,i,Sigma_R(j,i)
> end do
> end do
> do j=1,size_c
> do i=1,size_c
> write(8,*) j,i,Sigma_R(j,i)
> end do
> end do
> close(8)
> end if
764c857
< subroutine PartitionHS_MetalWBL(Smat,H_Two,size_l,size_r,size_c,size_lc,size_lcr,Smat_le,Smat_re,Smat_cen,H_Two_le,H_Two_re,H_Two_cen,H_Two_le_trans,H_Two_re_trans)
---
> subroutine PartitionHS_MetalWBL(Smat,H_Two,size_l,size_r,size_c,size_lc,size_lcr,Smat_le,Smat_re,Smat_cen,H_Two_le,H_Two_re,H_Two_cen,H_Two_le_trans,H_Two_re_trans,write_ruqt_data,inputfile)
769c862,864
< integer :: size_l,size_c,size_r,size_lc,size_lcr,info,lwork
---
> integer :: size_l,size_c,size_r,size_lc,size_lcr,info,lwork,i,j,ioerror
> logical :: write_ruqt_data
> character(len=100) inputfile,outfile
793a889,931
>
> if(write_ruqt_data) then
> outfile = trim(inputfile) // ".partdat"
> open(unit=8,file=outfile,action='write',iostat=ioerror)
>
>
> write(8,*) size_l,size_c,size_r
> write(8,*) "RUQT Overlap Matrices"
> do j=1,size_l
> do i=1,size_l
> write(8,*) j,i,Smat_le(j,i)
> end do
> end do
> do j=1,size_c
> do i=1,size_c
> write(8,*) j,i,Smat_cen(j,i)
> end do
> end do
> do j=1,size_r
> do i=1,size_r
> write(8,*) j,i, Smat_re(j,i)
> end do
> end do
>
> write(8,*) "RUQT Fock Matrices"
> do j=1,size_l
> do i=1,size_c
> write(8,*) j,i,H_Two_le(j,i)/27.2114
> end do
> end do
> do j=1,size_r
> do i=1,size_c
> write(8,*) j,i,H_Two_re(j,i)/27.2114
> end do
> end do
> do j=1,size_c
> do i=1,size_c
> write(8,*) j,i,H_Two_cen(j,i)/27.2114
> end do
> end do
>
> close(8)
> end if
963c1101
< subroutine ReadInput(inputfile,norb,numfcore,numfvirt,numocc,numvirt,size_l,size_r,size_c,energy_start,energy_end,delta_en,volt_start,volt_end,delta_volt,inputcode,KT,Electrode_Type,Fermi_enl,Fermi_enr,CalcType,localden_fermi_l,localden_fermi_r,doubles,numatomic,functional,num_threads,use_b0,b0_type)
---
> subroutine ReadInput(inputfile,norb,numfcore,numfvirt,numocc,numvirt,size_l,size_r,size_c,energy_start,energy_end,delta_en,volt_start,volt_end,delta_volt,inputcode,KT,Electrode_Type,Fermi_enl,Fermi_enr,CalcType,localden_fermi_l,localden_fermi_r,doubles,numatomic,functional,num_threads,use_b0,b0_type,write_ruqt_data)
969c1107
< logical :: libint,doubles,use_b0
---
> logical :: libint,doubles,use_b0,write_ruqt_data
1001a1140
> read(1,*) write_ruqt_data