[cctbxbb] crystal packing/unit cell question
Jessica Grant
jgrant at smith.edu
Thu Nov 3 12:42:45 PDT 2011
Thanks everyone, for the input. I have written a little script using
your help. Attached is an image -- the green is the output of my
script, the blue is the original pdb file.
code looks like this:
from iotbx.file_reader import any_file
import sys
from mmtbx import utils
def run (args) :
pdb_file = args[0]
pdb_inp = any_file(pdb_file, force_type="pdb").file_object
xray = pdb_inp.xray_structure_simple()
uc = xray.expand_to_p1(sites_mod_positive=True)
outfile = open("unit_cell.pdb", "w")
utils.write_pdb_file(xray_structure = uc, pdb_hierarchy =
pdb_inp.construct_hierarchy(), out = outfile)
if __name__ == "__main__" :
run(sys.argv[1:])
It doesn't look like it is doing quite what I want. Oh...I just had
the thought that perhaps I should apply the symmetry operators before
using 'expand_to_P1'
Maybe?
Jessica
>>1) isn't this a method of the X-ray structure object, not one of
>>the PDB objects?
>
>expand_to_p1 is a method from xray/structure.py. I just used it yesterday.
>
>>2) won't it split up molecules to keep the sites all inside the unit cell?
>>
>>I'm getting annoyed that it's not easier to do this kind of lattice
>>generation for proteins, so I may just try coding it myself later
>>today or tomorrow. (I'd like to figure out something analogous to
>>the 'symexp' function in PyMOL, but I think that's a little more
>>work.)
>
>I can't imagine what can be easier than this? If you don't want to
>"split" copies to be all atoms from 1 to -1, then I guess
>sites_mod_positive=True (or False, I don't remember) should probably
>simply multiply copies.
>Anyway, it's faster to try than typing this email: try both, save
>xray_structure as PDB file and open it in PyMol.
>
>What is 'symexp' function in PyMOL ?
>
>Pavel
>
>_______________________________________________
>cctbxbb mailing list
>cctbxbb at phenix-online.org
>http://phenix-online.org/mailman/listinfo/cctbxbb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20111103/d81f1abe/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 10.pdf
Type: application/octet-stream
Size: 37295 bytes
Desc: not available
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20111103/d81f1abe/attachment-0001.obj>
More information about the cctbxbb
mailing list