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

PyMatgenStructureFormat with from_system method #626

Merged
merged 15 commits into from
Apr 5, 2024
Merged

PyMatgenStructureFormat with from_system method #626

merged 15 commits into from
Apr 5, 2024

Conversation

MoseyQAQ
Copy link
Contributor

@MoseyQAQ MoseyQAQ commented Apr 2, 2024

Now the PyMatgenStructureFormat doesn't support the from_system method.
This PR adds this method, enabling users to convert the pymatgen.core.Structure to the dpdata format, which is convenient when you use pymatgen.transformations to build the atomic model.

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

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

Project coverage is 83.67%. Comparing base (3869146) to head (9928e1c).

Files Patch % Lines
dpdata/pymatgen/structure.py 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #626      +/-   ##
==========================================
+ Coverage   83.66%   83.67%   +0.01%     
==========================================
  Files          79       80       +1     
  Lines        6989     7006      +17     
==========================================
+ Hits         5847     5862      +15     
- Misses       1142     1144       +2     

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

Copy link
Member

@njzjz njzjz 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 add a test?

@MoseyQAQ MoseyQAQ requested a review from njzjz April 3, 2024 06:15
@wanghan-iapcm wanghan-iapcm merged commit 17fe0aa into deepmodeling:devel Apr 5, 2024
9 checks passed
@MoseyQAQ MoseyQAQ deleted the pymatgen_from_system branch April 5, 2024 14:56
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