From: Axel Kohlmeyer (
Date: Mon May 25 2009 - 11:42:59 CDT

On Thu, 2009-05-21 at 07:20 +0300, Thomas Evangelidis wrote:


one additional comment. i would like to caution you to use bigdcd
like constructs for anything that is not text-mode only. one of the
problems with the whole thing is that vmd_frame() is not only updated
upon reading and deleting frames, but also whenever the current frame
is changed. this is important to have actions executed that are supposed
to match the current frame.

however, for having a callback after reading a data frame
(and potentially before writing a frame) it would be worth
considering having two more automatically updated arrays
vmd_frame_read and vmd_frame_write that would solely be
executed upon reading and writing directly and not due to
the indirect update of the current frame due to reading
(or deleting) of frames.

at the moment we only have vmd_trajectory_read which is
only called upon completion of reading all frames of a file.

since quite a few people here use bigdcd as well, perhaps
there are some more comments. from looking at the sources,
the implementation should not be overly complicated. the
question is rather a matter of usefulness, maintainability,
and reducing clutter.

one of the useful applications that i can see would be to
use the vmd_frame_read callback to load optional (user)
data from additional files into frames in one go. and similarly
use the vmd_frame_write callback to store that kind of data.

any comments are welcome,

> I would appreciate if someone could help me resolve my problem with
> bigdcd. The conventional bibdcd script yields errors (moves to the
> next frame too early) when doing long calculations for each frame like
> in my script, therefore had to adapt it a bit. The problem occurs
> whenever I load a new molecule with "mol new". I have enclosed my
> adapted version at the end of this message, with a simple RunMethod to
> comprehend what I'm talking about. The last time I received advice was
> from John whose message I quote below:
> Tom,
> If you are loading frames within the SaveFrame method, you'll need
> to temporarily disable the frame loading trace/callback, to prevent it
> from going into an infinite loop of sorts.
> Cheers,
> John

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.