From: Axel Kohlmeyer (
Date: Tue Aug 19 2008 - 13:06:44 CDT

On Tue, 19 Aug 2008, Emily Moore wrote:

EM> Hello,

hello emily,

EM> Iım trying to calculate the gofr for multiple frames of a trajectory. For
EM> each frame, I would like to have the gofr for atoms ³type 4² against ³type
EM> 4², with the atoms that are considered to have a type=4 updated every frame.

please note that VMD does the assignment of atom types only for the
first frame of a trajectory. that frame is always read, even if you
discard the coordinates from it. to have properties that change over time
stored on a per-atom, per-timestep basis, you have to write some scripting
to read in that data and store it in one of the user fields. see, e.g.,

EM> The code below does the first frame correctly, but does not seem to update
EM> the current frames type =4 atoms when calculating for the later frames. Iıve
EM> tried using ³$sel1 update² and ³$sel1 frame $i² and Iıve tried taking out
EM> ³mol delete top² and ³$sel1 delete² but it still updates incorrectly, or not
EM> at all (Iım not sure which is the problem, probably not updating at all).
EM> Also, if there is any way to do this without a tcl script, within the
EM> measuring gofr options window, that would be nice to know.

if you store the relevant information in the user field, yes.
i'm currently working on a project with similar problems and
can hopefully contribute a more specific example to the gofr
documentation soon.

please note, that we recently discovered and fixed(!) a few
(minor) bugs in the gofr code so that using an alpha test
build of VMD 1.8.7 is highly recommended. see


EM> Thanks,
EM> Emily

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.