From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Nov 06 2003 - 16:10:35 CST

Hi Markus,
  I don't think I'm going to have time to do anything other
than point you in the direction of documentation on this one,
I'm too swamped trying to get VMD 1.8.2 done. The way to do
the types of math you need in Tcl (the default VMD command prompt)
is to use the "expr" functionality in Tcl:
  http://www.tcl.tk/man/tcl8.4/TclCmd/expr.htm

Take a look at their page there and try out the examples they have
inside of VMD to get the idea. From there, you just need to work out
the geometry and make sure you're measuring what you think you are.

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu
   

On Sun, Oct 26, 2003 at 11:45:58PM +0100, Markus Laub wrote:
> Dear John,
>
> thank you for your response. I have included a picture of the angles
> I'm talking about. There are two subunits represented as blue and
> red tubes. The angles between these subunits are termed alpha,
> beta and gamma. Though my mathematical knowlege is rather
> low compared to that of the average member of this mailing list
> I think the acos would give me the result. As far as I unterstand
> I have to do the following:
> 1. Move the centers of inertia of the two subunits to a commom origin
> i.e. I have to superimpose them.
> 2. Get the the dot product of each of the axis vectors.
> 3. Calculate acos() from the dot product.
>
> As I mentioned before I'm not familiar with programing so I have
> to put three words in front of 1-3: how can I.
> For an experienced Tcl programmer the answer may be found
> in the VMD user's guide but for me the question still arises
> how can all of this be done in VMD?
>
> Any help is appreciated!
>
>
> Greetings,
>
> MArkus
>
> On Fri, 24 Oct 2003 19:11:25 -0500, John Stone wrote:
>
> >
> >Markus,
> > While I don't have an example script for you, depending on what angles
> >you're looking for, couldn't you just take the acos() of the dot product
> >of each of the axis vectors (assuming they are unit vectors) to get
> >the angles? Or am I misunderstanding?
> >
> >I suspect a picture of the angles that you're trying to calculate would
> >be helpful in this instance, thus the lack of response by others so far...
> >If you're just trying to calculate the angles, then try doing what I mention
> >above and see if it works for you. If that's not what you're looking for,
> >then I think you'll have to give a more detailed description of what you're
> >trying to calculate.
> >
> >Thanks,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> >
> >On Wed, Oct 22, 2003 at 02:37:44PM +0200, Markus Laub wrote:
> >> I would like to calculate angles between two subunits of a protein. The
> >> idea is to calculate the principal axes of inertia for each molecule
> >> and then calculate the angles between the x, y and z-axes.
> >>
> >> Because I'm not familar with programmimg I was looking for some scripts
> >> in the VMD Script Library and found one from Paul Grayson called
> >> "orient" which calculates and draws the principle axes of inertia for
> >> molecules. That works well but was is missing is the calculation of the
> >> angles. Is there anybody out there who can help me with this problem?
> >> Or to be more fortright who can put together a script which makes the
> >> necessary calculations.
> >>
> >>
> >> Greetings,
> >>
> >>
> >> MArkus
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >--
> >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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

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