<html><head></head><body bgcolor="#FFFFFF"><div><br><br>Sent from my iPhone</div><div><br>On May 30, 2012, at 5:37 AM, &lt;<a href="mailto:Graeme.Winter@diamond.ac.uk">Graeme.Winter@diamond.ac.uk</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<base href="x-msg://1468/"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Lucida Sans";
        panose-1:2 11 6 2 3 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->


<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thank you to Oleg and Luc for sending the solutions, they were as simple as I thought they should be :o)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Cheerio,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Graeme<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:cctbxbb-bounces@phenix-online.org">cctbxbb-bounces@phenix-online.org</a> [mailto:cctbxbb-bounces@phenix-online.org]
<b>On Behalf Of </b>Luc Bourhis<br>
<b>Sent:</b> 30 May 2012 13:07<br>
<b>To:</b> cctbx mailing list<br>
<b>Subject:</b> Re: [cctbxbb] Invert hand of shelxd res file from cctbx<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Hi Graeme,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><span class="apple-style-span"><span style="font-size:11.5pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">This should be easy but I can’t find anything!</span></span><span class="apple-style-span"><span style="font-size:13.5pt;font-family:&quot;Lucida Sans&quot;,&quot;sans-serif&quot;"><o:p></o:p></span></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">&nbsp;</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">I have a .res file:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">[...]<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">which I would like to read, invert the hand of and write as a pdb file. I got stuck trying to work through the example / test code. Can someone point me in the right direction?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">from cctbx import xray<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">from cStringIO import StringIO<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">res= """<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">REM Best SHELXD solution: &nbsp; CC 41.11 &nbsp; CC(weak) 23.51 &nbsp; CFOM &nbsp;64.62<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">REM<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">TITL sad_fa.ins SAD in P422<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">CELL &nbsp;0.98000 &nbsp; 78.17 &nbsp; 78.17 &nbsp; 37.87 &nbsp; 90.00 &nbsp; 90.00 &nbsp; 90.00<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">LATT &nbsp;-1<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SYMM -Y+1/2,X+1/2,Z+1/4<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SYMM -X,-Y,Z+1/2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SYMM Y+1/2,-X+1/2,Z+3/4<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SYMM X+1/2,-Y+1/2,-Z+3/4<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SYMM Y,X,-Z<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SYMM -X+1/2,Y+1/2,-Z+1/4<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SYMM -Y,-X,-Z+1/2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SFAC SE<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">UNIT &nbsp; 256<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE01 &nbsp; 1 &nbsp;0.600227 &nbsp;0.892868 &nbsp;0.042187 &nbsp; 1.0000 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE02 &nbsp; 1 &nbsp;0.627518 &nbsp;0.852661 &nbsp;0.427392 &nbsp; 0.8667 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE03 &nbsp; 1 &nbsp;0.867409 &nbsp;0.911667 &nbsp;0.394418 &nbsp; 0.8420 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE04 &nbsp; 1 &nbsp;0.489761 &nbsp;0.805634 &nbsp;0.391009 &nbsp; 0.7279 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE05 &nbsp; 1 &nbsp;0.642792 &nbsp;0.649048 &nbsp;0.369694 &nbsp; 0.7172 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE06 &nbsp; 1 &nbsp;0.678879 &nbsp;0.535027 &nbsp;0.477918 &nbsp; 0.4571 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE07 &nbsp; 1 &nbsp;0.609207 &nbsp;0.572754 &nbsp;0.421746 &nbsp; 0.4212 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE08 &nbsp; 1 &nbsp;0.584526 &nbsp;0.536499 &nbsp;0.322047 &nbsp; 0.4154 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE09 &nbsp; 1 &nbsp;0.843063 &nbsp;0.846794 &nbsp;0.480296 &nbsp; 0.3831 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE10 &nbsp; 1 &nbsp;0.622429 &nbsp;0.743332 &nbsp;0.157899 &nbsp; 0.3604 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">SE11 &nbsp; 1 &nbsp;0.626114 &nbsp;0.528595 &nbsp;0.644789 &nbsp; 0.3590 &nbsp;0.2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">HKLF 3<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">END<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">"""<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">xs = xray.structure.from_shelx(file=StringIO(res)) # replace "file" by "filename" here to load from disk<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">xs_other_hand = xs.change_hand()<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">print xs.as_pdb_file()<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>

<br><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>
<br>

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>cctbxbb mailing list</span><br><span><a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a></span><br><span><a href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a></span><br></div></blockquote></body></html>