<div dir="ltr">Hi,<div><br></div><div>See e.g. the use of fshift in ta_disres in disre.c. These "shift forces" 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 <<a href="mailto:hess@kth.se">hess@kth.se</a>> 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->fshift) before calc_virial is called are accounted for "automatically".<br>
<br>
Berk<br>
<br>
On 2015-05-08 10:37, Alexander Kuhn wrote:<br>
> Hi,<br>
><br>
> we understand it so far.<br>
> But are distance restraints considered as<br>
> 'normal' bonded interactions in this respect?<br>
> We can't find it in calcvir.c.<br>
><br>
> Cheers,<br>
> Alex<br>
><br>
><br>
>> Hi,<br>
>><br>
>> For all normal bonded and non-bonded interactions the virial<br>
>> contribution is determined "automatically" in calc_virial. This is done<br>
>> using a single sum and so called shift forces (see manual).<br>
>> The COM pull force is special and is added after calc_virial and the<br>
>> virial contribution is (has to be) calculated separately.<br>
>><br>
>> Cheers,<br>
>><br>
>> Berk<br>
>><br>
><br>
> On 05/05/2015 09:32 AM, Alexander Kuhn wrote:<br>
>>> Hi,<br>
>>> we use half-harmonic distance restraints between COM of a solute and a<br>
>>> number of waters around it.<br>
>>> Does Gromacs (gromacs-4.6.3) account for the contribution of these<br>
>>> inter-molecular distance restraints to the virial?<br>
>>><br>
>>><br>
>>> Where can it be found/included in the code? In disre.c ?<br>
>>><br>
>>> We found the virial contribution to the pull code in pull.c:<br>
>>><br>
>>> if (vir && bMaster) {<br>
>>> /* Add the pull contribution to the virial */<br>
>>> for(j=0; j<DIM; j++)<br>
>>> {<br>
>>> for(m=0; m<DIM; m++)<br>
>>> {<br>
>>> vir[j][m] -= 0.5*f[j]*r_ij[g][m];<br>
>>> }<br>
>>> }<br>
>>> Can it be done in a similar way for the distance restraints?<br>
>>><br>
>>> Thanks, Alex<br>
>>><br>
>>><br>
><br>
><br>
> On 2015-05-05 09:32, Alexander Kuhn wrote:<br>
>> Hi,<br>
>> we use half-harmonic distance restraints between COM of a solute and a<br>
>> number of waters around it.<br>
>> Does Gromacs (gromacs-4.6.3) account for the contribution of these<br>
>> inter-molecular distance restraints to the virial?<br>
>><br>
>><br>
>> Where can it be found/included in the code? In disre.c ?<br>
>><br>
>> We found the virial contribution to the pull code in pull.c:<br>
>><br>
>> if (vir && bMaster) {<br>
>> /* Add the pull contribution to the virial */<br>
>> for(j=0; j<DIM; j++)<br>
>> {<br>
>> for(m=0; m<DIM; m++)<br>
>> {<br>
>> vir[j][m] -= 0.5*f[j]*r_ij[g][m];<br>
>> }<br>
>> }<br>
>> Can it be done in a similar way for the distance restraints?<br>
>><br>
>> 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'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>