[gmx-developers] ensemble distance restraints confusion

Berk Hess hess at cbr.su.se
Thu Jun 3 11:56:42 CEST 2010


Hi,

I fixed the bug.

There are two ensemble averaging situations:
multiple molecules within a simulation, this is set by the mdp option
(currently not functional)
one molecule over multiple simulations, this is (now always) set by the
env.var.

I guess we should add a note on this in the manual and/or mdp_opt.html

Berk

David van der Spoel wrote:
> I'm investigating http://bugzilla.gromacs.org/show_bug.cgi?id=408
> where the problem is that when one has distance restraints and perfoms
> a replica exchange simulation, ones restraints are treated as ensemble
> restraints. The reason for this is the following code:
>
>     if (cr->ms)
>     {
>         ptr = getenv("GMX_DISRE_ENSEMBLE_SIZE");
> #ifdef GMX_MPI
>         if (ptr == NULL)
>         {
>             dd->nsystems          = cr->ms->nsim;
>             dd->mpi_comm_ensemble = cr->ms->mpi_comm_masters;
>             if (fplog)
>             {
>                 fprintf(fplog,"Will apply ensemble averaging over %d
> systems\n",
>                         dd->nsystems);
>             }
>         }
>
> That is, the decision whether or not to do ensemble restraints is
> determined by an environment variable and the fact that we are using
> replica exchange. Later, the dd->nsystems is used like:
>
> #ifdef GMX_MPI
>     if (dd->nsystems > 1)
>     {
>         gmx_sum_comm(2*dd->nres,Rt_6,dd->mpi_comm_ensemble);
>     }
> #endif
>
> Now the strange thing is that there is an mdp option for this, but
> that is not allowed (this code is from further up in disre.c):
>     if (ir->eDisre == edrEnsemble)
>     {
>         gmx_fatal(FARGS,"Sorry, distance restraints with ensemble
> averaging over multiple molecules in one system are not functional in
> this version of GROMACS");
>     }
>
> So it seems there is hidden functionality for doing ensemble
> restraints, but it can be turned on by accident. I propose we should
> either enable it through the mdp file or not all.
>
>




More information about the gromacs.org_gmx-developers mailing list