-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add possibility to use your own M3GNet potential #911
Conversation
allow the possibility to use your own M3GNet potential, instead of the pretrained model only.
Hi @utf , this PR is ready for review and merging. Thanks 😄 |
tests/forcefields/test_utils.py
Outdated
import matgl | ||
from matgl.ext.ase import PESCalculator | ||
|
||
m3gnet_calculator = ase_calculator( |
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.
I actually want to implement it as
m3gnet_calculator = ase_calculator(
calculator_meta="MLFF.M3GNet",
**{"path": "M3GNet-MP-2021.2.8-DIRECT-PES", "stress_weight": 2.0},
)
m3gnet_default = ase_calculator( # uses "M3GNet-MP-2021.2.8-PES" per default
calculator_meta="MLFF.M3GNet", **{"stress_weight": 2.0},
)
and the test passes, but ruff-format changes it....
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.
Just define the two dicts
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.
yup. Just noticed it after pushing 🤣 so I didn't want you to merge it like that
@QuantumChemist will merge once the tests pass |
* allow the possibility to use your own M3GNet potential allow the possibility to use your own M3GNet potential, instead of the pretrained model only. * added a unit test * added a unit test * test_dir not needed * change kwargs passing
allow the possibility to use your own M3GNet potential, instead of the pretrained model only.
I want to run the
M3GNetRelaxMaker
and theM3GNetStaticMaker
for the forcefieldPhononMaker
atomate2/src/atomate2/forcefields/jobs.py
Line 258 in 06e4a71
with my own trained potential (passed in the
calculator_kwargs
to the PhononMaker).Therefore I added the possibility to use your own potential, instead of the pretrained model only.