Skip to content

add Minimizer plugin and System.minimize method#304

Merged
wanghan-iapcm merged 10 commits intodeepmodeling:develfrom
njzjz:minimize
Sep 29, 2022
Merged

add Minimizer plugin and System.minimize method#304
wanghan-iapcm merged 10 commits intodeepmodeling:develfrom
njzjz:minimize

Conversation

@njzjz
Copy link
Member

@njzjz njzjz commented Jun 13, 2022

This PR adds the minimize method to System and also the Minimizer plugins. Also add two minimizers: ASE and AMBER SQM.

@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2022

Codecov Report

Base: 82.07% // Head: 82.21% // Increases project coverage by +0.13% 🎉

Coverage data is based on head (ebd8b3d) compared to base (c9deb10).
Patch coverage: 88.70% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #304      +/-   ##
==========================================
+ Coverage   82.07%   82.21%   +0.13%     
==========================================
  Files          67       67              
  Lines        5834     5891      +57     
==========================================
+ Hits         4788     4843      +55     
- Misses       1046     1048       +2     
Impacted Files Coverage Δ
dpdata/plugins/amber.py 63.63% <62.50%> (-0.78%) ⬇️
dpdata/driver.py 86.20% <85.71%> (-0.16%) ⬇️
dpdata/plugins/ase.py 78.57% <92.00%> (+4.24%) ⬆️
dpdata/system.py 85.73% <100.00%> (+1.02%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

dpdata/driver.py Outdated
Comment on lines +107 to +112
for atoms in structures:
atoms.calc = self.ase_calculator
dyn = LBFGS(atoms, logfile=None)
dyn.run(fmax=5e-3)
ls = dpdata.LabeledSystem(atoms, fmt="ase/structure", type_map=data['atom_names'])
labeled_system.append(ls)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does one have any chance of specifying the optimizer and the parameters for optimization?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, let me consider how to design the API

Copy link
Member Author

Choose a reason for hiding this comment

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

The API is refactored.

@njzjz njzjz marked this pull request as draft June 14, 2022 06:39
@njzjz njzjz changed the title add minimize method to driver add Minimizer plugin and System.minimize method Sep 27, 2022
@njzjz njzjz marked this pull request as ready for review September 27, 2022 21:17
@njzjz njzjz requested a review from wanghan-iapcm September 27, 2022 21:18
Copy link
Contributor

@wanghan-iapcm wanghan-iapcm left a comment

Choose a reason for hiding this comment

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

Could you please provide doc on how to use the minimizer?
especially when one wants to change the default fmax of "ase".

@wanghan-iapcm wanghan-iapcm merged commit bb75d0f into deepmodeling:devel Sep 29, 2022
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.

3 participants