Skip to content
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

[BUG] CenterOfMassesTrajectory changes elements and density #545

Open
MBartkowiakSTFC opened this issue Sep 13, 2024 · 0 comments · May be fixed by #616
Open

[BUG] CenterOfMassesTrajectory changes elements and density #545

MBartkowiakSTFC opened this issue Sep 13, 2024 · 0 comments · May be fixed by #616
Labels
bug Something isn't working framework Something concerning the framework

Comments

@MBartkowiakSTFC
Copy link
Collaborator

Description of the error
When running CenterOfMassesTrajectory analysis on a DFTB water trajectory (from MDANSE-Examples), the resulting trajectory contains only hydrogen atoms.

Describe the expected result
I would expect the following results:

  1. If grouping="atom", the output trajectory should be identical to the input,
  2. If grouping="molecule", the output trajectory should contain one object per molecule. I would expect it to be an artificial atom with the same mass at the mass of the original molecule.

Describe the actual result
Instead, I got the following:

  1. With grouping="atom", from 200 H and 100 O atoms on input I got 300 H atoms in the output.
  2. With grouping="molecule" I got 100 H atoms. The number of H atoms is the same as the number of water molecules.

density_COM
The figure compares the mass density of original water, molecule-grouped COM water and atom-grouped COM water.

Suggested fix
Trajectory should have its own built-in atom database containing only the elements present in the system. This will make trajectories fully transferable and enable replacing molecules will artificial atoms that will conserve the mass of the system.

Additional details
Even though it is possible to do statistics on molecule positions using the current implementation of COM trajectory, it will also become impossible to distinguish different molecules if they all get replaced with hydrogen.

@MBartkowiakSTFC MBartkowiakSTFC added bug Something isn't working enhancement New feature or request framework Something concerning the framework and removed enhancement New feature or request labels Sep 13, 2024
@MBartkowiakSTFC MBartkowiakSTFC linked a pull request Dec 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working framework Something concerning the framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant