[CP2K:6569] Re: reading dcd files

Steve Schmerler elco... at gmail.com
Fri Jun 5 07:41:20 UTC 2015

On Jun 02 22:23 +0200, Steve Schmerler wrote:
> Yes as I said, this is a pretty naive straight-forward implementation,
> which I used primarily to understand the dcd format. For a fast version
> (about 10x) on should use the Fortran variant. Optimizing this is kind
> of fun and probably rather trivial (hint: use line_profiler [1]), so if
> someone with a PhD in numpyology beats me to the punch, you're welcome!

Well, using only numpy.fromfile and file.seek really makes a difference,
so Ole was right! I have a pure numpy implementation now [1] which is
even faster then my f2py'ed Fortran version, named
pwtools.dcd.read_dcd_data(). Make sure to checkout the latest code


[1] http://elcorto.bitbucket.org/pwtools/generated/api/dcd.html

Steve Schmerler
Institut für Theoretische Physik
TU Freiberg, Germany

More information about the CP2K-user mailing list