-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add MDTraj converter and update to atom mapping code #622
Conversation
…the MDAnalysis widget and configurators, fixed MDAnalysis topology file configurator
One problem that is worth looking at is the time step of the trajectory. I tried converting the hDAT_mdma trajectory from SlimMD database. The atom types, positions and unit cell dimensions were correct, but the time axis should be checked. With the MDTraj converter I get
and with MDAnalysis
|
Those are the timesteps from MDTraj, I guess the default must be 1ps. I think I'll add a widget to let the user change the timestep if they want to, similarly to the MDAnalysis job. |
I've updated the MDTraj converter to add a time step setting which should update similarly to the MDAnalysis one when files are inputted. This is ready to be reviewed again. |
Now my GUI has the input field for time step, but it does not seem to find the same value that MDAnalysis found. Also, I manually changed the value of the time step from 1.0 to 0.048, but when I loaded the resulting trajectory, it still had 1.0 step, independent of what I set. |
Thanks for that. It should be fixed now so it will pick up the timestep setting. I'm not sure why MDTraj doesn't pick up the same numbers as MDAnalysis but I'm now a bit confused about why MDAnalysis picked up the 0.048 ps timestep when according to https://www.ccpbiosim.ac.uk/slim-md/slimmd-database/protein-membrane/human-dopamine-transporter-embedded-in-a-membrane-bound-to-mdma-250ns it should be 2.5 ns. |
Apparently, DCD files are a bit of a nightmare mdtraj/mdtraj#1163. I think we might just have to accept that MDAnalysis and MDTraj might suggest different timesteps and leave it to the user to set a correct one. Also, the 0.048 seems to come from some timefactor see mdtraj/mdtraj#1163 (comment). |
According to our own DCD code, the DCD file stores time values in AKMA time units, which are also defined in MDAnalysis: https://userguide.mdanalysis.org/stable/units.html Getting back to the main topic: thanks for the changes! |
Another problem I have is that my atom mapping values are ignored by the converter. I tried converting a GROMACS trajectory of DNA from SlimMD. I changed some of the dummy atoms to Cr, and some of the phosphorus to Pb208 isotope, but the output trajectory still had the original composition. |
Thanks, nice one. I think it should be sorted now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we can set the time step and correct the atom types, I think that the converter works fine.
Description of work
Added MDTraj converter and optimized the atom mapping code.
Similarly to the MDAnalysis converter, the MDTraj converter converts trajectories with trajectory files and a topology file. Trajectory files can include one or more files but should only be of a single type e.g. xtc. In MDTraj topology files are optional if the trajectory files contain topology information.
To test
Enter PDB files into the topology file setting and trr or xtc files into the trajectory files setting and convert the trajectory. Atom mapping should be generated faster than before.
Enter PDB files into the topology file setting and dcd files into the trajectory files setting and convert the trajectory.
Either generate multiple coordinate files or copy and rename them. Convert the trajectory, if you copy and renamed it then the MDANSE trajectory should be twice as long and repeat itself.