Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Return n_iterations from relax_hydrogen #23

Open
ncoish opened this issue Nov 18, 2024 · 1 comment
Open

Feature Request: Return n_iterations from relax_hydrogen #23

ncoish opened this issue Nov 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ncoish
Copy link

ncoish commented Nov 18, 2024

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.

@padix-key
Copy link
Member

padix-key commented Nov 22, 2024

I think you have a good point here. It wouldn't hurt to return the number of iterations.

What worries me a bit is the minimization loop you mentioned. If you have a small reproducible example, could you create an issue for that?

@padix-key padix-key added the enhancement New feature or request label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants