deepmodeling / dpdata

Manipulating multiple atomic simulation data formats, including DeePMD-kit, VASP, LAMMPS, ABACUS, etc.
https://docs.deepmodeling.com/projects/dpdata/
GNU Lesser General Public License v3.0
188 stars 128 forks source link

PyMatgenStructureFormat with from_system method #626

Closed MoseyQAQ closed 3 months ago

MoseyQAQ commented 3 months ago

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.

codecov[bot] commented 3 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.