From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Aug 07 2007 - 00:06:53 CDT

Hi,
  Is there some specific reason you need to create a DCD file?
One of the problems you're going to have with attempting to write
out a time-varying set of atoms to a DCD is that you'll lose track
of which atom indices are which. Why not just emit your own file format
and use just the atoms you care about? The DCD format really isn't
suited to holding a time-varying set of atoms, even with a big hammer ;-)

The internal code in VMD does not calculate minimums nor maximums,
but merely tests candidate atoms to see if they meet the distance
selection criteria or not, for the currently active timestep.
Calculating min, max, quantiles, or the histogram of distance for
each atom over all timesteps would have to be done with your
own script presently. If there is sufficient interest in adding
a new "measure" subcommand for computing distances we could add one,
but I haven't had any requests for such a feature thus far.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Aug 07, 2007 at 12:52:34AM +0300, wrote:
>
> Hi,
> I am writing a plugin for VMD and I need some help. What I am trying to do is to
> create dcd files which contain only the atoms that are within a given cutoff
> distance from the protein. The problem is that each frame of a dcd must contain
> the same number of atoms, so if frame No.1 contains N atoms then I have to find
> which N atoms of frame No.2 are closer to the protein and write only them in
> the new dcd file. My question is if the "atomselect top "exwithin $cutoff of
> protein"" command calculates by default the minimum distance of each atom it
> selects from the protein and if there is a way to retrieve it from the source
> code. I tried to read the source code but I am not sure if it does what I need.
> I just figured out that the "within" macro functions by creating grid cells
> enclosing the protein atoms (others) as well as the atoms which souround them
> (flgs). I have also some other ideas but that would be the faster way to find
> the atoms I need.
> I would appreciate any help,
> Thomas Evangelidis

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078