<div dir="ltr">Hi,<div><br></div><div>See e.g. the use of fshift in ta_disres in disre.c. These &quot;shift forces&quot; go into the virial calculation, see Appendix B of the manual.<br><div><br></div><div>Mark</div></div></div><br><div class="gmail_quote">On Fri, May 8, 2015 at 10:49 AM Berk Hess &lt;<a href="mailto:hess@kth.se">hess@kth.se</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
No normal interactions are explicitly listed in calcvir.<br>
Anything forces that are added to the normal force buffer (and<br>
fr-&gt;fshift) before calc_virial is called are accounted for &quot;automatically&quot;.<br>
<br>
Berk<br>
<br>
On 2015-05-08 10:37, Alexander Kuhn wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; we understand it so far.<br>
&gt; But are distance restraints considered as<br>
&gt; &#39;normal&#39; bonded interactions in this respect?<br>
&gt; We can&#39;t find it in calcvir.c.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Alex<br>
&gt;<br>
&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; For all normal bonded and non-bonded interactions the virial<br>
&gt;&gt; contribution is determined &quot;automatically&quot; in calc_virial. This is done<br>
&gt;&gt; using a single sum and so called shift forces (see manual).<br>
&gt;&gt; The COM pull force is special and is added after calc_virial and the<br>
&gt;&gt; virial contribution is (has to be) calculated separately.<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt;<br>
&gt;&gt; Berk<br>
&gt;&gt;<br>
&gt;<br>
&gt; On 05/05/2015 09:32 AM, Alexander Kuhn wrote:<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt; we use half-harmonic distance restraints between COM of a solute and a<br>
&gt;&gt;&gt; number of waters around it.<br>
&gt;&gt;&gt; Does Gromacs (gromacs-4.6.3) account for the contribution of these<br>
&gt;&gt;&gt; inter-molecular distance restraints to the virial?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Where can it be found/included in the code? In disre.c ?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; We found the virial contribution to the pull code in pull.c:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; if (vir &amp;&amp; bMaster) {<br>
&gt;&gt;&gt;             /* Add the pull contribution to the virial */<br>
&gt;&gt;&gt;             for(j=0; j&lt;DIM; j++)<br>
&gt;&gt;&gt;             {<br>
&gt;&gt;&gt;                 for(m=0; m&lt;DIM; m++)<br>
&gt;&gt;&gt;                 {<br>
&gt;&gt;&gt;                     vir[j][m] -= 0.5*f[j]*r_ij[g][m];<br>
&gt;&gt;&gt;                 }<br>
&gt;&gt;&gt;             }<br>
&gt;&gt;&gt; Can it be done in a similar way for the distance restraints?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks, Alex<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; On 2015-05-05 09:32, Alexander Kuhn wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt; we use half-harmonic distance restraints between COM of a solute and a<br>
&gt;&gt; number of waters around it.<br>
&gt;&gt; Does Gromacs (gromacs-4.6.3) account for the contribution of these<br>
&gt;&gt; inter-molecular distance restraints to the virial?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Where can it be found/included in the code? In disre.c ?<br>
&gt;&gt;<br>
&gt;&gt; We found the virial contribution to the pull code in pull.c:<br>
&gt;&gt;<br>
&gt;&gt; if (vir &amp;&amp; bMaster) {<br>
&gt;&gt;             /* Add the pull contribution to the virial */<br>
&gt;&gt;             for(j=0; j&lt;DIM; j++)<br>
&gt;&gt;             {<br>
&gt;&gt;                 for(m=0; m&lt;DIM; m++)<br>
&gt;&gt;                 {<br>
&gt;&gt;                     vir[j][m] -= 0.5*f[j]*r_ij[g][m];<br>
&gt;&gt;                 }<br>
&gt;&gt;             }<br>
&gt;&gt; Can it be done in a similar way for the distance restraints?<br>
&gt;&gt;<br>
&gt;&gt; Thanks, Alex<br>
<br>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* 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>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</blockquote></div>