mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-09 12:44:07 +01:00
Avoid NaN
This commit is contained in:
parent
69f857b690
commit
2d0c39edc9
@ -96,7 +96,7 @@ subroutine damping_SCF
|
|||||||
|
|
||||||
a = (E_new + E - 2.d0*E_half)*2.d0
|
a = (E_new + E - 2.d0*E_half)*2.d0
|
||||||
b = -E_new - 3.d0*E + 4.d0*E_half
|
b = -E_new - 3.d0*E + 4.d0*E_half
|
||||||
lambda = -lambda*b/a
|
lambda = -lambda*b/(a+1.d-16)
|
||||||
D_alpha = (1.d0-lambda) * D_alpha + lambda * D_new_alpha
|
D_alpha = (1.d0-lambda) * D_alpha + lambda * D_new_alpha
|
||||||
D_beta = (1.d0-lambda) * D_beta + lambda * D_new_beta
|
D_beta = (1.d0-lambda) * D_beta + lambda * D_new_beta
|
||||||
delta_E = HF_energy - E
|
delta_E = HF_energy - E
|
||||||
|
Loading…
Reference in New Issue
Block a user