angle derivative of rotation matrix
Hi, I'm using the axis_and_angle_as_r3_rotation_matrix method of scitbx.matrix.col in some Python code. Now I need to calculate the first derivative of the rotation matrix with respect to the rotation angle. Is there a function to do that somewhere in scitbx (or elsewhere in cctbx)? I had a brief look around but couldn't find anything that looked hopeful. If there isn't something there already I have some Fortran code from David Thomas that I could adapt to do this. Of course it wouldn't be very efficient in pure Python, and calculating the matrix and its derivative separately, but that's okay for now as the code is just for testing out some ideas. By the way, links to http://skal.planet-d.net/demo/matrixfaq.htm in the documentation (e.g. herehttp://cctbx.sourceforge.net/current/c_plus_plus/namespacescitbx_1_1math_1_1...) are broken. I found a document with the same name here: http://vamos.sourceforge.net/matrixfaq.htm, but I have no idea if this has the same content as the original. Cheers -- David
Hi David, I did these some times ago, you can find them here: For rotation around a vector:http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/shared.cpp?revision=13167&view=markup at line 76 For 3 Euler angles:http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/same_group.cpp?revision=13935&view=markup at line 107 Also these derivatives present here:http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/rigid.cpp?revision=12381&view=markup at lines 61 and 130 Cheers, Oleg. From: [email protected] Date: Thu, 28 Jun 2012 11:13:45 +0100 To: [email protected] Subject: [cctbxbb] angle derivative of rotation matrix Hi, I'm using the axis_and_angle_as_r3_rotation_matrix method of scitbx.matrix.col in some Python code. Now I need to calculate the first derivative of the rotation matrix with respect to the rotation angle. Is there a function to do that somewhere in scitbx (or elsewhere in cctbx)? I had a brief look around but couldn't find anything that looked hopeful. If there isn't something there already I have some Fortran code from David Thomas that I could adapt to do this. Of course it wouldn't be very efficient in pure Python, and calculating the matrix and its derivative separately, but that's okay for now as the code is just for testing out some ideas. By the way, links to http://skal.planet-d.net/demo/matrixfaq.htm in the documentation (e.g. here) are broken. I found a document with the same name here: http://vamos.sourceforge.net/matrixfaq.htm, but I have no idea if this has the same content as the original. Cheers -- David _______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Hi Oleg,
Thanks. My Python function for the first derivative is (happily) identical
in form. Such a function does seem like something of general utility that
should perhaps be present in scitbx. Or maybe situations that require this
are actually quite rare.
The code from David Thomas (e.g. RTMATS in Mosflm source) is nice because
it does explicit calculation of up to the fourth derivative, after which
they repeat. Although the need for that must surely be rather unusual.
Cheers
-- David
On 28 June 2012 11:34, Oleg Dolomanov
Hi David,
I did these some times ago, you can find them here:
For rotation around a vector:
at line 76 For 3 Euler angles:
at line 107
Also these derivatives present here:
at lines 61 and 130
Cheers,
Oleg. ------------------------------ From: [email protected] Date: Thu, 28 Jun 2012 11:13:45 +0100 To: [email protected] Subject: [cctbxbb] angle derivative of rotation matrix
Hi,
I'm using the axis_and_angle_as_r3_rotation_matrix method of scitbx.matrix.col in some Python code. Now I need to calculate the first derivative of the rotation matrix with respect to the rotation angle. Is there a function to do that somewhere in scitbx (or elsewhere in cctbx)? I had a brief look around but couldn't find anything that looked hopeful.
If there isn't something there already I have some Fortran code from David Thomas that I could adapt to do this. Of course it wouldn't be very efficient in pure Python, and calculating the matrix and its derivative separately, but that's okay for now as the code is just for testing out some ideas.
By the way, links to http://skal.planet-d.net/demo/matrixfaq.htm in the documentation (e.g. herehttp://cctbx.sourceforge.net/current/c_plus_plus/namespacescitbx_1_1math_1_1...) are broken. I found a document with the same name here: http://vamos.sourceforge.net/matrixfaq.htm, but I have no idea if this has the same content as the original.
Cheers
-- David
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Ok, once I get to needing an efficient version (still some way off that)
I'll write it in C++ with nth order derivative calculation and put it in
scitbx.
Cheers
-- David
On 28 June 2012 14:45, Pavel Afonine
Such a function does seem like something of general utility that should
perhaps be present in scitbx.
Sounds like a good idea. Pavel
______________________________**_________________ cctbxbb mailing list [email protected] http://phenix-online.org/**mailman/listinfo/cctbxbbhttp://phenix-online.org/mailman/listinfo/cctbxbb
participants (3)
-
David Waterman
-
Oleg Dolomanov
-
Pavel Afonine