Feature #2946

Enable AWH periodicity for pull-geometry=direction

Added by Semen Yesylevskyy 12 days ago. Updated 6 days ago.

Fix uploaded
Target version:


Since "period" keyword is now removed from awh it is not clear for the user how to define the periodic awh coordinate. Intuitively one may try direction-periodic, but again, this geometry is now not supported. The grompp also reports nothing about detecting periodicity in awh coordinates, so it is absolutely obscure for the user what is going on under the hood.
I can't figure out myself how to enable peridicity and suspect that other users will encounter exactly the same problem. (2.02 MB) Semen Yesylevskyy, 05/14/2019 09:36 AM


#1 Updated by Semen Yesylevskyy 11 days ago

Digging the source code shows that function get_pull_coord_period() deduces periodicity for direction-periodic geometry:

if (pcrd_params->eGeom == epullgDIRPBC)...

However, direction-periodic is now forbidden for awh, so this code is dead and will never be called.

#2 Updated by Paul Bauer 11 days ago

The code is only left in master because the changes from 2019 have not been merged in yet. In 2019 this code path has been removed already.

#3 Updated by Semen Yesylevskyy 10 days ago

Ok, but what about the question itself - how can the user define the periodic awh coordinate, say, across the simulated membrane? When doing umbrella sampling this is done by -cycl flag to gmx wham, but it is completely obscure how to achieve the same with awh.

#4 Updated by Berk Hess 8 days ago

The only AWH dimensions that are periodic are dihedrals. Maybe this should be added to the documentation.

But I don't know what you mean exactly with periodic. I would argue that pull geometry "direction-periodic" is "less periodic" than "direction", since it unwraps the distance, "direction" is purely periodic. The distance for geometry "direction" is computed taking PBC into account, but AWH currently does not make such a coordinate periodic. I think AWH could actually do this. We should either have a check to disallow the AWH interval to be as large as the box or implement periodicity.

#5 Updated by Semen Yesylevskyy 8 days ago

Under peridicity I mean making start and end points of interval the same point in PMF computation (an equivalent of -cycl option of gmx wham).
Direction-periodic allowed doing this accross the box in awh. Now this possibility is lost and this is a big omission in functionality. For example awh is now useless for lipid membranes where both sides of the membrane are the same medium (and one uses -cycl in gmx wham).

Thus my suggestion is to keep this possibility. Ideally it should be an option awh1-dim1-cycl which works exactly the same as -cycl flag for wham.

#6 Updated by Berk Hess 8 days ago

  • Tracker changed from Bug to Feature
  • Subject changed from Not clear how to define periodic awh coordinate to Enable AWH periodicity for pull-geometry=direction
  • Affected version deleted (2019.2)

OK. But you are then asking for the same thing I suggested: make pull geometry "direction" periodic in AWH when needed.
I will try to implement that. For a proper set up case this just means setting the period in the AWH code, but some checks might be needed to catch malformed setups.

#7 Updated by Berk Hess 8 days ago

One limitation is that you can't have pressure scaling for the periodic dimension.

#8 Updated by Semen Yesylevskyy 8 days ago

Is there a possibility to allow periodicity for arbitrary pull vectors (not aligned with one of the axes?). I'm not aware of internals of course, but spanning the whole box and only along one of the axes seems to be unnecesarily strict limitation.
From the point of view of the user all methods of computing PMF (umbrella sampling+wham, awh) should be able to produce comparable results. In wham one can define any pull vector. It would be very nice to be able doing the same in awh.

#9 Updated by Berk Hess 8 days ago

  • Category set to mdrun
  • Status changed from New to Fix uploaded
  • Assignee set to Berk Hess
  • Target version set to 2019.3

I uploaded a fix that makes direction periodic when needed, please test.

#10 Updated by Semen Yesylevskyy 7 days ago

It doesn't work for me. See attached example. The box size on Z is 10.9827 and awh range is (-6:6). In log file there is still no periodicity:

coord-provider = pull
coord-index = 1
start = -6
end = 6
period = 0

I also tried exact value of 5.49135 - still no periodicity.

(tested with release-2019 branch from git)

#11 Updated by Berk Hess 7 days ago

You need to get the change from gerrit, e.g.:
git fetch "ssh:///gromacs" refs/changes/20/11020/5 && git checkout FETCH_HEAD

#12 Updated by Semen Yesylevskyy 6 days ago

Yes, it seems to work correctly now on my system.

Also available in: Atom PDF