Hi Oleg,<div><br></div><div>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.</div>

<div><br></div><div>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.</div>

<div><br></div><div>Cheers<br clear="all"><br>-- David<br>
<br><br><div class="gmail_quote">On 28 June 2012 11:34, Oleg Dolomanov <span dir="ltr">&lt;<a href="mailto:oleg@olexsys.org" target="_blank">oleg@olexsys.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div><div dir="ltr">
Hi David,<div><br></div><div>I did these some times ago, you can find them here:</div><div><br></div><div>For rotation around a vector:</div><div><a href="http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/shared.cpp?revision=13167&amp;view=markup" target="_blank">http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/shared.cpp?revision=13167&amp;view=markup</a>�</div>

<div>at line 76<br>For 3 Euler angles:</div><div><a href="http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/same_group.cpp?revision=13935&amp;view=markup" target="_blank">http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/same_group.cpp?revision=13935&amp;view=markup</a>�</div>

<div>at line 107</div><div><br></div><div>Also these derivatives present here:</div><div><a href="http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/rigid.cpp?revision=12381&amp;view=markup" target="_blank">http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/smtbx/refinement/constraints/rigid.cpp?revision=12381&amp;view=markup</a>�</div>

<div>at lines 61 and 130</div><div><br></div><div>Cheers,</div><div><br></div><div>Oleg.<br><div><div></div><hr>From: <a href="mailto:dgwaterman@gmail.com" target="_blank">dgwaterman@gmail.com</a><br>Date: Thu, 28 Jun 2012 11:13:45 +0100<br>

To: <a href="mailto:cctbxbb@phenix-online.org" target="_blank">cctbxbb@phenix-online.org</a><br>Subject: [cctbxbb] angle derivative of rotation matrix<div><div class="h5"><br><br>Hi,<div><br></div><div>I&#39;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&#39;t find anything that looked hopeful.</div>



<div><br></div><div>If there isn&#39;t something there already I have some Fortran code from David Thomas that I could adapt to do this. Of course it wouldn&#39;t be very efficient in pure Python, and calculating the matrix and its derivative separately, but that&#39;s okay for now as the code is just�for testing out some ideas.</div>



<div><br></div><div>By the way, links to�<a href="http://skal.planet-d.net/demo/matrixfaq.htm" target="_blank">http://skal.planet-d.net/demo/matrixfaq.htm</a>�in the documentation (e.g. <a href="http://cctbx.sourceforge.net/current/c_plus_plus/namespacescitbx_1_1math_1_1r3__rotation.html#aaa200e3366d2e91e0ba9e01ecf99e99e" target="_blank">here</a>) are broken. I found a document with the same name here:�<a href="http://vamos.sourceforge.net/matrixfaq.htm" target="_blank">http://vamos.sourceforge.net/matrixfaq.htm</a>, but I have no idea if this has the same content as the original.</div>



<div><br></div><div>Cheers</div><div><br>-- David<br>
</div>
<br></div></div>_______________________________________________
cctbxbb mailing list
<a href="mailto:cctbxbb@phenix-online.org" target="_blank">cctbxbb@phenix-online.org</a>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a></div></div>                                               </div></div>
<br>_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
<br></blockquote></div><br></div>