开发者

Chain of connected points and rotation matrices

Thanks for looking at this. I apologize for this rather lengthy build-up but I thought it is needed to clarify things.

I have a chain of connected atoms, say a polymer which has rigid bonds and bond angles. With rigid bonds we get the condition that the distance between two immediate neighbours [eg. 2-3,3-4,etc.] is always fixed and the bond angles [defined using 3 atoms, eg. 1-2-3] are always maintained. We do have freedom to rotate around the torsion angles. The atoms are defined with respect to each previous atom by this length, angle and the torsion angle and that basically allows us to find the Cartesian coordinates by setting up a coordinate system. Now, if we want to align a pair of atoms which are not directly connected to the base atoms with respect to which the new orientations are supplied can we find a rotation matrix that can do the job?

For example, imagine that we have 10 atoms and we want to define a new set of internal coordinates between atoms 1,2 and 9,10. The locations in space of atoms 9 and 10 have been found using the internal coordinates specified by atoms 6, 7 and 8. [Distance 8-9, angle 7-8-9 and the torsion angle 6-7-8-9 and similarly for atom 10]

Now if we decide to reorient atoms 9 and 10 by defining a distance as 2-9 and the angle 1-2-9 and the dihedral angle 1-2-9-10, is there a way to find a rotation/transformation matrix that will perform this realignment without disturbing the geometry 开发者_如何学Pythonof the rest of the atoms [that is it will preserve the angle 7-8-9, distance 8-9 and dihedral 6-7-8-9].

Thanks a lot in advance for any advice.


While I'm a bit confused, I will take a stab at it. It sounds like you have a set of points and want to reorient them while fixing some in certain locations and preserving the spatial relationships of the group. If you know the coordinates of 4 points in the starting location and their coordinates in the destination location, you can just put those points (x,y,z,1) as columns in a 4x4 matrix S. You put the destination coordinates in another matrix D. Then you solve D = MS where D is the destination, S is the source, and M will be the transformation that takes you from S to D. So we right-multiply by S~ (inverse) to get M = DS~.

On another note, I would recommend that you never use angles for this type of thing. If you want to make a constraint that the angle between atoms 4-5-6 is a certain value, a much better representation is to store the dot product d = (4-5)*(6-5). This of course assumes the distances are not variable and the 3 atom set is rigid.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜