Closed ExpHP closed 7 years ago
wait a second, this is actually easy. (do while
--> for (int iter=0; ...)
)
yuck, not so simple if we also want to allow zero iterations in the case of input structures that meet the grad_max
or grad_norm
condition. (which we should!)
now possible with the acgsd rewrite #19
(well, actually, you can't currently specify 0 iterations as the limit; but the point is, it's capable of exiting before doing an iteration if e.g. force is small enough)
doing zero iterations with #12:
as evidenced by the presence of a "dv" value, even zero iterations does at least one full iteration and I believe it can potentially change the position.
I don't actually see any way to fix this that isn't horribly disgusting, because the control flow logic in the function is already so complicated. If I had two days worth of time to throw at it, I'd probably try to refactor out all the control flow logic into some sort of state machine first