Skip to content

Commit

Permalink
Fix maxcycle stop in ANCOPT so that microiterations don't overshoot
Browse files Browse the repository at this point in the history
  • Loading branch information
pprcht committed Oct 10, 2024
1 parent 65e5140 commit 9908b42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/optimize/ancopt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ subroutine ancopt(mol,calc,etot,grd,pr,wr,iostatus)
esave = etot !> save energy before relaxation
!>--- call the actual relaxation routine
!> this routine will perform [maxmicro] relaxation steps
if(iter+maxmicro >= maxcycle) maxmicro = maxcycle - iter
!> [maxmicro] need to be adapted to not overshoot maxcycle
call relax(molopt,calc,OPT,iter,maxmicro,etot,grd, &
& ethr,gthr,converged, &
& pr,wr,ilog,iostatus,avconv)
Expand Down

0 comments on commit 9908b42

Please sign in to comment.