<div dir="ltr">Hi Mark,<div>Thanks for the response. I found that problem when I tried to see how system will behave with a time-dependent dielectric constant. I added some pieces of code to let the coefficient change with time, and although the function is totally &quot;<span style="color:rgb(33,33,33);font-family:arial,sans-serif;line-height:15px">virtual&quot; in my case</span>, I think there are some systems in nature corresponding to an infinite dielectric constant(like prefect conductor). </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 2, 2013 at 6:36 AM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The real question is what you were trying to achieve with epsilon_r =<br>
0 and coulombtype= PME?<br>
<span class="HOEnZb"><font color="#888888"><br>
Mark<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, Jul 2, 2013 at 10:53 AM, Mark Abraham &lt;<a href="mailto:mark.j.abraham@gmail.com">mark.j.abraham@gmail.com</a>&gt; wrote:<br>
&gt; Thanks for the report. It turns out the problem is much more<br>
&gt; pervasive. I have opened <a href="http://redmine.gromacs.org/issues/1297" target="_blank">http://redmine.gromacs.org/issues/1297</a><br>
&gt; accordingly.<br>
&gt;<br>
&gt; I would guess that you can wrap a similar test for zero around the<br>
&gt; lines that inappropriately divide by zero and achieve what you want.<br>
&gt; Clearly, this has not been tested!<br>
&gt;<br>
&gt; Mark<br>
&gt;<br>
&gt; On Mon, Jul 1, 2013 at 11:23 PM, Mark Tianwu Zang &lt;<a href="mailto:zangtw@gmail.com">zangtw@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Dear all,<br>
&gt;&gt; I found that in force.c line 1324(for gromacs-4.5.7) or line 1966(for<br>
&gt;&gt; gromacs-4.6.2), a variable called &quot;eterm&quot;(for gromacs -4.5) or elfac(for<br>
&gt;&gt; gromacs-4.6) is defined as<br>
&gt;&gt;<br>
&gt;&gt; eterm = ONE_4PI_EPS0/pme-&gt;epsilon_r*tmp1[kx]*denom[kx];<br>
&gt;&gt;<br>
&gt;&gt; or<br>
&gt;&gt;<br>
&gt;&gt; elfac = ONE_4PI_EPS0/pme-&gt;epsilon_r;<br>
&gt;&gt;<br>
&gt;&gt; where pme-&gt;epsilon_r = ir-&gt;epsilon_r, which corresponds to the mdp option:<br>
&gt;&gt; epsilon-r.<br>
&gt;&gt; I have not tested on gromacs-4.6 yet but I have already tested on<br>
&gt;&gt; gromacs-4.5, and as expected, if epsilon-r is made zero in *.mdp, a<br>
&gt;&gt; segmentation fault will appear at function gmx_pme_do. (Since the two pieces<br>
&gt;&gt; of code above are almost the same, I think I probably get the same result<br>
&gt;&gt; for groamcs-4.6).<br>
&gt;&gt; The physical meaning of epsilon-r=0 is that I am only interested in an<br>
&gt;&gt; infinite dieletric system(no Coulomb interactions despite non-zero charges).<br>
&gt;&gt;<br>
&gt;&gt; On the other hand, in forcerec.c:2623(version 4.5) or 1609(verion 4.6),<br>
&gt;&gt; there is another factor: fr-&gt;epsfac defined as below:<br>
&gt;&gt;<br>
&gt;&gt; if(fr-&gt;epsilon_r != 0)<br>
&gt;&gt;  fr-&gt;epsfac = ONE_4PI_EPS0/fr-&gt;epsilon_r;<br>
&gt;&gt; else<br>
&gt;&gt;  fr-&gt;epsfac = 0;<br>
&gt;&gt;<br>
&gt;&gt; which has already considered this possible situation.<br>
&gt;&gt;<br>
&gt;&gt; However, although the meaning of fr-&gt;epsfac is the same as the ones of<br>
&gt;&gt; variable eterm(the first half) and elfac, this factor (fr-&gt;epsfac) will only<br>
&gt;&gt; be used for calculating non-bonded (short-range) Coulomb interaction, bonded<br>
&gt;&gt; 1-4 Coulomb interaction and long-range interaction using reaction field<br>
&gt;&gt; method. For long-range interaction using PME/Ewald method, fr-&gt;epsfac will<br>
&gt;&gt; never be used, and the introduction(actually recalculation..) of eterm/elfac<br>
&gt;&gt; causes the failure of computing PME.<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt; -Mark<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; gmx-developers mailing list<br>
&gt;&gt; <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
&gt;&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
&gt;&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt;&gt; www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
--<br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
Please don&#39;t post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
</div></div></blockquote></div><br></div>