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)
- 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
- hbond pmap_mpi output format HOT 7
- Make binary wheel for pytraj? HOT 5
- pytraj.plot module not found HOT 2
- Reporting Issues with Pytraj using tutorials HOT 28
- pytraj segmentation fault with cython 3.0 and cpptraj commit f1d21f688de5ea5c55e650abe6efdbc352bdc613 HOT 1
- pmap parallel error HOT 6
- How do I import pytraj? HOT 4
- nh_order_parameters
- pytraj not compatible with OSX-arm64 arch
- Trying to pip install pytraj HOT 1
- Consider incorporating GraphVampNet into Pytraj
- Abnormal coordinate values after autoimage HOT 1
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.