Skip to content

Commit

Permalink
round coord before writing it with f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi-FanLi committed Jan 7, 2025
1 parent 36429f3 commit 513bfb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dpdata/plugins/n2p2.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def to_labeled_system(self, data, file_name: FileType, **kwargs):
natom = len(data["atom_types"])
atom_names = data["atom_names"]
for frame in range(nframe):
coord = data["coords"][frame] / length_convert
coord = np.round(data["coords"][frame] / length_convert, 6)
force = data["forces"][frame] / force_convert
energy = data["energies"][frame] / energy_convert
cell = data["cells"][frame] / length_convert
Expand Down

0 comments on commit 513bfb2

Please sign in to comment.