From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Nov 17 2004 - 10:23:17 CST

Hi,
  There's a simple example procedure in the VMD User's Guide that
illustrates a simple way to draw arrows/vectors:

proc vmd_draw_arrow {mol start end} {
    # an arrow is made of a cylinder and a cone
    set middle [vecadd $start [vecscale 0.9 [vecsub $end $start]]]
    graphics $mol cylinder $start $middle radius 0.15
    graphics $mol cone $middle $end radius 0.25
}

The example in the User's Guide shows how to use this to add new
"draw" commands that are easy to use:
  http://www.ks.uiuc.edu/Research/vmd/current/ug/node112.html

  John

On Tue, Nov 16, 2004 at 02:53:35PM +0000, Anthony Ivetac wrote:
> Hi,
>
> I am interested in calculating the angle formed between the axes of 2
> domains in my protein, for different frames of a simulation trajectory.
>
> I have used the script 'fit_angle.tcl' - see here:
>
> http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/att-2279/fit_angle.tcl
>
> This script takes 2 atom selections and fits a vector to each - it then
> calculates the angle formed between the 2 vectors and outputs this. It
> can do it for a single structure, and also multiple frames.
>
> I am wondering how I can visualise the vectors it fits to the atoms in
> VMD, superimposed onto my protein? Something like the
> 'cylinder-and-cone' representation used to draw principal axes in this
> script:
>
> http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/orient/
>
> The orient.tcl script has a function to draw a vector, but I am not sure
> which variables in the fit_angle.tcl script hold the vectors I need to
> draw and how to do this.
>
> Many thanks,
>
> Tony

-- 
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