From: Eduard Schreiner (eduard.schreiner_at_theochem.ruhr-uni-bochum.de)
Date: Wed Mar 02 2005 - 05:18:30 CST

Stef wrote:
> Over a trajectory, i'd like to pick up snapshot containing certain
> particularities (for instance distance < cutoff, ...).
>
> I'd like to display the 'sub-trajectory' and also to be able to keep the
> trace of snapshot number (for instance i'd like to see from the whole
> trajectory all snapshots containing dist1 <4.0 angstroems AND dihedral
>
>>75° AND dist3 >6 angstroems).
>
>
> Could this be possible (i'm already doing so outside vmd in perl but
> i'll be nice to have it inside vmd).
>
> Thanks a lot in advance,
>
> Stéphane Teletchéa
Hey Staphane,
if i understood You correctly, You have a trajectory where only steps
should be displayed having some specific features whereas the others
should be removed. Additionally You want to know the the correct
(original) time step. Right?
You could try the following:
  One could go through the trajectory checking whether the current time
step contains atoms in the specified selection.This one could check by
If a given step matches one writes its number in one array (the name of
the array is, say, OK) if not in an other.
Something like:

label add Bonds .....
label add Dihedrals .......
set ts 0
set OK 0
foreach bond [label graph Bonds 0] dihed [label graph Dihedrals 0]{
     incr ts
     if {$bond < 4.0} {
             if {$dihed < 75.0} {
            lappend OK $ts
      }
}

Then one could use something like

foreach i $OK {
animate goto $i
graphics text {x y z} "$i" [size s]
}

in order to go to selected steps and to display the frame number.

I hope this will be useful for You.

Eduard Schreiner

-- 
--
=======================================================================
Eduard Schreiner                        e-mail: eduard.schreiner_at_rub.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-22121
Ruhr-Universitaet Bochum - NC 03/52         Fax:   ++49 (0)234/32-14045
D-44780 Bochum                               http://www.theochem.rub.de
=======================================================================