Skip to content

Commit

Permalink
Modified convergence condition such that the energy change does not n…
Browse files Browse the repository at this point in the history
…ecessarily has to be negative (-> exactly zero should also be okay)
  • Loading branch information
marcelmbn committed Aug 15, 2023
1 parent 68003b1 commit 7468cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/optimizer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ subroutine relax(env,iter,mol,anc,restart,maxcycle,maxdispl,ethr,gthr, &
anc%coord = anc%coord + displ * alp

! conv ?
if(abs(echng).lt.ethr.and.gnorm.lt.gthr.and.echng.lt.0) then
if(abs(echng).lt.ethr.and.gnorm.lt.gthr.and.echng.lt.1.0e-10_wp) then
restart=.false.
converged = .true.
etot=energy
Expand Down

0 comments on commit 7468cc9

Please sign in to comment.