4
1
mirror of https://github.com/pfloos/quack synced 2025-03-09 18:22:25 +01:00

Fixed silly bug search chem_pot done N2

This commit is contained in:
Mauricio Rodriguez-Mayorga 2025-02-06 16:32:08 +01:00
parent de42425683
commit 1f8757afb6
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ subroutine fermi_dirac_occ(nO,nOrb,thrs_N,temperature,chem_pot,Occ,eHF)
'|',trace_1rdm,'|',chem_pot,'|'
if( abs(trace_1rdm-nO) > abs(trace_old-nO) .and. .not.backward ) then
backward=.true.
chem_pot = chem_pot - 2d0*delta_chem_pot
chem_pot = chem_pot - delta_chem_pot
delta_chem_pot=-delta_chem_pot
endif
enddo

View File

@ -73,7 +73,7 @@ subroutine fix_chem_pot(nO,nOrb,nOrb2,nSCF,thrs_N,trace_1rdm,chem_pot,H_hfb,cp,R
'|',trace_1rdm,'|',chem_pot,'|',grad_electrons,'|'
if( abs(trace_1rdm-nO) > abs(trace_old-nO) .and. .not.backward ) then
backward=.true.
chem_pot = chem_pot - 2d0*delta_chem_pot
chem_pot = chem_pot - delta_chem_pot
delta_chem_pot=-delta_chem_pot
endif
enddo