Re: NAMD trajectory format

From: Axel Kohlmeyer (
Date: Fri May 30 2008 - 07:34:52 CDT

On Thu, 29 May 2008, Konrad Hinsen wrote:

KH> On May 28, 2008, at 16:05, Axel Kohlmeyer wrote:
KH> >it is not that difficult and you could use the fortran wrapper code
KH> >that i contributed as a starting point. OTOH, you can also just link
KH> >the individual subroutines as a static library. see:
KH> >
KH> >
KH> >
KH> >and particularly:
KH> >
KH> >
KH> Thanks, I will look at that for use in the future. For my current needs, I
KH> am quite happy with my DCD parser written in Python, which seems to work
KH> fine, at least for the one trajectory that I have for testing.

dcd trajectories are nasty to parse in general because they are fortran
unformatted. depending on whether the file was written on a machine
with the same or different endianness and a (64-bit) compiler that
uses either 32-bit (most) or 64-bit (some versions of gfortran and
g95, depending on flags) record markers and 64bit default integers
you get a different file. john has put a lot of effort into making
the dcd reader in molfile particularly flexible and efficient.

there is a lot of convenience in writing your own stuff, but it also
adds inconsistencies (just look at how many broken/non-compliant .pdb
format writers and readers there are). with computational tools becoming
increasingly ubiquitous in our research it is high time to consolidate
on a few tools/libraries and use and improve those instead of
re-inventing the same old wheels over and over again.

that is why, for instance, i wrote those fortran wrappers to
molfile. instead of adding just one more file formats to the
(fortran based) analysis code of a colleague, i added _all_ the
formats that molfile supports and any future file format work
from me can focus on improving the molfile library. this in turn
will also help every other project that uses it at the same time.


KH> Thanks again for your help,
KH> Konrad.
KH> PS: If anyone wants a copy of my DCD parser in Python, just ask!
KH> --
KH> ---------------------------------------------------------------------
KH> Konrad Hinsen
KH> Centre de Biophysique Moléculaire, CNRS Orléans
KH> Synchrotron Soleil - Division Expériences
KH> Saint Aubin - BP 48
KH> 91192 Gif sur Yvette Cedex, France
KH> Tel. +33-1 69 35 97 15
KH> E-Mail:
KH> Web:
KH> ---------------------------------------------------------------------

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 05:21:04 CST