# [gmx-users] RDF(PMF) and Umbrella sampling

Thomas Schlesier schlesi at uni-mainz.de
Tue Jan 10 14:21:08 CET 2012

```The histograms are really crowded, it would be better to plot only the
black one and probably the red one, to see the it better.

Two ideas which can probably solve the problem (ok, both assume, that
the host has a certain shape).

You said you investigate guest-insertion to a host. I would think that
the guest molecule can't bind from all directions to the host.
If the host is 'U' shaped then, the guest can come only from above.

Idea 1:
Take some atoms at the lower part from 'U' as the reference. So you do
not run into the problem with with a zero ref-distance.
Bad thing is, that you would start from all over again.

Idea 2: we make some tricks to get negative distances. I think the big
problem is that from pull_geometry=distance, you get always positive
distances
(really, only a idea, WHAM could make problems, i don't really know how
WHAM and the GROMACS implementation of it work):
Instead of using pull_geometry=distance, use pull_geometry=position.
Define a plane at zero ref-distance, which is roughly orthogonal to the
path which the guest can enter.
In my example 'U-'  -  would be the plane.
From the pullx.xvg you can calculate the pull-ref distance (which is
always positive). Then you can add a sign to the distances, depending if
the guest is above or below the plane. (Probably it is better to take
only the part of the pull-ref distance which is orthogonal to the plane.
Then you should also modify the forces in the same way.)
From this distances you can also calculate pullf.xvg.
Now you must create a *.tpr for this windows with
pull_geometry=distance, instead of use pull_geometry=position (WHAM
doesn't like position, as far as i know).
Now start WHAM and pray that it will work. All we have done is, that we
have now negative distances in pullx.xvg. I don't know if the fact that
we now have negative numbers makes any problem for WHAM (from the *.tpr
we would expect that we have only positive numbers).

Wish you luck.
greetings
thomas

> Date: Tue, 10 Jan 2012 10:47:43 +0000
> From: Gavin Melaugh<gmelaugh01 at qub.ac.uk>
> Subject: Re: [gmx-users] RDF(PMF) and Umbrella sampling
> To: Discussion list for GROMACS users<gmx-users at gromacs.org>
> Message-ID:<4F0C174F.2050901 at qub.ac.uk>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Justin
>
> Again, many thanks for the reply.
> So when the COM distance changes sign, what effect does that have on the
> distribution of the COM distance about the mean value for that window
> i.e. If say my ref dist in 0 nm and the umbrella sampling allows the
> distance to sample distances say at 0.02 nm to -0.02nm. What happens to
> negative values? Obviously they are not counted as negative in the
> distribution or else it would be centred at zero/
>
> Cheers
>
> Gavin
>
> Justin A. Lemkul wrote:
>>
>>
>> Gavin Melaugh wrote:
>>> Hi Justin
>>>
>>> Thanks very much. One last question. What do you mean when you say "COM
>>> reference distance is changing signs"? I thought  the COM distance was
>>> the absolute distance between the two groups and therefore cannot be
>>> negative?
>>>
>>
>> The pull code deals in vectors.  Signs can change.  The use of
>> "distance" as a geometry is perhaps somewhat misleading.
>>
>> -Justin
>>
>>> Cheers
>>>
>>> Gavin
>>>
>>>> Hi Gavin,
>>>>
>>>> A question arose for me: why did you consider the (rate = 0)?
>>>>
>>>> Dariush
>>>>
>>>>
>>>> On Fri, Jan 6, 2012 at 11:47 AM, Gavin Melaugh<gmelaugh01 at qub.ac.uk
>>>> <mailto:gmelaugh01 at qub.ac.uk>>  wrote:
>>>>
>>>>      Hi Justin
>>>>
>>>>      Just a quick clarification regarding my previous point. With
>>>>      geometry =
>>>>      distance, and pull_dim =Y Y Y . Is the pull_group sampling all
>>>>      dimensions equally (or without prejudice) about pull_init ?  And
>>>>      iN your
>>>>      first reply what did you mean about by "straight pull" ?
>>>>
>>>>      Cheers
>>>>
>>>>      Gavin
>>>>
>>>>      Justin A. Lemkul wrote:
>>>>      >
>>>>      >
>>>>      >  Gavin Melaugh wrote:
>>>>      >>  Hi Justin
>>>>      >>
>>>>      >>  Thanks for the reply. I wanted my "pulling" to be free in all
>>>>      >>  directions, that is in the liquid state with no defined reaction
>>>>      >>  coordinate i.e not along a specific axis. This is why I used
>>>>      geometry =
>>>>      >>  distance. Would you agree with this approach?
>>>>      >
>>>>      >  I suppose there is an argument that can be made for a more free
>>>>      >  approach such as this one, but you're going to get the
>>>> artifact you
>>>>      >  observed the instant your pull group moves past a zero COM
>>>> distance.
>>>>      >  Whether or not this is a significant problem is something you'll
>>>>      have
>>>>      >  to determine.
>>>>      >
>>>>      >  -Justin
>>>>      >
>>>>      >>  By free I mean. The absolute distance between the COG of the
>>>>      ref group
>>>>      >>  and that of the pull group.
>>>>      >>
>>>>      >>  Cheers
>>>>      >>
>>>>      >>  Gavin
>>>>      >>
>>>>      >>  Justin A. Lemkul wrote:
>>>>      >>>
>>>>      >>>  Gavin Melaugh wrote:
>>>>      >>>>  Dear all
>>>>      >>>>
>>>>      >>>>  I have a query regarding umbrella sampling simulations that I
>>>>      have
>>>>      >>>>  carried out to study a dynamical process of a guest inserting
>>>>      into a
>>>>      >>>>  host. I always get get a wall tending off to infinity at or
>>>> just
>>>>      >>>>  before
>>>>      >>>>  the zero distance between the
>>>>      >>>>  two species.
>>>>      >>>>  The process I describe, for one system in particular, happens
>>>>      >>>>  and I have compared the PMF from a non constrained simulation
>>>>      (via the
>>>>      >>>>  RDF and reversible work theorem) and the same PMF from a
>>>> set of
>>>>      >>>>  umbrella sampling
>>>>      >>>>  simulations. They agree quite well but in the non constrained
>>>>      >>>>  simulation
>>>>      >>>>  I get a minimum practically at zero whereas for the umbrella
>>>>      sampling
>>>>      >>>>  the minimum is shifted and there is an infinite wall close to
>>>>      zero.
>>>>      >>>>  This
>>>>      >>>>  wall is not present from the reversible work theorem. Why the
>>>>      infinite
>>>>      >>>>  wall? Why does the black histogram not centre around zero. Is
>>>>      this an
>>>>      >>>>  artefact of the umbrella technique? Please see attached the
>>>>      profile
>>>>      >>>>  from
>>>>      >>>>  the umbrella sampling technique, and the corresponding
>>>>      histograms.
>>>>      >>>>
>>>>      >>>  What's happening is the COM reference distance is changing
>>>>      signs, so
>>>>      >>>  you get an artifact.  The "distance" geometry is relatively
>>>>      inflexible
>>>>      >>>  and is only suitable for straight pulls of continuously
>>>>      increasing or
>>>>      >>>  continuously decreasing COM distance.  You should try using the
>>>>      >>>  "position" geometry instead.  There are some notes that you
>>>>      may find
>>>>      >>>  useful in my tutorial:
>>>>      >>>
>>>>      >>>
>>>>
>>>> http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin/gmx-tutorials/umbrella/05a_pull_tips.html
>>>>
>>>>      >>>
>>>>      >>>
>>>>      >>>
>>>>      >>>  -Justin
>>>>      >>>
>>>>      >>>>  Here is an excerpt from one of the umbrella mdp files.
>>>>      >>>>
>>>>      >>>>  pull        = umbrella
>>>>      >>>>  pull_geometry = distance
>>>>      >>>>  pull_dim = Y Y Y
>>>>      >>>>  pull_start = no
>>>>      >>>>  pull_ngroups = 1
>>>>      >>>>  pull_group0 = cage_1
>>>>      >>>>  pull_group1 = tail
>>>>      >>>>  pull_init1 = 0
>>>>      >>>>  pull_rate1 = 0.0
>>>>      >>>>  pull_k1 = 10000
>>>>      >>>>  pull_nstxout = 150
>>>>      >>>>  pull_nstfout = 150
>>>>      >>>>
>>>>      >>>>
>>>>      >>>>  Cheers
>>>>      >>>>
>>>>      >>>>  Gavin
>>>>      >>>>
>>>>      >>>>
>>>>      >>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>      >>>>
>>>>      >>>>
>>>>      >>>>
>>>>      >>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>      >>>>
>>>>      >>>>
>>>>      >>
>>>>      >>
>>>>      >
>>>>
>>>>      --
>>>>      gmx-users mailing list    gmx-users at gromacs.org
>>>>      <mailto:gmx-users at gromacs.org>
>>>>      http://lists.gromacs.org/mailman/listinfo/gmx-users
>>>>      Please search the archive at
>>>>      http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
>>>>      Please don't post (un)subscribe requests to the list. Use the
>>>>      www interface or send it to gmx-users-request at gromacs.org
>>>>      <mailto:gmx-users-request at gromacs.org>.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Kind Regards,