<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Hi,</div>
<div class=""><br class="">
</div>
<div class="">I am an experienced C&#43;&#43; and Python programmer, but new to cctbx.</div>
<div class=""><br class="">
</div>
<div class="">Can any tell me if there is an algorithm in cctbx available &nbsp;to convert an arbritrary point in direct space to the corresponding point in the asymmetric unit of a given space group? i can figure out how to convert it to the corresponding point
 in the unit cell at the origin, but from there to the asymmetric unit is unclear to me.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">I found the brick class which gives me the assymmetric unit</div>
<div class="">
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
<span class="" style="color: rgb(4, 51, 255);">from</span>&nbsp;cctbx&nbsp;<span class="" style="color: rgb(4, 51, 255);">import</span>&nbsp;crystal,sgtbx</div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;">
<br class="">
</div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
<span class="" style="color: rgb(4, 51, 255);">if</span>&nbsp;__name__==<span class="" style="color: rgb(212, 146, 56);">'__main__'</span>:</div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
&nbsp; &nbsp; crystal_symmetry = crystal.symmetry( unit_cell=(<span class="" style="color: rgb(148, 17, 0);">3.5093</span>,<span class="" style="color: rgb(148, 17, 0);">3.5093</span>,<span class="" style="color: rgb(148, 17, 0);">3.5093</span>,<span class="" style="color: rgb(148, 17, 0);">90</span>,<span class="" style="color: rgb(148, 17, 0);">90</span>,<span class="" style="color: rgb(148, 17, 0);">90</span>)</div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; , space_group_symbol=<span class="" style="color: rgb(212, 146, 56);">&quot;229&quot;</span>&nbsp;<span class="" style="color: rgb(203, 203, 203);"># = &quot;I m -3 m&quot;</span></div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )</div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
&nbsp; &nbsp; sg = crystal_symmetry.space_group()</div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
&nbsp; &nbsp; brick = sgtbx.brick( sg.type() )</div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
&nbsp; &nbsp;&nbsp;<span class="" style="color: rgb(4, 51, 255);">print</span>&nbsp;brick</div>
</div>
<div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Monaco;">
<br class="">
</div>
<div class="">I also found cctbx::sgtbx::asu and the classes therein, but they are largely undocumented.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">For the interested, this is the problem i want to solve:</div>
<div class="">I have a (scalar) physical property P(r), depending on spatial position, presented as a 3D array on a regular grid over the unit cell (space group is known). I need to integrate P(r)*f(r), f(r) being an arbitrary function over a region of direct
 space, which typically comprises several unit cells. In order to reduce the memory footprint of the P array, i would like to restrict it to the space group’s asymmetric unit.</div>
<div class=""><br class="">
</div>
<div class="">All help is greatly appreciated.</div>
<div class="">kindest regards,&nbsp;</div>
<br class="">
<div class="">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class="">Dr [Engel]bert Tijskens<br class="">
HPC Analyst/Consultant<br class="">
<br class="">
Flemish Supercomputer Center<span class="Apple-tab-span" style="white-space: pre;">
</span><a href="http://vscentrum.be" class="">vscentrum.be</a>&nbsp;<br class="">
HPC core facility CalcUA<span class="Apple-tab-span" style="white-space: pre;"> </span>
<span class="Apple-tab-span" style="white-space: pre;"></span><a href="http://uantwerp.be/calcua" class="">uantwerp.be/calcua</a><br class="">
Computational mathematics<span class="Apple-tab-span" style="white-space: pre;"> </span>
<span class="Apple-tab-span" style="white-space: pre;"></span><a href="http://www.uantwerpen.be/en/rg/cma" class="">www.uantwerpen.be/en/rg/cma</a><br class="">
<br class="">
University of Antwerp&nbsp;<br class="">
Middelheimlaan1 G.309, B-2020 Antwerp, Belgium<br class="">
<br class="">
<a href="mailto:engelbert.tijskens@uantwerpen.be" class="">engelbert.tijskens@uantwerpen.be</a><br class="">
&#43;&#43;32 3 265 3879</div>
</div>
</div>
</body>
</html>