Questions regarding AWH and comparison to MBAR

GROMACS version: 2025.4
GROMACS modification: No

Hello fellow researchers,

I am currently figuring out wheatear the implemented AWH method is suited for the efficient calculation of the solvation free energy (SFE) simulations in our research group or not. Up to now, we are using Multistate Bennett Acceptance Ratio (MBAR) method as implemented in Alchemical Analyis and a custom tool for the optimization of amount and position of intermediate lambda states. I am looking at the performance and accuracy of reaching a reported experimental value. For this, I have chosen acetylsalicylic acid in TIP3P water as a first simple test system, using the GAFF2/RESP force field in both simulations. The initial distribution of the intermediate states is as follows:

vdw-lambdas   = 0.0 0.2 0.4 0.6 0.8 1.0 1.0 1.0 1.0 1.0 1.0 1.0
coul-lambdas  = 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.4 0.6 0.8 1.0 1.0

From an equilibrated system onwards the MBAR approach takes 25 ns for its optimization, followed by five independent production runs of 1 ns per lambda state (13), resulting in 90 ns total simulation time. To make a fair comparison, I decided to match the length of the AWH simulationen with the 90 ns from the MBAR approach. Therefore, I performed five independent AWH simulations with 4 walkers using awh-share-multisim for 4.5 ns each. Details of the AWH settings are posted below. Most of the settings are based on the tutorial on binder. An exemplary log and the mdp files are attached to this post.

production_mbar.mdp (5.5 KB)
awh_no_covering-diameter.log (163.9 KB)
awh_no_covering-diameter.mdp (5.6 KB)
awh_no_covering-diameter_t4500.xvg (1.7 KB)
awh_with_covering-diameter.log (163.9 KB)
awh_with_covering-diameter.mdp (5.6 KB)
awh_with_covering-diameter_t4500.xvg (1.7 KB)

awh                         = yes
awh-potential               = umbrella
awh-nstout                  = 50000
awh-nbias                   = 1
awh-nstsample               = 50
awh-nsamples-update         = 10
awh1-equilibrate-histogram  = no
awh1-target                 = constant
awh1-growth                 = exp-linear
awh1-ndim                   = 1
awh1-dim1-coord-provider    = fep-lambda
awh1-dim1-coord-index       = 1
awh1-dim1-start             = 0
awh1-dim1-end               = 11
awh1-dim1-diffusion         = 0.001
awh1-error-init             = 10
awh-share-multisim          = yes
awh1-share-group            = 1

1. How do I choose an appropiate covering diameter?
At first, I did not specify a covering diameter, which resulted in the following warning:

WARNING 1 [file awh.mdp, line 113]: When simulations share an AWH bias, it is strongly recommended to use a non-zero covering diameter.

I came across a forum post, in which Magnus Lundborg suggested a value of 8 nm for a lipid membrane system. But the use case was totally different from mine. I was wondering you can suggest a quantity that I can relate this covering diameter to?

Nevertheless, I have run two sets of simulations to get a first impression of this parameter. One with the supressed warning (i.e. a covering diameter of zero) and one simulation with the suggested 8 nm. For each run I plotted the latest awh_t4500.xvg and the development of the SFE result (i.e. the difference of the first and last value of the column PMF) for each timestep.

AWH simulation without covering diameter

Regarding the first plot, I am not entirely sure what to focus on beyond the difference between the first and last lambda state. From what I recall, the friction metric can be interpreted as a measure of sampling efficiency. Does this imply that sampling at lambda state 1 is less efficient? If so, what methods are typically used to improve sampling in these regions?

The second plot shows the convergence of five independent runs toward a experimental reference and the block average (red) of the solvation free energy after 90 ns total simulation time). It seems that there is still a small drift and convergence isn’t reached yet. I am considering to extend the simulation time by 20-30 %.

AWH simulation with covering diameter of 8 nm

Method Length SFE (kJ/mol) Est. core time
MBAR 90 ns -44.80 ± 0.82 ~ 450 hours
AWH (covering diameter = 0 nm) 90 ns -44.14 ± 0.99 ~ 890 hours
AWH (covering diameter = 8 nm) 90 ns -43.56 ± 1.23 ~ 887 hours

The comparison of core times suggests that the cover diameter has no noticeable impact on the required computational resources. While the MBAR approach requires roughly half the core time, this difference should be interpreted with caution, as the simulation setups are not fully identical. In particular, different pressure-coupling schemes were employed, the MBAR simulations did not utilize all available cores and were run on GROMACS 2023.0 instead of GROMACS 2025.4.


2. Unclear statement about lambda components
In each log file I find print statements of the so-called current vector of lambda components every few steps. For me it is unclear, what exactly this means.

Current vector of lambda components:[     0.0000     0.0000     0.6000     1.0000     0.0000     0.0000     0.0000 ]

I first thought this directly relates to the intermediate states I specified in the mdp file with vdw-lambdas or coul-lambdas, but the length of the vector does not match. Additionally, only the third and fourth element of the vector are changing during the simulation.

3. Am I right to assume that this vector gives me information about the type of lambda? (e.g. vdw-lambdas, coul-lambdas, bonded-lambdas, restraint-lambdas, …) I then would interpret that the two changing elements of the vector somehow relate to the specified vdw-lambdas or coul-lambdas while the non-changing elements relate to the non-specified lambdas. What exactly do the numbers refer to?

4. Does AWH take into account the sequential activation of Van der Waals and Coulomb interactions? As you may know it is common practice that you first gradually scale vdw interactions, before touching coulomb interactions when using MBAR (and others). I was wondering if this is taken into account or if this is even relevant (due to the different nature of the method)?


5. Is there something like a ‘final lambda distribution’?
If so, how do I access that?


6. Do you have suggestions/experience on the ratio of number of walkers and OpenMP threads? For now, I only used one node with 96 physical cores and assigned 24 threads to each of the four walkers. I know this is much trial and error, I’m just curious if you have a suggestion here.


Thank you for taking the time to read this rather long post. I look forward to any comments!

  1. I have never thought about the cover diameter for AWH lambda coordinates. I would think this is not so critical in solvation free-energy studies. My general suggestion would be to run something like 4 independent simulations, so you can get a reasonable error estimate. If time to solution is not critical, you can run one walker per simulation, which simplifies things.
  2. The lambda components are a list of all components that can be set independently. Now I don’t recall if the order is documented somethere. VdW and Coulomb are two of these.
  3. Yes.
  4. AWH just moves between the lambda states you defined in the mdp file. So yes.
  5. Yes. gmx awh will output that.
  6. I would try to use a single walker, until the single walker simulation doesn’t scale well anymore and then add a walker.
1 Like

I think I may have been to stuck to MBAR calculations here and/or have had a false understanding of the lambda pathing with AWH. When I asked for a final lambda distribution I was asking for something like I defined in the mdp file, but with adjusted numbers. In the mdp file I defined following lambda states:

#lambda state   0   1   2   3   4   5   6   7   8   9   10  11
vdw-lambdas   = 0.0 0.2 0.4 0.6 0.8 1.0 1.0 1.0 1.0 1.0 1.0 1.0
coul-lambdas  = 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.4 0.6 0.8 1.0

I can imagine that the output of the gmx mdrun - if lets say the third element is related to coulomb and the fourth to vdw - then this would relate to the lambda state number 7 in the mdp file, as vdw interactions are already fully scaled (\lambda_\mathrm{vdw}=1.0), while coulomb are restrained at \lambda_\mathrm{coul}=0.2.

#                                              coul vdw
Current vector of lambda components:[0.0  0.0  0.2  1.0  0.0  0.0  0.0]

As the values of the elements in these lambda vector doesn’t show any values or combinations of \lambda_\mathrm{vdw}, \lambda_\mathrm{coul} other than defined in the mdp file (in any gmx mdrun log), I assume that moving between the defined lambda states here means moving from one state to the other, without visiting the possible states in between (which is what I assumed in the first place). Am I right?

Regarding gmx awh; I used this command gmx_mpi awh -s awh.tpr -more -f awh.edr -o awh-data/awh.xvg to make these plots. If I am understanding that correctly, the plots in the middle show that the AWH simualtion spend more effort to sample at \lambda_0 and \lambda_1 than e.g. \lambda_1, is that correct?

The plots for different walkers within one run are the same (due to the shared group within awh-share-multisim), but for different runs they can be completely different. Can we draw any conclusions from that? Such as the independent runs did not run for enough time. In the webinar on YouTube, I saw that you simulate several hundred ns, which would be quite a lot compared to the effort required for MBAR simulations for solvation free energy simulations.

I am waiting for the results of the extended simulations to check for that.


Regarding your question here, I’ll report back as soon as I’ve had a chance to look into it.

No lambda values in between the 11 are used.

Indeed more time is spent at index 0. This will even out over time. Not that this is not an issue, as long as all values are sampled to some extent.

How long the simulation needs to be depends completely on your system. In our experience the total simulation time with AWH is similar to or slightly lower than the sum of the times of simulations for BAR.