10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-02 11:25:26 +02:00

Variable level shift in HF

This commit is contained in:
Anthony Scemama 2018-11-20 11:04:54 +01:00
parent e108c133c1
commit 751ffb1a90
2 changed files with 8 additions and 4 deletions

View File

@ -24,9 +24,9 @@ default: 500
[level_shift]
type: Positive_float
doc: Energy shift on the virtual |MOs| to improve |SCF| convergence
doc: Initial value of the energy shift on the virtual |MOs|
interface: ezfio,provider,ocaml
default: 0.2
default: 0.0
[scf_algorithm]
type: character*(32)

View File

@ -108,10 +108,14 @@ END_DOC
TOUCH mo_coef level_shift
Delta_Energy_SCF = HF_energy - energy_SCF_previous
energy_SCF = HF_energy
if (level_shift-level_shift_save > 200.d0) exit
if (level_shift-level_shift_save > 50.d0) then
level_shift = level_shift_save
SOFT_TOUCH level_shift
exit
endif
dim_DIIS=0
enddo
level_shift = level_shift_save
level_shift = level_shift * 0.5d0
SOFT_TOUCH level_shift
energy_SCF_previous = energy_SCF