ENH: CP2K DCD format reader
Reader for CP2Ks DCD_ALIGNED_CELL format. Includes the iread
version (only takes a file descriptor because of the way I set it up), since especially MD trajectories tend to be huge.
It is a weird format and only few tools support it. I used pwtools so far.
All information about the dcd format is taken from pwtools. The way of reading it is also copied from there. Thanks goes to Steve (author of pwtools) for agreeing to this.
See our discussion for some details about the format and its problems.
Some information also comes directly from the CP2K source, so if they decide to change anything this here might break.
Parts are adapted from the extxyz reader, so I hope the structure is fine.
No tests, since there is no writer to produce a dcd file to read. *If someone knows an easy way to produce a test file please let me know.* Test is available, but one needs cp2k
in the $PATH to run it, since the cp2k_shell
seems to not run MDs at all.
Only thing I am hesitant about is putting the .dcd file extension into the automatic recognition, since someone might think they can use it for dcd files from other codes...
Cheers, Patrick