<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br><br>&gt; Date: Mon, 9 Feb 2009 12:00:52 -0600<br>&gt; Subject: Re: [gmx-users] shake for water<br>&gt; From: dmobley@gmail.com<br>&gt; To: gmx-users@gromacs.org<br>&gt; <br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; I don't agree.<br>&gt; &gt; It uses the small 1+a approximation for the square.<br>&gt; &gt; Also mdrun prints the rmsd determined with independent code,<br>&gt; &gt; which is consistent with the (correct) tolerance.<br>&gt; <br>&gt; Er, yes, I have not turned on SHAKE -- I'm trying to use LINCS for<br>&gt; bonds to hydrogen within my molecule and SETTLE for the waters. Sorry<br>&gt; for the confusion in my original note.<br>&gt; <br>&gt; Anyway -- any insights as to why I'd only be getting distances correct<br>&gt; to 1e-6 with SETTLE?<br>&gt; <br>&gt; Thanks,<br>&gt; David<br>&gt; <br><br>Ah, now we are talking about something completely different.<br>Settle gets me at least 1e-10.<br>Are you sure your problem is in the water and not in the molecule with LINCS?<br>For LINCS you will need to change lincs_order to at least 8 and lincs_iter to something<br>probably something around 8.<br><br>Berk<br><br><br>&gt; <br>&gt; &gt;<br>&gt; &gt; Berk<br>&gt; &gt;<br>&gt; &gt;&gt; Date: Thu, 5 Feb 2009 22:41:47 +0100<br>&gt; &gt;&gt; From: spoel@xray.bmc.uu.se<br>&gt; &gt;&gt; To: gmx-users@gromacs.org<br>&gt; &gt;&gt; Subject: Re: [gmx-users] shake for water<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Berk Hess wrote:<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; &gt; Date: Thu, 5 Feb 2009 19:35:09 +0100<br>&gt; &gt;&gt; &gt; &gt; From: spoel@xray.bmc.uu.se<br>&gt; &gt;&gt; &gt; &gt; To: gmx-users@gromacs.org<br>&gt; &gt;&gt; &gt; &gt; Subject: Re: [gmx-users] shake for water<br>&gt; &gt;&gt; &gt; &gt;<br>&gt; &gt;&gt; &gt; &gt; David Mobley wrote:<br>&gt; &gt;&gt; &gt; &gt; &gt; All,<br>&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt; &gt;&gt; &gt; &gt; &gt; A quick question on constraints... I'm using TIP4P-Ew in gromacs<br>&gt; &gt;&gt; &gt; &gt; &gt; 3.3.2<br>&gt; &gt;&gt; &gt; &gt; &gt; and am concerned with reproducing energies from another code very<br>&gt; &gt;&gt; &gt; &gt; &gt; precisely for several specific snapshots. I am doing a zero-step<br>&gt; &gt;&gt; &gt; &gt; &gt; mdrun<br>&gt; &gt;&gt; &gt; &gt; &gt; of a setup with one small molecule and two tip4p-ew water molecules.<br>&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt; &gt;&gt; &gt; &gt; &gt; Anyway, I have set the shake tolerance to 1e-12 in the mdp file, but<br>&gt; &gt;&gt; &gt; &gt; &gt; to my surprise the internal water distances are good only to 1e-06<br>&gt; &gt;&gt; &gt; &gt; &gt; and<br>&gt; &gt;&gt; &gt; &gt; &gt; 1e-07. Is this expected behavior? Note that I am running in double<br>&gt; &gt;&gt; &gt; &gt; &gt; precision. I assumed that, er, the distances should converge to the<br>&gt; &gt;&gt; &gt; &gt; &gt; shake tolerance.<br>&gt; &gt;&gt; &gt; &gt; Well, the documentation might be lacking, but the code tells the<br>&gt; &gt;&gt; &gt; &gt; truth.<br>&gt; &gt;&gt; &gt; &gt; It seems that the tolerance is used on the distance squared, which is<br>&gt; &gt;&gt; &gt; &gt; consistent with your observation of a precision of 1e-6. So try 1e-24.<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; No, it is not the square.<br>&gt; &gt;&gt; &gt; The code does a small 'a' approximation: (1+a)^2=1+2a+a^2 is approx<br>&gt; &gt;&gt; &gt; 1+2a.<br>&gt; &gt;&gt; &gt; I have also tested/benchmark shake in gromacs for my first lincs paper<br>&gt; &gt;&gt; &gt; and the plincs paper and it always behaved the way I thought it would.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; First we compute the inverse square of the shake distance dA in tt[ll]<br>&gt; &gt;&gt; for each shake pair:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; if (bFEP)<br>&gt; &gt;&gt; toler = sqr(L1*ip[type].shake.dA + lambda*ip[type].shake.dB);<br>&gt; &gt;&gt; else<br>&gt; &gt;&gt; toler = sqr(ip[type].shake.dA);<br>&gt; &gt;&gt; dist2[ll] = toler;<br>&gt; &gt;&gt; tt[ll] = 1.0/(toler*tol2);<br>&gt; &gt;&gt; }<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Then in the shake iteration we compute the difference between the<br>&gt; &gt;&gt; squared distances (variable diff below):<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; tx = xp[ix]-xp[jx];<br>&gt; &gt;&gt; ty = xp[iy]-xp[jy];<br>&gt; &gt;&gt; tz = xp[iz]-xp[jz];<br>&gt; &gt;&gt; rpij2 = tx*tx+ty*ty+tz*tz;<br>&gt; &gt;&gt; toler = dist2[ll];<br>&gt; &gt;&gt; diff = toler-rpij2;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Now we multiply the diff with tt[ll], in other words we get<br>&gt; &gt;&gt; iconv = (1-rpij2/dist2)/(2 tol)<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; /* iconv is zero when the error is smaller than a bound */<br>&gt; &gt;&gt; iconv = fabs(diff)*tt[ll];<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; In other words, the tolerance operates on the squared distance.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; The problem is not that you need more iterations than 1000?<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; And why not use settle that does it right at full precision at once?<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Berk<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; &gt;<br>&gt; &gt;&gt; &gt; &gt; &gt;<br>&gt; &gt;&gt; &gt; &gt; &gt; Thanks,<br>&gt; &gt;&gt; &gt; &gt; &gt; David<br>&gt; &gt;&gt; &gt; &gt; &gt; _______________________________________________<br>&gt; &gt;&gt; &gt; &gt; &gt; gmx-users mailing list gmx-users@gromacs.org<br>&gt; &gt;&gt; &gt; &gt; &gt; http://www.gromacs.org/mailman/listinfo/gmx-users<br>&gt; &gt;&gt; &gt; &gt; &gt; Please search the archive at http://www.gromacs.org/search before<br>&gt; &gt;&gt; &gt; posting!<br>&gt; &gt;&gt; &gt; &gt; &gt; Please don't post (un)subscribe requests to the list. Use the<br>&gt; &gt;&gt; &gt; &gt; &gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; &gt;&gt; &gt; &gt; &gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br>&gt; &gt;&gt; &gt; &gt;<br>&gt; &gt;&gt; &gt; &gt;<br>&gt; &gt;&gt; &gt; &gt; --<br>&gt; &gt;&gt; &gt; &gt; David van der Spoel, Ph.D., Professor of Biology<br>&gt; &gt;&gt; &gt; &gt; Molec. Biophys. group, Dept. of Cell &amp; Molec. Biol., Uppsala<br>&gt; &gt;&gt; &gt; &gt; University.<br>&gt; &gt;&gt; &gt; &gt; Box 596, 75124 Uppsala, Sweden. Phone: +46184714205. Fax: +4618511755.<br>&gt; &gt;&gt; &gt; &gt; spoel@xray.bmc.uu.se spoel@gromacs.org http://folding.bmc.uu.se<br>&gt; &gt;&gt; &gt; &gt; _______________________________________________<br>&gt; &gt;&gt; &gt; &gt; gmx-users mailing list gmx-users@gromacs.org<br>&gt; &gt;&gt; &gt; &gt; http://www.gromacs.org/mailman/listinfo/gmx-users<br>&gt; &gt;&gt; &gt; &gt; Please search the archive at http://www.gromacs.org/search before<br>&gt; &gt;&gt; &gt; posting!<br>&gt; &gt;&gt; &gt; &gt; Please don't post (un)subscribe requests to the list. Use the<br>&gt; &gt;&gt; &gt; &gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; &gt;&gt; &gt; &gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; ------------------------------------------------------------------------<br>&gt; &gt;&gt; &gt; Express yourself instantly with MSN Messenger! MSN Messenger<br>&gt; &gt;&gt; &gt; &lt;http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/&gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; ------------------------------------------------------------------------<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; _______________________________________________<br>&gt; &gt;&gt; &gt; gmx-users mailing list gmx-users@gromacs.org<br>&gt; &gt;&gt; &gt; http://www.gromacs.org/mailman/listinfo/gmx-users<br>&gt; &gt;&gt; &gt; Please search the archive at http://www.gromacs.org/search before<br>&gt; &gt;&gt; &gt; posting!<br>&gt; &gt;&gt; &gt; Please don't post (un)subscribe requests to the list. Use the<br>&gt; &gt;&gt; &gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; &gt;&gt; &gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; --<br>&gt; &gt;&gt; David van der Spoel, Ph.D., Professor of Biology<br>&gt; &gt;&gt; Molec. Biophys. group, Dept. of Cell &amp; Molec. Biol., Uppsala University.<br>&gt; &gt;&gt; Box 596, 75124 Uppsala, Sweden. Phone: +46184714205. Fax: +4618511755.<br>&gt; &gt;&gt; spoel@xray.bmc.uu.se spoel@gromacs.org http://folding.bmc.uu.se<br>&gt; &gt;&gt; _______________________________________________<br>&gt; &gt;&gt; gmx-users mailing list gmx-users@gromacs.org<br>&gt; &gt;&gt; http://www.gromacs.org/mailman/listinfo/gmx-users<br>&gt; &gt;&gt; Please search the archive at http://www.gromacs.org/search before posting!<br>&gt; &gt;&gt; Please don't post (un)subscribe requests to the list. Use the<br>&gt; &gt;&gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; &gt;&gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Express yourself instantly with MSN Messenger! MSN Messenger<br>&gt; &gt; ________________________________<br>&gt; &gt; See all the ways you can stay connected to friends and family<br>&gt; &gt; _______________________________________________<br>&gt; &gt; gmx-users mailing list    gmx-users@gromacs.org<br>&gt; &gt; http://www.gromacs.org/mailman/listinfo/gmx-users<br>&gt; &gt; Please search the archive at http://www.gromacs.org/search before posting!<br>&gt; &gt; Please don't post (un)subscribe requests to the list. Use the<br>&gt; &gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; &gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br>&gt; &gt;<br>&gt; _______________________________________________<br>&gt; gmx-users mailing list    gmx-users@gromacs.org<br>&gt; http://www.gromacs.org/mailman/listinfo/gmx-users<br>&gt; Please search the archive at http://www.gromacs.org/search before posting!<br>&gt; Please don't post (un)subscribe requests to the list. Use the <br>&gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br><br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body>
</html>