[cctbxbb] structure.replace_sites_... vs. structure.set_sites_...

Richard Gildea rgildea at gmail.com
Mon Apr 15 11:25:20 PDT 2013


Hi Jan,

I think you are right - from looking at the implementation it looks like
set_sites_* updates the coordinates in place, whereas replace_sites_*
returns a copy of the original structure and scatterers without modifying
the original. replace_sites_* also allows you to pass a selection too.

Cheers,

Richard


On 15 April 2013 09:33, Jan Marten Simons <marten at xtal.rwth-aachen.de>wrote:

> Hi,
>
> while working on a really fast way to calculate the structure factors of a
> few
> millions of different modifications of a structure with only the selected
> scatterers contributing to f_calc I came across this:
>
> Why are there two methods for changing the sites_(cart/frac) of the
> scatterers
> doing quite different things?
>
> set_sites_... seems to simply update the corresponding site information of
> the
> scatterer, while replace_sites_... seems to create a copy of the
> structure. Is
> this the only difference there is?
>
>
> Also If anybody got a nice idea for my original problem, I'm also very much
> interested. (I think building a larger structure and working with
> selections
> might be faster than creating lots of different structures containing only
> the
> desired scatterers, but I might be wrong on this.)
>
> Cheers,
>
> Jan
> _______________________________________________
> 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/20130415/6376e408/attachment-0001.htm>


More information about the cctbxbb mailing list