From: Axel Kohlmeyer (
Date: Tue Jul 20 2010 - 13:04:57 CDT


On Tue, Jul 20, 2010 at 1:17 PM, Thomas C. Bishop <> wrote:
> Does anyone have a tool handy that allows you to arbitrarily reorganize the
> animation display order of a DCD file.

no. you'd have to swap coordinates around if you want to use
the standard animation control dialog.

> For example  play a trajectory in the order of increasing RMSD instead of the
> actual time order.
> This can be accomplished with a list of frame numbers and an "animate goto"
> coupled with a trace variable in tcl.
> In general the list of frame numbers can come from anywhere.

this would not work, since the animate goto would trigger
the reorder event and you'd have a deadlock.

the best you can do is something like the following (untested):

set mol [molinfo top]
set nf [molinfo $mol get numframes]
set sel [atomselect $mol all]
set refsel [atomselect $mol all frame 0]
set rmsdlist {}

for {set i 0} {$i < $nf} {incr i} {
   $sel frame $i
   lappend rmsdlist [list $i [measure rmsd $sel $refsel]]

set gotolist [lsort -increasing -real -index 1 $rmsdlist]

for {set j 0} {$j < 10} {incr j} {
for {set i 0} {$i < $nf} {incr i} {
   animate goto [lindex $gotolist $i 0]
   display update
   display update ui
   after 100

if you want something more fancy with a GUI,
you could rip off the multimonanim plugin for it.


> The problem however is what should the trace variable be... I guess it can't
> be the frame number.
> Any tips or suggestions much appreciated.
> Thanks in advance,
> TOm
> *******************************
>   Thomas C. Bishop
>    Tel: 504-862-3370
>    Fax: 504-862-8392
> ********************************

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.