[cctbxbb] Invert hand of shelxd res file from cctbx

Luc Bourhis luc_j_bourhis at mac.com
Wed May 30 05:06:54 PDT 2012


Hi Graeme,

> This should be easy but I can’t find anything!
>  
> I have a .res file:
>  
> [...]
>  
> 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?

from cctbx import xray
from cStringIO import StringIO

res= """
REM Best SHELXD solution:   CC 41.11   CC(weak) 23.51   CFOM  64.62
REM
TITL sad_fa.ins SAD in P422
CELL  0.98000   78.17   78.17   37.87   90.00   90.00   90.00
LATT  -1
SYMM -Y+1/2,X+1/2,Z+1/4
SYMM -X,-Y,Z+1/2
SYMM Y+1/2,-X+1/2,Z+3/4
SYMM X+1/2,-Y+1/2,-Z+3/4
SYMM Y,X,-Z
SYMM -X+1/2,Y+1/2,-Z+1/4
SYMM -Y,-X,-Z+1/2
SFAC SE
UNIT   256
SE01   1  0.600227  0.892868  0.042187   1.0000  0.2
SE02   1  0.627518  0.852661  0.427392   0.8667  0.2
SE03   1  0.867409  0.911667  0.394418   0.8420  0.2
SE04   1  0.489761  0.805634  0.391009   0.7279  0.2
SE05   1  0.642792  0.649048  0.369694   0.7172  0.2
SE06   1  0.678879  0.535027  0.477918   0.4571  0.2
SE07   1  0.609207  0.572754  0.421746   0.4212  0.2
SE08   1  0.584526  0.536499  0.322047   0.4154  0.2
SE09   1  0.843063  0.846794  0.480296   0.3831  0.2
SE10   1  0.622429  0.743332  0.157899   0.3604  0.2
SE11   1  0.626114  0.528595  0.644789   0.3590  0.2
HKLF 3
END
"""
xs = xray.structure.from_shelx(file=StringIO(res)) # replace "file" by "filename" here to load from disk
xs_other_hand = xs.change_hand()
print xs.as_pdb_file()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20120530/fd0d356a/attachment.htm>


More information about the cctbxbb mailing list