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

Fix bug when reading file in "pwmat/movement" format #599

Closed lhycms closed 8 months ago

lhycms commented 8 months ago

PWmat adds nonperiodic_Position block to MOVEMENT file, used to output the atomic positions without non periodic boundary conditions. Due to the fact that dpdata previously locates the number of atoms based on the keyword Position, when MOVEMENT contains nonperiodic_Position, it will cause the number of atoms to double, resulting in a bug.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (18a0ed5) 82.81% compared to head (70f5cd5) 83.19%. Report is 12 commits behind head on devel.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## devel #599 +/- ## ========================================== + Coverage 82.81% 83.19% +0.38% ========================================== Files 73 76 +3 Lines 6580 6789 +209 ========================================== + Hits 5449 5648 +199 - Misses 1131 1141 +10 ```

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