<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi,<br><br>I put in the negative energy check on purpose.<br>There can be highly negative energies, which should not happen.<br>So energies smaller than -50kT are ignored.<br>But maybe such energies could only occur due to the SSE overflows<br>and not during non-SSE computation. If that's the case this check could<br>be removed.<br><br>Berk<br><br><hr id="stopSpelling">Date: Thu, 9 Sep 2010 22:52:28 +0200<br>From: jcb1@um.es<br>To: gmx-users@gromacs.org<br>Subject: Re: [gmx-users] Overflow problem with test-particle insertion<br><br>


<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
  


Hello.<br>
<br>
Probably that will not be related with the original problem but that's
something that came to me when reviewing the tpi.c code:<br>
<br>
In line 583 (and follow), it is stated:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (epot != epot || epot*beta &lt; bU_neg_limit) <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (debug)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fprintf(debug,"\n&nbsp; time %.3f, step %d:
non-finite energy %f, using exp(-bU)=0\n",t,step,epot);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; embU = 0;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
<br>
And maybe the condition&nbsp; (after ||) should be:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (epot != epot || -epot*beta &lt; bU_neg_limit)<br>
<br>
Otherwise we could be making a huge number (&gt;exp(50)) equal to 0
instead of making exp(-50)=0 as intended, isn't it?<br>
<br>
Well, I know I could be a bit confused<br>
<br>
Javier<br>
<br>
El 09/09/10 17:19, Berk Hess escribió:
<blockquote cite="mid:COL113-W1513821AC701A1763B351B8E730@phx.gbl">
  <style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>Hi,<br>
  <br>
I realized now that this is an SSE issue.<br>
Normally you would get NAN (or is it INF?). That is treated correctly
in the GROMACS TPI code.<br>
But in SSE a float "wraps around" when it overflows, which could, in
very few cases, lead to a reasonably<br>
looking energy value (I check for very high and very low values).<br>
I found that you can check for overflows in SSE and committed a fix for
4.5.2.<br>
I also filled the first 10 points (up to r=0.02 nm) of the
potential/force tables, these used to be zero.<br>
These values are only relevant for energy minimization or TPI with
extreme atomic overlap.<br>
  <br>
Berk<br>
  <br>
  <hr id="ecxstopSpelling">From: <a class="ecxmoz-txt-link-abbreviated" href="mailto:gmx3@hotmail.com">gmx3@hotmail.com</a><br>
To: <a class="ecxmoz-txt-link-abbreviated" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
Subject: RE: [gmx-users] Overflow problem with test-particle insertion<br>
Date: Thu, 9 Sep 2010 09:39:42 +0200<br>
  <br>
  
  
  <style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
Hi,<br>
  <br>
This is an interesting issue.<br>
The chance is quite small that this happens, but maybe not negligible.<br>
In single precision the maximum a float can store is 2^127.<br>
This gives a minimum distance of (2^127)^-1/12 = 6.5e-4 nm.<br>
The chance of inserting a particle within this radius is dens*3e-10,<br>
where dens is the number of particles per nm^3.<br>
A typical density of LJ particles is 30 per nm^3, which leads to a
chance of 1e-8.<br>
Such insertion numbers can be reached, so we probably have to worry
about this.<br>
  <br>
However, in your example the distance seems to be around 4e-3, which
would<br>
give r^-12 = 6e28. This still fits in a float and should not cause
problems.<br>
So we should make sure we understand what's going on here.<br>
Could you file a bugzilla with the files to reproduce this and which
insertion<br>
is the problematic one?<br>
  <br>
I so two possible solutions:<br>
Force tabulated potentials with TPI, this can currently be achieved by
setting<br>
the environment variable GMX_FORCE_TABLES<br>
Or require double precision.<br>
But I think both solutions would lead to about 40% lower performance.<br>
  <br>
Berk<br>
  <br>
  <br>
  <hr id="ecxstopSpelling">Date: Wed, 8 Sep 2010 21:16:46 -0400<br>
From: <a class="ecxmoz-txt-link-abbreviated" href="mailto:kdaly@princeton.edu">kdaly@princeton.edu</a><br>
To: <a class="ecxmoz-txt-link-abbreviated" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
Subject: [gmx-users] Overflow problem with test-particle insertion<br>
  <br>
Hello Gromacs users,<br>
  <br>
I sent a message to the list in June describing what appeared to be a
float overflow issue with the energy calculation for test-particle
insertions: <a href="http://lists.gromacs.org/pipermail/gmx-users/2010-June/052213.html" target="_blank">http://lists.gromacs.org/pipermail/gmx-users/2010-June/052213.html</a>.
  <br>
  <br>
I have recently tried the test-particle insertion mode in
Gromacs-4.5.1, and it seems the problem is still there. Does anyone
know how to work around or fix this problem without using tabulated
potentials?<br>
  <br>
-Kevin<br>
  <br>
-- gmx-users mailing list <a class="ecxmoz-txt-link-abbreviated" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>
<a class="ecxmoz-txt-link-freetext" href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a>
Please search the archive at
<a class="ecxmoz-txt-link-freetext" href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!
Please don't post (un)subscribe requests to the list. Use the www
interface or send it to <a class="ecxmoz-txt-link-abbreviated" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.
Can't post? Read <a class="ecxmoz-txt-link-freetext" href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a> <br>
-- gmx-users mailing list <a class="ecxmoz-txt-link-abbreviated" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>
<a class="ecxmoz-txt-link-freetext" href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a>
Please search the archive at
<a class="ecxmoz-txt-link-freetext" href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!
Please don't post (un)subscribe requests to the list. Use the www
interface or send it to <a class="ecxmoz-txt-link-abbreviated" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.
Can't post? Read <a class="ecxmoz-txt-link-freetext" href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a> </blockquote>
<br>
<pre class="ecxmoz-signature">-- <br>Javier CEREZO BASTIDA<br>Estudiante de Doctorado<br>---------------------<br>Dpto. Química-Física<br>Universidad de Murcia<br>30100 MURCIA (España)<br>Tlf.(+34)868887434<br></pre>


<br>-- 
gmx-users mailing list    gmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-request@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists                                               </body>
</html>