I added "use" flag (at the time when I was adding all other scatterer flags) rather as a placeholder for a future use, so yes, indeed, currently it is not respected in fcalc and gradients calculation (though it should be respected!). Perhaps it's time to start using it...

Pavel

On 4/15/13 11:58 AM, Richard Gildea wrote:
Are the same scatterers contributing to f_calc for every calculation, or will the scatterers that are contributing vary from calculation to calculation? In the case of the former it might be simplest to create a new copy of the xray_structure with only those scatterers.

It looks the "use" flag isn't actually respected in the structure factor or gradient calculations as far as I can tell. If you feel you need something like this rather than creating new copies of the xray_structure with only the scatterers you need or alternatively setting the occupancy to zero, then this is probably something we can add into the code. There is some code in cctbx/xray/scatterer_flags.h for flags_set_grad_*() that will set a selection of gradients all at once in C++, but I don't see an equivalent for set_use_*(). I suspect that the overhead of looping through the scatterers to set flags in Python would be small compared to the cost of calculating the structure factors in the first place.

Cheers,

Richard


On 15 April 2013 10:40, Jan Marten Simons <[email protected]> wrote:
Am Montag 15 April 2013 18:33:00 schrieb Jan Marten Simons:
> 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 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.)

I've found "flags" might be what I'm looking for. So if I could set the "use"
flag for all scatterers at once and if it was taken into consideration during
structure factor calculation then I think it would most likely be the fastest
way to enable or disable the contribution of individual scatterers to the
structure factors. Am I right on this and how would I best interface with the
flags mechanism (from python)?

Cheers,

Jan
_______________________________________________
cctbxbb mailing list
[email protected]
http://phenix-online.org/mailman/listinfo/cctbxbb



_______________________________________________
cctbxbb mailing list
[email protected]
http://phenix-online.org/mailman/listinfo/cctbxbb