<div dir="ltr">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.<div>



<br></div><div>It looks the &quot;use&quot; flag isn&#39;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&#39;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.</div>

<div><br></div><div>Cheers,</div><div><br></div><div>Richard</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 15 April 2013 10:40, Jan Marten Simons <span dir="ltr">&lt;<a href="mailto:marten@xtal.rwth-aachen.de" target="_blank">marten@xtal.rwth-aachen.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Montag 15 April 2013 18:33:00 schrieb Jan Marten Simons:<br>
&gt; Hi,<br>
&gt;<br>
&gt; while working on a really fast way to calculate the structure factors of a<br>
&gt; few millions of different modifications of a structure with only the<br>
&gt; selected scatterers contributing to f_calc ....<br>
<br>
[...]<br>
<br>
&gt; (I think building a larger structure and working with<br>
&gt; selections might be faster than creating lots of different structures<br>
&gt; containing only the desired scatterers, but I might be wrong on this.)<br>
<br>
I&#39;ve found &quot;flags&quot; might be what I&#39;m looking for. So if I could set the &quot;use&quot;<br>
flag for all scatterers at once and if it was taken into consideration during<br>
structure factor calculation then I think it would most likely be the fastest<br>
way to enable or disable the contribution of individual scatterers to the<br>
structure factors. Am I right on this and how would I best interface with the<br>
flags mechanism (from python)?<br>
<br>
Cheers,<br>
<br>
Jan<br>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</blockquote></div><br></div>