[cctbxbb] crystal packing/unit cell question

Pavel Afonine pafonine at lbl.gov
Thu Nov 3 14:29:20 PDT 2011


Hi Jessica,

try with *sites_mod_positive=False* (this is what I mentioned this 
morning in my previous email). I think (but not sure) one of them should 
do "what you want" . I just tried. Run the attached script with the PDB 
file of your choice, and compare the results.

Pavel


On 11/3/11 12:42 PM, Jessica Grant wrote:
> 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
>
>
> _______________________________________________
> 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/64060592/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run.py
Type: text/x-python-script
Size: 445 bytes
Desc: not available
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20111103/64060592/attachment.bin>


More information about the cctbxbb mailing list