<div dir="ltr">Hi All,<div><br></div><div>There is a method in the miller module:</div><div><br></div><div><a href="https://cctbx.github.io/cctbx/cctbx.miller.html">https://cctbx.github.io/cctbx/cctbx.miller.html</a><br></div><div><br></div><div><br></div><div>check out this function and related:<br></div><div><br></div><div>normalize(reflections_per_bin=150, eps_fac=None)<br>  Compute E-values: E = (F/eps**0.5) / rms of (F/eps**0.5) This is ‘Karle’ approach, that is not using overall B from Wilson plot.<br><br></div><div>Also, check out this tutorial:</div><div><br></div><div><a href="http://cctbx.sourceforge.net/siena2005/direct_methods_light.html">http://cctbx.sourceforge.net/siena2005/direct_methods_light.html</a><br></div><div><br></div><div><p style="color:rgb(0,0,0);font-family:Times;font-size:medium">&quot;This means we are ready to calculate quasi-normalized structure factors by computing <tt class="gmail-docutils gmail-literal" style="background-color:rgb(238,238,238)"><span class="gmail-pre" style="white-space:pre">f_sq</span> <span class="gmail-pre" style="white-space:pre">/</span> <span class="gmail-pre" style="white-space:pre">&lt;f_sq/epsilon&gt;</span></tt> in resolution bins:</p><pre class="gmail-literal-block" style="margin-left:2em;margin-right:2em;background-color:rgb(238,238,238);color:rgb(0,0,0)">all_e_values = miller_array.quasi_normalize_structure_factors().sort(by_value=&quot;data&quot;)
</pre><p style="color:rgb(0,0,0);font-family:Times;font-size:medium">This statement performs two steps at once. First, the <tt class="gmail-docutils gmail-literal" style="background-color:rgb(238,238,238)"><span class="gmail-pre" style="white-space:pre">quasi_normalize_structure_factors()</span></tt> method creates a new <tt class="gmail-docutils gmail-literal" style="background-color:rgb(238,238,238)"><span class="gmail-pre" style="white-space:pre">cctbx.miller.array</span></tt> instance with the same unit cell, space group, anomalous flag and Miller indices as the input <tt class="gmail-docutils gmail-literal" style="background-color:rgb(238,238,238)"><span class="gmail-pre" style="white-space:pre">miller_array</span></tt>, but with a new data array containing the normalized structure factors. The <tt class="gmail-docutils gmail-literal" style="background-color:rgb(238,238,238)"><span class="gmail-pre" style="white-space:pre">sort()</span></tt> method is used immediately on this intermediate instance to sort the E-values by magnitude. By default, the data are sorted in descending order (largest first, smallest last). This is exactly what we want here. To convince yourself it is correct, insert <tt class="gmail-docutils gmail-literal" style="background-color:rgb(238,238,238)"><span class="gmail-pre" style="white-space:pre">all_e_values.show_array()</span></tt>.&quot;</p></div><div>Regards</div><div><br></div><div>Peter<br></div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 3, 2020 at 8:37 AM Pavel Afonine &lt;<a href="mailto:pafonine@lbl.gov">pafonine@lbl.gov</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello AC Research,<br>
<br>
&gt; I am trying to find how to perform the E value calculation using <br>
&gt; CCTBX. I am unable to find the method in the documentation. Can <br>
&gt; someone assist me, please?<br>
<br>
I might be wrong but I don&#39;t think cctbx has a ready-to-use function to <br>
calculate E values. However, it should be easy to make one using <br>
existing tools. If you tell me your definition of E-values I might be <br>
able to help with the script.<br>
<br>
Pavel<br>
<br>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org" target="_blank">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font size="2">------------------------------------------------------------------------</font><br><font size="1">P.H. Zwart<br>Staff Scientist</font></div><div><font size="1">Molecular Biophysics and Integrated Bioimaging &amp;</font></div><div><font size="1">Center for Advanced Mathematics for Energy Research Applications</font></div><div><font size="1">Lawrence Berkeley National Laboratories<br>1 Cyclotron Road, Berkeley, CA-94703, USA<br>Cell: 510 289 9246</font></div><div><font size="1"><br></font></div><div><font size="1">PHENIX:   <a href="http://www.phenix-online.org/" style="color:rgb(17,85,204)" target="_blank">http://www.phenix-online.org</a><br></font></div><div><font size="1">CAMERA: <a href="http://camera.lbl.gov/" target="_blank">http://camera.lbl.gov/</a></font></div><div style="font-size:small">-------------------------------------------------------------------------<br></div></div></div></div></div></div></div></div></div>