<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font class="Apple-style-span" size="4">Hello all,</font><div><font class="Apple-style-span" size="4"><br></font></div><div><font class="Apple-style-span" size="4">I have a rotation + translation matrix. Let's say</font></div><div><font class="Apple-style-span" size="4"><br></font></div><div><div><font class="Apple-style-span" face="Monaco">py&gt; mtx</font></div><div><font class="Apple-style-span" face="Monaco">array([[ &nbsp;0.88302225, &nbsp; 0.11697778, &nbsp; 0.45451948, &nbsp; 5. ],</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp; &nbsp; &nbsp; &nbsp;[ &nbsp;0.11697778, &nbsp; 0.88302225, &nbsp;-0.45451948, &nbsp;10. ],</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp; &nbsp; &nbsp; &nbsp;[ -0.45451948, &nbsp; 0.45451948, &nbsp; 0.76604444, &nbsp;20. ],</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp; &nbsp; &nbsp; &nbsp;[ &nbsp;0. &nbsp; &nbsp; &nbsp; &nbsp;, &nbsp; 0. &nbsp; &nbsp; &nbsp; &nbsp;, &nbsp; 0. &nbsp; &nbsp; &nbsp; &nbsp;, &nbsp; 1. ]])</font></div><div><font class="Apple-style-span" size="4"><br></font></div><div><font class="Apple-style-span" size="4">My usual way of transforming a set of coordinates with a 4x4 matrix is to use numpy:</font></div><div><font class="Apple-style-span" size="4"><br></font></div><div><font class="Apple-style-span" face="Monaco">py&gt; xyz_1</font></div><div><font class="Apple-style-span" face="Monaco">array([[ &nbsp;5., &nbsp;10., &nbsp;15., &nbsp; 1.],</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp; &nbsp; &nbsp; &nbsp;[ 20., &nbsp;15., &nbsp;10., &nbsp; 1.]])</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><div>py&gt; numpy.inner(xyz_1, mtx)</div><div>array([[ 17.40268126, &nbsp;12.59731919, &nbsp;33.76326397, &nbsp; 1. ],</div><div>&nbsp; &nbsp; &nbsp; &nbsp;[ 28.9603065 , &nbsp;21.03969455, &nbsp;25.38784698, &nbsp; 1. ]])</div></font></div></div><div><font class="Apple-style-span" size="4"><br></font></div><div><font class="Apple-style-span" size="4">What is the equivalent in cctbx? Is there a way to avoid converting coordinates back and fourth between numpy arrays with atoms().extract_xyz() &amp; .set_xyz() (as might be used from a iotbx_pdb_hierarchy_ext.root).</font></div><div><font class="Apple-style-span" size="4"><br></font></div><div><font class="Apple-style-span" size="4">Thank you for any help.</font></div><div><font class="Apple-style-span" size="4"><br></font></div><div><font class="Apple-style-span" size="4">James</font></div></body></html>