From: jani vinod (genomejani_at_gmail.com)
Date: Wed May 19 2010 - 01:41:34 CDT

Hello,
I created two atom selection it gives me error divde by zero.
I checked for the reason it call the procedure *lsq *which return zero value
*
*and hence* *divide by zero error

so can you help me in improving the above script or suggest any another way
calculation angle between two vectors

On Wed, May 19, 2010 at 10:10 AM, John Stone <johns_at_ks.uiuc.edu> wrote:

>
> Hi,
> Indeed, looking at the script, the intention is obviously that you're
> meant to supply two atom selections to the "sel_sel_angle" procedure,
> not two vectors. (you can tell, as the first thing it does is call
> "$sel get x" ...)
>
> So you need to create two atom selections and pass them in as parameters.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Wed, May 19, 2010 at 09:44:46AM +0530, jani vinod wrote:
> > Thank you sir for the reply
> > the following script was posted by Justin Gullingsrud
> >
> >
> http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/att-2279/fit_angle.tcl
> >
> > and I am using the same for the calculation.
> >
> > So can you guide how I will able to calculate angle between two
> vectors.
> >
> > On Wed, May 19, 2010 at 2:32 AM, John Stone <johns_at_ks.uiuc.edu>
> wrote:
> >
> > Hi,
> > Since you didn't include the full script it's hard to guess if
> > "sel1" and "sel2" are actually vectors or if they are VMD atom
> > selection objects. My guess is that they are atom selection objects
> > and not vectors based on the name of the procedure and the names of
> > the parameters.
> > Cheers,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> > On Tue, May 11, 2010 at 05:34:20PM +0530, jani vinod wrote:
> > > Hello sir,
> > > I want to calculate angle between two vectors.
> > > vec1 would be having two points start and end
> > > vec2 similarly would be having start and end
> > >
> > > so when I am using the following procedure
> > >
> > > proc sel_sel_angle { sel1 sel2 } {
> > >
> > > because if sel1 and sel2 are single points then lsq procedure
> is
> > returns
> > > zero value
> > >
> > > Actually the problem is how to passing the vectors to
> > sel_sel_angle.
> > >
> > > I would be very thankful if you can explain me by some example
> > >
> > > Thanking you
> > > vinod
> >
> > --
> > 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/ <http://www.ks.uiuc.edu/%7Ejohns/>
> Fax: 217-244-6078
>