-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[csg] H5MD reader: reads the wrong unit #807
Comments
In contrast:
works. |
I have debug a bit the example and the simulation script (so nice it is included in h5md file). I think the zeros are not because of not reading the first frame but because the .h5 uses angstroms and the settings.xml are in nm? If you change |
Good catch it seems we forgot to fix the reader after merging votca/csg-tutorials#34. The simulation is now done in Angstrom, but the reader still thinks numbers are in nm. Is there a field to store the units in the h5md format? |
There is a module called btw, readers in VOTCA treat data as they are in Angstrom by default ? |
VOTCA internal units are nm, hence the missing factor 10. As a workaround we could assume h5md is in Angstrom if no unit is given. @JoshuaSBrown what do you think? @jkrajniak is there are way to set the unit manually in the espresso script? |
If VOTCA expects that length is expressed in nm then I would assume that the numbers in
AFAIK not without modifying the |
I think if there is a units attribute in h5md it should be used, and if it is not specified either a warning should be thrown indicating that a default is being used or an error should be thrown. |
I would use the default units for csg as well. |
@jngrad @fweik @RudolfWeeber could you expose the unit property for the h5md reader to the user in espresso? |
@junghans espresso simulation data is typically dimensionless. I just tried to create a new field |
That is a question for @jkrajniak ;-) |
ping @jkrajniak can you have a look into the error @jngrad found in |
I've just added PR to espresso with the ability to store units alongside with the H5MD file (espressomd/espresso#3751) |
Writing of units was added to espresso in espressomd/espresso#3751, reading is added in votca/csg#549, now we just need to wait for the next espresso release and update our tutorial. |
Espresso-4.1.3 is out, but it doesn't include the h5md unit fix, waiting for the next release. In the tutorials there is only one line that needs to be added, something like: |
If I run:
with these inputs, the output (
CG-CG.dist.new
) is all zeros, even though the positions intraj.h5
looks ok.Longer trajectories works fine as well.
The text was updated successfully, but these errors were encountered: