<div dir="ltr">Hi,<div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 16, 2018 at 12:59 PM David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Den 2018-11-14 kl. 15:04, skrev Erik Lindahl:<br>
&gt; ... and for the low-level table code we (or somebody else :-) still need <br>
&gt; to sit down and work through the math how we should specify tolerances <br>
&gt; (that are used to set spacing) for arbitrary cases where the tabulated <br>
&gt; function or its derivative has a zero-value in the relevant range.<br>
<br>
Not sure I understand the question? The spacing is an absolute quantity, <br>
right? Are you worried about the relative error which may go up in case <br>
force or energies get close to zero? Does the relative error influence <br>
the physics?<br></blockquote><div><br></div><div>The new table classes use either analytical C++ functions or high-density input data, but then we start by calculating exactly what the largest spacing is that will fulfill the requested tolerance on both force and potential over the entire definition range specified. If the input data is not dense enough to achieve this, the constructor will throw.</div><div><br></div><div>This is quite nice since we&#39;ll *know* the data is good enough, rather than just pray you picked a spacing that was good enough. In some cases (e.g. short distances, exponentials, etc.) the previous spacing was not adequate, while in others we can have sparser tables that will be faster.</div><div><br></div><div>However, when we actually test the relative table tolerance over the entire range, we run into problems when the reference function has a zero there. Hopefully not rocket science to fix, but since we finally have a general table class that can be used for arbitrary tables we should think about and design this properly, rather than just doing a hack that works for nonbonded tables, but might fail for other stuff.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Speaking of wish-lists, it would be great to get rid of the invsqrt in <br>
innerloops to allow zero distances as well.<br></blockquote><div><br></div><div>That would probably have a clear performance penalty on most platforms, so it&#39;s unfortunately not likely to happen just to support less common interactions.</div><div><br></div><div>Cheers,</div><div><br></div><div>Erik</div><div> </div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Erik Lindahl &lt;<a href="mailto:erik.lindahl@dbb.su.se" target="_blank">erik.lindahl@dbb.su.se</a>&gt;</div><div>Professor of Biophysics, Dept. Biochemistry &amp; Biophysics, Stockholm University</div><div>Science for Life Laboratory, Box 1031, 17121 Solna, Sweden</div></div></div></div></div></div></div></div></div></div></div>