<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Date: Wed, 19 Jan 2011 20:43:20 +0100<br>
From: Berk Hess &lt;<a href="mailto:gmx3@hotmail.com">gmx3@hotmail.com</a>&gt;<br>
Subject: RE: [gmx-users] Important: Bugs in NEMD calculation<br>
To: Discussion list for GROMACS users &lt;<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>&gt;<br>
Message-ID: &lt;COL113-W2019E7174AFFBAEF819A1A8EF60@phx.gbl&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
<br>
<br>
<br>
&gt; Date: Wed, 19 Jan 2011 19:13:12 +0100<br>
&gt; From: <a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a><br>
&gt; To: <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt; Subject: Re: [gmx-users] Important: Bugs in NEMD calculation<br>
&gt;<br>
&gt; On 2011-01-19 18.36, Xiaohu Li wrote:<br>
&gt; &gt; Hi, All,<br>
&gt; &gt;       I&#39;ve found a bug in the NEMD calculation for viscosity. This has<br>
&gt; &gt; been reviewed in /*Hess&#39;s paper at JCP 116 209 2002.*/<br>
&gt; &gt;       The version of gromacs I&#39;m using is the development version.<br>
&gt; &gt; Notice that this version correct a previous but of 4.5.3, where you uses<br>
&gt; &gt; NEMD, both the term V(eq. 21 on Hess&#39;s paper) and 1/eta(shear viscosity<br>
&gt; &gt; inverse) are supposed to be written to the *.edr file, however,<br>
&gt; &gt; the 4.5.3 versions does not have this. This version can be retrieved at<br>
&gt; &gt; <a href="http://repo.or.cz/w/gromacs.git/commit/c83de86d65ce7135be6cef15e9100d7516e6d9a7" target="_blank">http://repo.or.cz/w/gromacs.git/commit/c83de86d65ce7135be6cef15e9100d7516e6d9a7</a><br>
&gt; &gt; *However, even this version is buggy since eta=A*rho/(V*k**2)(eq. 20<br>
&gt; &gt; Hess&#39;s paper)*. *I have performed simulation and has found out that the<br>
&gt; &gt; V and eta which are written in *edr file does not match according to the<br>
&gt; &gt; formula, a little further check on the source code mdebin.c under the<br>
&gt; &gt; directory src/mdlib shows that it is actually calculating<br>
&gt; &gt; eta=A*Volume/(V*k**2) where density of rho should have been used. (This<br>
&gt; &gt; is at line 755 of mdebin.c ).<br>
&gt; &gt;      I hope everyone who is using this can be aware of this, if you ever<br>
&gt; &gt; used this code to produce data, the V is correct from *edr, however, you<br>
&gt; &gt; need to manuelly get your eta using the above formula.<br>
&gt; &gt;      For the GMX developers, I hope anyone of you can correct this bug.<br>
&gt; &gt;<br>
<br>
I fixed this bug recently is the git release-4-5-patches branch.<br>
You can get the fix from git and it will be in the 4.5.4 release<br>
(no date yet).<br></blockquote><div>Which one are you referring to? The one I got is the one you uploaded that fixed the zero viscosity and 2*cosZ*vel-x in edr file.<br>This bug refers the wrong calculation of 1/eta.<br>
 <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
&gt; Thanks for pointing that out. There also is a small issue in that the<br>
&gt; volume is computed for a rectangular box<br>
&gt;          vol  = box[XX][XX]*box[YY][YY]*box[ZZ][ZZ];<br>
&gt;          dens = (tmass*AMU)/(vol*NANO*NANO*NANO);<br>
&gt;<br>
&gt; which would be incorrect for a non-rectangular box. You should however<br>
&gt; use a rectangular box for this kind of calculations, although this is<br>
&gt; not enforced by grompp.<br>
<br>
No.<br>
That formula is correct for any triclinic box!<br>
<br>
Berk<br>
<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Xiaohu<br>
&gt; &gt; *<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; David van der Spoel, Ph.D., Professor of Biology<br>
&gt; Dept. of Cell &amp; Molec. Biol., Uppsala University.<br>
&gt; Box 596, 75124 Uppsala, Sweden. Phone:        +46184714205.<br>
&gt; <a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>    <a href="http://folding.bmc.uu.se" target="_blank">http://folding.bmc.uu.se</a><br>
&gt; --<br>
&gt; gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
&gt; Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt; www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
&gt; Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.gromacs.org/pipermail/gmx-users/attachments/20110119/1ffc9f59/attachment.html" target="_blank">http://lists.gromacs.org/pipermail/gmx-users/attachments/20110119/1ffc9f59/attachment.html</a><br>

<br>
------------------------------<br>
<font color="#888888"><br>
--<br>
gmx-users mailing list<br>
<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
<br>
End of gmx-users Digest, Vol 81, Issue 127<br>
******************************************<br>
</font></blockquote><br></div><br>