LAMMPS DumpReader returns incorrect coordinate transform #4788
Labels
Component-Readers
format-LAMMPS
more information needed
Please reply to requests for information or the issue will be closed.
Expected behavior
The coordinate transform of "scaled" LAMMPS trajectory should be imported correctly.
Actual behavior
The MDAnalysis calculated incorrectly coordinates from scaled to unscaled. Calculation method of “scaled” is xs = (x-xlo)/(xhi-xlo). So, when coordinate transform, the coordinate can be calculated by x = (xhi-xlo)*xs + xlo. However, the LAMMPS DumpReader returns incorrect coordinate transform. For example, the scaled coordinate in my dump is
The real coordinate of atom 2608 is [2.58086, 12.9388, 6.15641]. However, the coordinate calculated by DumpReader is [2.513854, 13.992818, 36.15641]. Calculation method of DumpReader seem to be x = (xhi-xlo)*xs - xlo. Other atoms are tested and the same error happened.
Code to reproduce the behavior
The text was updated successfully, but these errors were encountered: