[gmx-developers] Contribution of inter-molecular distance restraints to the virial

Berk Hess hess at kth.se
Tue May 5 10:13:19 CEST 2015


For all normal bonded and non-bonded interactions the virial 
contribution is determined "automatically" in calc_virial. This is done 
using a single sum and so called shift forces (see manual).
The COM pull force is special and is added after calc_virial and the 
virial contribution is (has to be) calculated separately.



On 05/05/2015 09:32 AM, Alexander Kuhn wrote:
> Hi,
> we use half-harmonic distance restraints between COM of a solute and a
> number of waters around it.
> Does Gromacs (gromacs-4.6.3) account for the contribution of these
> inter-molecular distance restraints to the virial?
> Where can it be found/included in the code? In disre.c ?
> We found the virial contribution to the pull code in pull.c:
> if (vir && bMaster) {
>             /* Add the pull contribution to the virial */
>             for(j=0; j<DIM; j++)
>             {
>                 for(m=0; m<DIM; m++)
>                 {
>                     vir[j][m] -= 0.5*f[j]*r_ij[g][m];
>                 }
>             }
> Can it be done in a similar way for the distance restraints?
> Thanks, Alex

More information about the gromacs.org_gmx-developers mailing list