Comments (4)
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).
from pytraj.
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:
> trajin 2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz 1 1
[trajin 2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz 1 1]
Reading '2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz' as Charmm DCD
Warning: 2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz: Reported number of frames in DCD file is 0,
Warning: actual number of frames is 191. Only reading 191 frames.
Version >= 22; assuming shape matrix is stored.
(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:
Warning: Box is too skewed to perform accurate imaging.
Warning: Images and imaged distances may not be the absolute minimum.
If you force reading unit cell information with the ucell
keyword, things now work:
> trajin 2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz 1 1 ucell
[trajin 2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz 1 1 ucell]
Reading '2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz' as Charmm DCD
Warning: CHARMM version is >= 22 but 'ucell' specified.
Warning: Assuming box info is stored as unit cell and not shape matrix.
Warning: 2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz: Reported number of frames in DCD file is 0,
Warning: actual number of frames is 191. Only reading 191 frames.
Version < 22; assuming X-aligned cell.
The following input:
parm Cl-CCCl.prmtop.gz
trajin 2.1.heat_interface_frame_2032.pdb_0_ts_guess.dcd.gz 1 1 ucell
trajout temp.rst7
Results in "good" box info:
$ tail -n 1 temp.rst7
25.0720000 52.7510023 23.9170003 90.0000000 90.0000000 90.0000000
So you need to force cpptraj/pytraj to read unit cell info instead of symmetric shape info; @hainm is there a way to pass trajin
-type arguments to pytraj.io
?
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).
from pytraj.
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.
from pytraj.
@hainm is there a way to pass
trajin
-type arguments topytraj.io
?
hi @drroe: pytraj
has not supported yet. I've filed #1621 to keep track.
from pytraj.
Related Issues (20)
- TypeError: no default __reduce__ due to non-trivial __cinit__ pmap/watershell HOT 6
- Having a new error. I tried some solutions but didn't work. HOT 1
- pytraj.pca error HOT 1
- Mask selection on topology causes memory leak HOT 4
- write_traj problem when selecting a mask and specific frames HOT 1
- Build pytraj error when installing Amber22 HOT 3
- Amber22 installation: "source /home/xxxx/amber22/amber.sh" and "make test.serial" errors HOT 4
- Support trajin -type option for loading trajectory?
- Typo in Output of _explain() Function HOT 1
- Pytraj nastruct needs to be updated to handle [nxyz] data HOT 9
- wrong major groove calculation HOT 8
- calculated basepair matches in pytraj HOT 2
- Installation error of pytraj with pip HOT 4
- energy_decompostion throws "Fortran runtime error: Bad value during integer read" HOT 1
- Has anyone tried a Python 3.11 conda package build yet? HOT 11
- Spurious Test Failures with Cpptraj HOT 9
- ModuleNotFoundError: No module named 'pytraj.core.topology_objects' HOT 15
- Help: error building pytraj native library when make install 91% HOT 10
- Function to find the atoms of a given mask that appear in a region of xyz coordinate space? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytraj.