Giter VIP home page Giter VIP logo

Comments (4)

tuckerburgin avatar tuckerburgin commented on July 30, 2024

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.

drroe avatar drroe commented on July 30, 2024

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.

tuckerburgin avatar tuckerburgin commented on July 30, 2024

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 avatar hainm commented on July 30, 2024

@hainm is there a way to pass trajin-type arguments to pytraj.io?

hi @drroe: pytraj has not supported yet. I've filed #1621 to keep track.

from pytraj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.