[cctbxbb] Reducing coordinates to asymmetric unit

Richard Gildea rgildea at googlemail.com
Thu Feb 11 04:59:11 PST 2010

Hi Graeme,

I think what you need are the direct space asu mappings tools - see
cctbx/crystal/tst_ext.py or cctbx/regression/tst_direct_space_asu.py if you
want to look at more of the tools that are available there.

If I understand correctly, something along the lines of this should do what
you want:

    asu_mappings = xs.asu_mappings(buffer_thickness=0)
    xs_asu = xs.deep_copy_scatterers()
    frac = xs.unit_cell().fractionalize
    for i, mappings in enumerate(asu_mappings.mappings()):
      xs_asu.scatterers()[i].site = frac(mappings[0].mapped_site())
    for sc in xs_asu.scatterers():
      assert asu_mappings.asu().is_inside(sc.site)

Hope that helps,


On 11 February 2010 11:45, <Graeme.Winter at diamond.ac.uk> wrote:

>  Hi Folks,
> Does anyone have a handy bit of CCTBX Python code which will take a
> spacegroup and unit cell, and a list of coordinates, and return the list of
> coordinates reduced to the asymmetric unit? I tried the "dumb" approach of:
> use unit cell and sites -> fractional sites
> for site in fractional sites:
>   for smx in sg.smx()
>     for ltr in sg.ltr()
>       apply smx, ltr
>       is in asu? return
> and it did not always return an answer, so there's clearly somthing I don't
> understand. Fractional coordinates are all in [0,1).
> I'm sure someone must have done this!
> Thanks in advance,
> Graeme
> Graeme Winter
> Software and MX Support Scientist
> Diamond Light Source
> +44 1235 778091 (work)
> +44 7786 662784 (work mobile)
> --
> 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.
> 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.
> 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
> _______________________________________________
> 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/20100211/ccff2c31/attachment.htm>

More information about the cctbxbb mailing list