Skip to content

Minimization sometimes does not terminate #23

@ncoish

Description

@ncoish

Frequently when running relax_hydrogen in my project, if I do not set iterations, the function seems to get stuck for particular angle_increment values. Ideally I want my program to run in the default way (i.e. run until a local minimum is found), so I currently am using a somewhat convoluted timeout function which attempts to interrupt the running function if it seems to be a stuck in an endless minimization loop, and then modifies the angle_increment until it finds one that works.

I could avoid using this timeout function if I could instead provide a maximum iterations and swap to a new angle_increment if the maximum iterations are reached. The issue right now is, if I provide iterations, I have no way to tell if the function terminates because it reached a local minimum successfully, or if it just hits the maximum number of iterations. It would be very helpful if the returned value from this function has some way to indicate the circumstances under which is terminated, either by always returning the number of iterations that were performed (which exposes the most information), or if that's not desired for some reason, just returning some kind of indicator of whether a local minimum was reached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions