<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
sgtbx.space_group is a pure C&#43;&#43; object (well, almost, there are a few auxilliary Python methods injected). Its<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">&nbsp;constructor expects a hall symbol as input:</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://github.com/cctbx/cctbx_project/blob/54344b84c0b4fd00c5ca8438b98a501eca503fae/cctbx/sgtbx/space_group.h#L73-L85">https://github.com/cctbx/cctbx_project/blob/54344b84c0b4fd00c5ca8438b98a501eca503fae/cctbx/sgtbx/space_group.h#L73-L85</a><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
In contrast, sgtbx.space_group_info is a pure Python object that contains utility methods related to handling space groups. Its constructor is much more flexible and can interpret various &quot;conventional&quot; space group strings or from a space group number:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://github.com/cctbx/cctbx_project/blob/54344b84c0b4fd00c5ca8438b98a501eca503fae/cctbx/sgtbx/__init__.py#L81-L114">https://github.com/cctbx/cctbx_project/blob/54344b84c0b4fd00c5ca8438b98a501eca503fae/cctbx/sgtbx/__init__.py#L81-L114</a><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I haven't delved into exactly what is happening when you construct an sgtbx.space_group() with the input &quot;C2&quot;, but I'm not sure it's a valid hall symbol:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="http://cci.lbl.gov/sginfo/hall_symbols.html">http://cci.lbl.gov/sginfo/hall_symbols.html</a>&nbsp;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
Richard</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt">Dr Richard Gildea</span></font></span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt; background-color:white">Data Analysis Scientist</span></font></span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt">Tel: &#43;441235 77 8078</span></font></span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt">&nbsp;</span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt">Diamond Light Source Ltd.</span></font></span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt">Diamond House</span></font></span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt">Harwell Science &amp; Innovation Campus</span></font></span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt">Didcot</span></font></span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt">Oxfordshire</span></font></span></font></div>
<div style="font-family:'Segoe UI',Helvetica,Arial,sans-serif; font-size:medium; margin:0px">
<font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Verdana,sans-serif" size="2"><span style="font-size:10pt">OX11 0DE</span></font></span></font></div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> cctbxbb-bounces@phenix-online.org &lt;cctbxbb-bounces@phenix-online.org&gt; on behalf of Winter, Graeme (DLSLtd,RAL,LSCI) &lt;Graeme.Winter@diamond.ac.uk&gt;<br>
<b>Sent:</b> 14 October 2019 11:33<br>
<b>To:</b> cctbx mailing list &lt;cctbxbb@phenix-online.org&gt;<br>
<b>Subject:</b> Re: [cctbxbb] sgtbx.space_group and sgtbx.space_group_info query</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">HI Luc<br>
<br>
Thanks for this - it�s a helpful description of the difference which would make a good addition to the documentation<br>
<br>
Does not explain why the output is different (or whether the output _should_ be different) though<br>
<br>
All the best Graeme<br>
<br>
&gt; On 14 Oct 2019, at 11:03, Luc Bourhis &lt;luc_j_bourhis@mac.com&gt; wrote:<br>
&gt; <br>
&gt; Hi,<br>
&gt; <br>
&gt; For the particular operation you showed, space_group_info is more efficient because it caches the result of determining space group type. The computation is delegated to an underlying sgtbx.space_group object. Asking such an object for the type results in
 a significant bunch of computations being done every time you ask. That�s because essentially a sgtbx.space_group object is just a list of rotation matrices and translation vectors. A space_group_info is more clever!
<br>
&gt; <br>
&gt; Moreover, space_group_info provides an easy entry point for many operations which would otherwise be more obscure to write. For example, if you want to change the hand, without space_group_info, you would need to do, starting from a space_group object sg<br>
&gt; <br>
&gt; sgt = sg.type()<br>
&gt; op = sgt.change_of_hand_op()<br>
&gt; sg_other_hand = sg.change_basis(op)<br>
&gt; <br>
&gt; With a space_group_info sgi, you can just do<br>
&gt; <br>
&gt; sgi_other_hand = sgi.change_hand()<br>
&gt; <br>
&gt; to you get a new space_group_info with the opposite hand.<br>
&gt; <br>
&gt; Best wishes,<br>
&gt; <br>
&gt; Luc<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt;&gt; On 9 Oct 2019, at 18:08, Ben Williams &lt;ben.williams@diamond.ac.uk&gt; wrote:<br>
&gt;&gt; <br>
&gt;&gt; Dear CCTBX devs,<br>
&gt;&gt; <br>
&gt;&gt;&nbsp; What is a sgtbx.space_group_info object, and why does it do something subtly different to sgtbx.space_group?<br>
&gt;&gt; <br>
&gt;&gt;&gt;&gt;&gt; from cctbx import sgtbx<br>
&gt;&gt;&gt;&gt;&gt; print(sgtbx.space_group('C2').type().universal_hermann_mauguin_symbol())<br>
&gt;&gt;&nbsp;&nbsp;&nbsp; P 1 2 1 (c,2*a&#43;c,b)<br>
&gt;&gt;&gt;&gt;&gt; print(sgtbx.space_group_info('C2').group().type().universal_hermann_mauguin_symbol())<br>
&gt;&gt;&nbsp;&nbsp;&nbsp; C 1 2 1<br>
&gt;&gt; <br>
&gt;&gt; sgtbx.space_group_info is notably lacking in docstring (or indeed comments in the code). sgtbx.space_group isn't too hot on the documentation either...<br>
&gt;&gt; <br>
&gt;&gt;&nbsp; Cheers,<br>
&gt;&gt;&nbsp;&nbsp; Ben<br>
&gt;&gt; <br>
&gt;&gt; -- <br>
&gt;&gt; Ben Williams<br>
&gt;&gt; Post-doctoral research associate<br>
&gt;&gt; Scientific Software<br>
&gt;&gt; Diamond Light Source<br>
&gt;&gt; <br>
&gt;&gt; <br>
&gt;&gt; -- <br>
&gt;&gt; This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt
 by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.<br>
&gt;&gt; Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for
 any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.<br>
&gt;&gt; Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; cctbxbb mailing list<br>
&gt;&gt; cctbxbb@phenix-online.org<br>
&gt;&gt; <a href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
&gt; <br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; cctbxbb mailing list<br>
&gt; cctbxbb@phenix-online.org<br>
&gt; <a href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
<br>
<br>
_______________________________________________<br>
cctbxbb mailing list<br>
cctbxbb@phenix-online.org<br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</div>
</span></font></div>
<p align="justify">&nbsp;</p>
<p align="justify">--&nbsp;</p>
<p align="justify">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.<br />Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. <br />Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.<br />Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom<br />&nbsp;</p></body>
</html>