-
Notifications
You must be signed in to change notification settings - Fork 908
Add (Structure|Molecule).calculate()
+ Molecule.relax()
, improve Structure.relax()
#3044
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
Conversation
I suggest:
|
Agreed. That'll clean things up and prevent duplication. And that's a much better name. That way it doesn't sound like the structure is running away... |
Structure.run
, Molecule.run
, and improvements to Structure.relax
Structure.run_calculation
, Molecule.run_calculation
, and improvements to Structure.relax
@shyuep, @janosh: This is ready for either of you to review. A couple of notes:
|
That was fast! Thanks @arosen93. Sorry for not bringing this up earlier but what do you think of
That might be a TensorFlow quirk. I hope/expect the new matGL M3GNet built using DGL doesn't have that. So maybe not worth it to dig too deeply for now. |
Structure.calculate()
; 2) Improve Structure.relax()
; 3) Add Molecule.relax()
; 4) Add Molecule.calculate()
Structure.calculate()
; 2) Improve Structure.relax()
; 3) Add Molecule.relax()
; 4) Add Molecule.calculate()
Structure.calculate()
; 2) Improve Structure.relax()
; 3) Add Molecule.relax()
; 4) Add Molecule.calculate()
Structure.calculate()
; Improve Structure.relax()
; Add Molecule.relax()
; Add Molecule.calculate()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arosen93 Sorry for the slow reply! This is looking great! I left 2 questions/comments. Also, I saw that _prep_calculator
and _relax
are marked as private but since they have user-facing features, i.e. raise error messages, I think it would be good to add a test for that behavior. Can try to do that later.
@janosh --- ready for either re-review or merging. Some of the Mac tests died but seems to be a problem for everyone. |
Structure.calculate()
; Improve Structure.relax()
; Add Molecule.relax()
; Add Molecule.calculate()
(Structure|Molecule).calculate()
+ Molecule.relax()
, improve Structure.relax()
Thanks @arosen93! Took a few iterations but this was no small PR and I think it turned out really well! 😎 Thanks for the excellent test coverage! 🧪 |
Closes #3042. Closes #3043. Closes #3047.
Links:
Structure.relax
#3042Structure.calculate()
feature analagous toStructure.relax
#3043Structure.relax
only works if m3gnet is installed even if it is not used #3047In addition to the prior issues, I also increased the range of optimizers that can be passed to
Structure.relax
so the user doesn't have to rely solely on FIRE.For molecules, I added a
Molecule.relax()
feature that defaults to GFN2-xTB and an analogousMolecule.calculate()
.