|
From: | Jean-Noël Grad |
Subject: | Re: Unwrapped coordinates in H5MD format |
Date: | Thu, 17 Mar 2022 22:11:52 +0100 |
User-agent: | Roundcube Webmail/1.3.17 |
Dear Xin Yuan,Thank you for bringing our attention to this matter. The user guide currently doesn't explain how to recover the unfolded coordinates; I will try to fix that next week when going over the backlog of issues in the user guide.
To answer your question, the unfolded coordinates can be recovered with the formula `pos_unfolded = particle_pos + particle_image * box_length`. The image count should be zero for aperiodic systems. It is a requirement from the H5MD standard, which mandates that data written under 'particles/atoms/position/value' must be folded coordinates, with 'particles/atoms/image/value' containing the image count (section 'position' and 'image' in https://www.nongnu.org/h5md/h5md.html#particles-group).
Please find attached a MWE that applies this formula to a single frame of a trajectory.
Best, JN On 3/17/22 18:47, Xin Yuan wrote:
Dear ESPResSo users,I noticed that the coordinates recorded in H5MD format are wrapped inside thesimulation box by default. Is there an option to record the unwrappedcoordinates in H5MD instead? I didn’t find any relevant information in thedocumentation. Thanks for any help! Regards, Xin Yuan
h5md.py
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |