<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
If I understand question correctly, you might be looking for
map_to_asu(). Search cctbx code for implementation and use examples,
from which you may infer if that's what you need.<br>
<br>
Pavel<br>
<br>
<br>
<div class="moz-cite-prefix">On 11/21/16 04:47, Tijskens Engelbert
wrote:<br>
</div>
<blockquote
cite="mid:AF8FB386-5B96-48D4-8A7B-8392484B6B12@uantwerpen.be"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div class="">Hi,</div>
<div class=""><br class="">
</div>
<div class="">I am an experienced C++ 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 �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.�</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>�cctbx�<span
class="" style="color: rgb(4, 51, 255);">import</span>�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>�__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;">
� � 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;">
�� � � � � � � � � � � � � � � � � � � , space_group_symbol=<span
class="" style="color: rgb(212, 146, 56);">"229"</span>�<span
class="" style="color: rgb(203, 203, 203);"># = "I m -3 m"</span></div>
<div class="" style="margin: 0px; font-size: 11px; line-height:
normal; font-family: Monaco;">
�� � � � � � � � � � � � � � � � � � � )</div>
<div class="" style="margin: 0px; font-size: 11px; line-height:
normal; font-family: Monaco;">
� � sg = crystal_symmetry.space_group()</div>
<div class="" style="margin: 0px; font-size: 11px; line-height:
normal; font-family: Monaco;">
� � brick = sgtbx.brick( sg.type() )</div>
<div class="" style="margin: 0px; font-size: 11px; line-height:
normal; font-family: Monaco;">
� ��<span class="" style="color: rgb(4, 51, 255);">print</span>�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.�</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,�</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 moz-do-not-send="true" href="http://vscentrum.be" class="">vscentrum.be</a>�<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
moz-do-not-send="true" 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
moz-do-not-send="true"
href="http://www.uantwerpen.be/en/rg/cma" class="">www.uantwerpen.be/en/rg/cma</a><br
class="">
<br class="">
University of Antwerp�<br class="">
Middelheimlaan1 G.309, B-2020 Antwerp, Belgium<br class="">
<br class="">
<a moz-do-not-send="true"
href="mailto:engelbert.tijskens@uantwerpen.be" class="">engelbert.tijskens@uantwerpen.be</a><br
class="">
++32 3 265 3879</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cctbxbb mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a>
<a class="moz-txt-link-freetext" href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a>
</pre>
</blockquote>
<br>
</body>
</html>