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

More comprehensive optimiser convergence checks #351

Merged
merged 38 commits into from
Aug 12, 2024

Conversation

shoubhikraj
Copy link
Collaborator

@shoubhikraj shoubhikraj commented Aug 2, 2024

Optimiser convergence checks now use ORCA/Gaussian style parameters (energy change, RMS and max gradient and step sizes).

Partial fix of #300


Checklist

  • The changes include an associated explanation of how/why
  • Test pass
  • Documentation has been updated
  • Changelog has been updated

@shoubhikraj shoubhikraj changed the base branch from master to v1.4.4 August 2, 2024 15:13
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 99.20635% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.44%. Comparing base (8be1e8a) to head (a7d5a24).

Files Patch % Lines
autode/opt/coordinates/dic.py 92.30% 1 Missing ⚠️
autode/opt/optimisers/base.py 99.17% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           v1.4.4     #351      +/-   ##
==========================================
- Coverage   97.46%   97.44%   -0.03%     
==========================================
  Files         204      204              
  Lines       23632    23758     +126     
==========================================
+ Hits        23034    23151     +117     
- Misses        598      607       +9     
Flag Coverage Δ
unittests 97.44% <99.20%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shoubhikraj shoubhikraj marked this pull request as ready for review August 5, 2024 14:50
@shoubhikraj shoubhikraj requested a review from t-young31 August 5, 2024 14:50
Copy link
Member

@t-young31 t-young31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome 🚀

autode/opt/optimisers/base.py Outdated Show resolved Hide resolved
autode/bracket/dhs.py Outdated Show resolved Hide resolved
autode/opt/optimisers/base.py Outdated Show resolved Hide resolved

def __post_init__(self):
"""Type checking and sanity checks on parameters"""
self._num_attrs = ["abs_d_e", "rms_g", "max_g", "rms_s", "max_s"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might make this a property, created based on the attribute type rather than hard-coded strs. I was confused about what this was when I encountered it below

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@t-young31 I made this a property, but still kept hard-coded strs because the attributes may be None at the time of evaluation. I am not really sure how to implement something based on the type without convoluted code.

autode/opt/optimisers/base.py Outdated Show resolved Hide resolved
autode/opt/optimisers/base.py Outdated Show resolved Hide resolved
autode/opt/optimisers/base.py Outdated Show resolved Hide resolved
autode/opt/optimisers/base.py Outdated Show resolved Hide resolved
autode/opt/optimisers/base.py Outdated Show resolved Hide resolved
@shoubhikraj
Copy link
Collaborator Author

@t-young31 Could you have one final check before merge please?

@shoubhikraj shoubhikraj requested a review from t-young31 August 11, 2024 11:09
Copy link
Member

@t-young31 t-young31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👊🏼

@shoubhikraj shoubhikraj merged commit d4ba0a4 into duartegroup:v1.4.4 Aug 12, 2024
13 of 14 checks passed
@shoubhikraj shoubhikraj deleted the optimiser-convergence branch August 14, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants