From: Barry Isralewitz (
Date: Tue May 07 2002 - 22:15:21 CDT


On Tue, May 07, 2002 at 02:06:43PM -0400, Storr, Mark wrote:
> Hi,
> I was wondering if it is possible to animate an MD trajectory from NAMD and
> to also have displayed in a number of graph windows the total energy/vdws
> etc. profiles displayed from the output file for the simulation so that one
> could follow/pause the animation at 'energetically' interesting points.
> If anyone has done this I would be grateful for any help with this matter,
> or if not may I suggest it as a possible addition to future versions of VMD.
> Many Thanks
> Mark
> Mark T. Storr
> Postdoctoral Fellow
> Steacie Institute for Molecular Sciences
> National Research Council

   We have a few tools in the works for this.

  1.) Line graph: (value) vs. (trajectory frame) graph.

  2.) Surface graph: (value) vs. (resiude) vs. (trajectory frame).

  For both graph types a marker follows the current frame (i.e. moves
when trajectory is animating) and can be clicked on or "scrubbed" over
the graph, changing the displayed trajectory frame.

   I have attached a rough version of type 1), a line graph. It
needs some hand-tuning for each data set (see instructions). The file
includes a demo (that makes its own trivial trajectory). Copied below are
the comments/instructions that appear at the start of the file. Multiple graphs
can be set up with multiple tcl 'trace' commands. Let me know if this
is the sort of thing you had in mind...



# graph-drag.tcl
# Show a graph with value based on vmd frame number.
# Clicks and drags in graph window move trajectory.
# To demo:
# 1. vmd -e graph-drag.tcl
# 2. demo_graph_drag
# (makes a trajectory of a rotating molecule
# and a sample data set)
# 3. In "Animate" window, click 'Forward' button.
# 4. Click and drag on graph window to move in trajectory.
# To use:
# 1. replace "make_data" proc with one that puts useful data in y_cache
# 2. Adjust "mult" and y-scale labels to fit your data set.
# 3. Run with: make_data, start_graph
# Still needs: auto-scaling, reasonable interface, etc.
# Barry Isralewitz May 2002


Barry Isralewitz     Beckman 3121    Theoretical Biophysics Group, UIUC  
Office Phone: (217) 244-1612    Home Phone: (217) 337-6364