Skip to content

Commit 7c39c62

Browse files
authored
Merge pull request #41 from marm314/master
Incl. use factor for scGW 1RDM
2 parents b177a3d + 3eefe46 commit 7c39c62

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/GWiw/scGWB_AO_itau_iw.f90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ subroutine scGWB_AO_itau_iw(nBas,nOrb,nOrb_twice,maxSCF,maxDIIS,dolinGW,restart_
619619
call fix_chem_pot_scGWB_bisec(iter_hfb,nBas,nBas_twice,nfreqs,nElectrons,thrs_N,thrs_Ngrad,chem_pot,S,H_ao_hfb,Sigma_c_w_ao, &
620620
wcoord,wweight,Mat_gorkov_tmp,G_ao_iw_hfb,DeltaG_ao_iw,R_ao,R_ao_hfb,trace_1_rdm,chem_pot_saved, &
621621
verbose_scGWB)
622+
if(abs(trace_1_rdm-nElectrons)**2d0>thrs_N .and. .not.chem_pot_scG) &
623+
R_ao=nElectrons*R_ao/trace_1_rdm
622624

623625
! Check convergence of R_ao for fixed Sigma_c(i w)
624626
diff_Rao=0d0

src/GWiw/scGW_AO_itau_iw.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,9 @@ subroutine scGW_AO_itau_iw(nBas,nOrb,nO,maxSCF,maxDIIS,dolinGW,restart_scGW,verb
489489
if(abs(trace_1_rdm-nElectrons)**2d0>thrs_N .and. chem_pot_scG) &
490490
call fix_chem_pot_scGX_bisec(iter_fock,nBas,nfreqs,nElectrons,thrs_N,thrs_Ngrad,chem_pot,S,F_ao,Sigma_c_w_ao,wcoord,wweight, &
491491
Mat_ao_tmp,G_ao_iw_hf,DeltaG_ao_iw,P_ao,P_ao_hf,trace_1_rdm,chem_pot_saved,verbose_scGW)
492+
if(abs(trace_1_rdm-nElectrons)**2d0>thrs_N .and. .not.chem_pot_scG) &
493+
P_ao=nElectrons*P_ao/trace_1_rdm
494+
492495
! Check convergence of P_ao for fixed Sigma_c(i w)
493496
diff_Pao=0d0
494497
do ibas=1,nBas

src/HF/RHF.f90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ subroutine RHF(dotest,doaordm,maxSCF,thresh,max_diis,guess_type,level_shift,writ
212212
! 0.d0, P(1,1), nBas)
213213

214214
! Dump results
215+
! write(*,*) 'P^ao iter ',nSCF
216+
! do iorb=1,nBas
217+
! write(*,'(*(f10.5))') 0.5d0*P(iorb,1:nOrb)
218+
! enddo
215219

216220
write(*,'(1X,A1,1X,I3,1X,A1,1X,F16.10,1X,A1,1X,F16.10,1X,A1,1X,F16.10,1X,A1,1X,E10.2,1X,A1,1X)') &
217221
'|',nSCF,'|',ERHF + ENuc,'|',EJ,'|',EK,'|',Conv,'|'

0 commit comments

Comments
 (0)