-
Notifications
You must be signed in to change notification settings - Fork 38
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
Incorrect box dimensions when writing .rst7 from .dcd #1620
Comments
Maybe this is related to #1604? For practical reasons I am still using a standalone pytraj release, I'm having trouble linking the ambertools version into my workflow (for reasons that are more to do with me and with that workflow than with pytraj, I think). |
Hi. The problem here is the DCD trajectory (which based on the info in the DCD itself appears to have been written by CP2K) you have does not properly conform to the Charmm DCD standard. DCD trajectories from Charmm version 22 and up are supposed to store symmetric shape matrix information, not unit cell parameters. You can see that cpptraj (the engine underlying pytraj) expects this:
(Also note that CP2K is also not properly setting the number of frames in the DCD header). CP2K is setting the DCD version bit in the header to 24, so it should be converting the unit cell parameters to a symmetric shape matrix, but it actually seems to be storing unit cell parameters instead. Since cpptraj expects symmetric shape matrix info in the DCD based on the version, the box ends up skewed and you get this warning:
If you force reading unit cell information with the
The following input:
Results in "good" box info:
So you need to force cpptraj/pytraj to read unit cell info instead of symmetric shape info; @hainm is there a way to pass Also, you should contact the CP2K devs and have them fix their usage of the DCD format. Probably the easiest thing would be for them to change the version bit in the DCD header to something less than 22 (in cpptraj I just use 21). |
I see! Thanks so much for the comprehensive answer. I have alerted a CP2K dev to this issue, hopefully it can be fixed on their end. |
I'm getting some weird behavior from pytraj when attempting to write out a frame from a .dcd trajectory produced by CP2K to an .rst7 file. This is best demonstrated by the following comparison to the behavior from mdtraj, which is correct:
I'm not sure what's going on here, but the box info produced by mdtraj is the same as the box dimensions from the simulation that produced the trajectory. Here are the relevant files:
pytraj_report.tar.gz
Thanks!
The text was updated successfully, but these errors were encountered: