# [phenixbb] measuring the angle between two DNA duplexes

Pavel Afonine pafonine at lbl.gov
Tue Jan 21 08:13:49 PST 2014

```Hi Tim,

thanks for the reference! There is a number of instances where this
approach is useful. In Phenix this is also used to determine density map
peak sphericity (see cctbx/maptbx/sphericity.h) and to get initial
values for refinement of anisotropic ADPs from map peaks.

Sure I will play with this and visit as many corner cases as I could
think of!

All the best,
Pavel

On 1/21/14, 1:25 AM, Tim Gruene wrote:
> Hi Pavel,
>
> that's the method described in
> http://journals.iucr.org/a/issues/2011/01/00/sc5036/index.html ;-) based
> on the moments of inertia (a computer scientist might name it
> differently). I am not sure, though, you would get the desired result
> for short helices. E.g. a helix defined by three atoms the eigenvalue
> would point roughly in the direction of the external phosphates, which
> is far from parallel with the helix axis.
>
> Best,
> Tim
>
> On 01/21/2014 04:20 AM, Pavel Afonine wrote:
>> Hi Ed,
>>
>> interesting idea! Although I was thinking to have a tool that is a
>> little more general and a little less context dependent. Say you have
>> two clouds of points that are (thinking in terms of macromolecules) two
>> alpha helices (for instance), and you want to know the angle between the
>> axes of the two helices. How would I approach this?..
>>
>> First, for each helix I would compute a symmetric 3x3 matrix like this:
>>
>> sum(xn-xc)**2             sum(xn-xc)*(yn-xc) sum(xn-xc)*(zn-zc)
>> sum(xn-xc)*(yn-xc)     sum(yn-yc)**2 sum(yn-yc)*(yz-zc)
>> sum(xn-xc)*(zn-zc)     sum(yn-yc)*(yz-zc)        sum(zn-zc)**2
>>
>> where (xn,yn,zn) is the coordinate of nth atom, the sum is taken over
>> all atoms, and (xc,yc,zc) is the coordinate of the center of mass.
>>
>> Second, for each of the two matrices I would find its eigen-values and
>> eigen-vectors, and select eigen-vectors corresponding to largest
>> eigenvalues.
>>
>> Finally, the desired angle is the angle between the two eigen-vectors
>> found above, which is computed trivially.
>> I think this a little simpler than finding the best fit for a 3D line.
>>
>> What you think?
>>
>> Pavel
>>
>>
>> On 1/20/14, 2:14 PM, Edward A. Berry wrote:
>>>
>>> Pavel Afonine wrote:
>>> . .
>>>
>>>> The underlying procedure would do the following:
>>>>     - extract two sets of coordinates of atoms corresponding to two
>>>> provided atom selections;
>>>>     - draw two optimal lines (LS fit) passing through the above sets
>>>> of coordinates;
>>>>     - compute and report angle between those two lines?
>>>>
>>> This could be innacurate for very short helices (admittedly not the
>>> case one usually would be looking for angles), or determining the axis
>>> of  a short portion of a curved helix. A more accurate way to
>>> determine the axis- have a long canonical duplex constructed with its
>>> axis along Z (0,0,1). Superimpose as many residues of that as required
>>> on the duplex being tested, using only backbone atoms or even only
>>> phosphates. Operate on (0,0,1) with the resulting operator (i.e. take
>>> the third column of the rotation matrix) and use that as a vector
>>> parallel to the axis of the duplex being tested.
>>> _______________________________________________
>>> phenixbb mailing list
>>> phenixbb at phenix-online.org
>>> http://phenix-online.org/mailman/listinfo/phenixbb
>> _______________________________________________
>> phenixbb mailing list
>> phenixbb at phenix-online.org
>> http://phenix-online.org/mailman/listinfo/phenixbb
>>
>
>
> _______________________________________________
> phenixbb mailing list
> phenixbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/phenixbb

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/phenixbb/attachments/20140121/f13826ac/attachment-0001.htm>
```