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

Add m3gnet support to Atomate2 #380

Merged
merged 9 commits into from
Jun 16, 2023

Conversation

matthewkuner
Copy link
Collaborator

@matthewkuner matthewkuner commented Jun 8, 2023

Summary

Additional dependencies introduced

  • matgl

Notes

  • I do not plan to add support for MEGNet (as it seems to be inferior to M3GNet according to matbench discovery). Let me know if MEGNet has considerable demand too.

@matthewkuner
Copy link
Collaborator Author

I made a new from_m3gnet_result method in the ForceFieldTaskDoc. Currently, this is practically identical to the from_chgnet_result method; however, it does make it easier to adjust the methods in the future if they diverge.

@Andrew-S-Rosen
Copy link
Member

That was fast!!!

@matthewkuner
Copy link
Collaborator Author

matthewkuner commented Jun 8, 2023

That was fast!!!

Kinda yes and kinda no. Most of this was honestly just copying and pasting from the CHGNet support. Not quite done yet either--seems like Matgl is in a state of flux right now, so I may let this sit for a bit

@matthewkuner matthewkuner added the enhancement Improvements to existing features label Jun 8, 2023
@utf
Copy link
Member

utf commented Jun 15, 2023

Thanks @matthewkuner.

It looks like the logic for turning the m3gnet output into the task document is almost exactly the same? Can you put the common parts into an external function?

@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #380 (5fd2a91) into main (2f54128) will increase coverage by 0.06%.
The diff coverage is 90.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #380      +/-   ##
==========================================
+ Coverage   64.74%   64.81%   +0.06%     
==========================================
  Files          74       74              
  Lines        7157     7196      +39     
  Branches      938      946       +8     
==========================================
+ Hits         4634     4664      +30     
- Misses       2224     2233       +9     
  Partials      299      299              
Impacted Files Coverage Δ
src/atomate2/vasp/jobs/elastic.py 78.31% <ø> (ø)
src/atomate2/forcefields/schemas.py 94.28% <83.33%> (-2.54%) ⬇️
src/atomate2/forcefields/jobs.py 89.83% <92.59%> (+1.95%) ⬆️
src/atomate2/common/schemas/elastic.py 88.65% <100.00%> (+0.11%) ⬆️
src/atomate2/vasp/flows/elastic.py 82.50% <100.00%> (+0.44%) ⬆️

... and 2 files with indirect coverage changes

@matthewkuner matthewkuner changed the title [WIP] Add m3gnet support to Atomate2 Add m3gnet support to Atomate2 Jun 15, 2023
@matthewkuner
Copy link
Collaborator Author

matthewkuner commented Jun 15, 2023

@utf this should be ready for review / merging. Let me know if the modified ForceFieldTaskDocument is satisfactory

@matthewkuner matthewkuner requested a review from utf June 15, 2023 22:55
@utf
Copy link
Member

utf commented Jun 16, 2023

This looks perfect. Thank you.

@utf utf merged commit 02e44c0 into materialsproject:main Jun 16, 2023
7 checks passed
@JaGeo
Copy link
Member

JaGeo commented Aug 9, 2023

Closes #379

@utf utf added feature A new feature being added and removed enhancement Improvements to existing features labels Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature being added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants