deepmodeling / dpdata

A Python package for manipulating atomistic data of software in computational science
https://docs.deepmodeling.com/projects/dpdata/
GNU Lesser General Public License v3.0
195 stars 129 forks source link

add ASE's traj support #614

Closed thangckt closed 6 months ago

thangckt commented 6 months ago

add ASE's traj support

codecov[bot] commented 6 months ago

Codecov Report

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

Project coverage is 83.38%. Comparing base (46a8952) to head (b49a4e2).

Files Patch % Lines
dpdata/plugins/ase.py 97.14% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## devel #614 +/- ## ========================================== + Coverage 83.32% 83.38% +0.06% ========================================== Files 78 78 Lines 6841 6875 +34 ========================================== + Hits 5700 5733 +33 - Misses 1141 1142 +1 ```

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

thangckt commented 6 months ago

There is an error when test with python 3.7

AssertionError: Lists differ: ['Mo', 'S'] != ['S', 'Mo']

It may originate at these lines image The order of atom-names is correct with python 3.8 3.9 and on my machine with 3.11, but fail with python 3.7

This is the problem of the existed code, but not due to this PR Please check it

thangckt commented 6 months ago

It may originate at these lines

image

The order of atom-names is correct with python 3.8 3.9 and on my machine with 3.11, but fail with python 3.7

This is the problem of the existed code, but not due to this PR Please check it

may be solved with this

atom_names = list(dict.fromkeys(symbols))