From afac7a2e54392d8a4dc6256879928ed039053933 Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Mon, 2 Nov 2020 16:53:15 +0100 Subject: [PATCH] Remove TODO regarding AWH cover threshold along lambda axis. The 1.0 factor should be OK for a FEP lambda axis. It should be OK in theory and tests show it works. Change-Id: Iafe39ab0663ec227e96e40f1b2073818610e93ae Closes: #3634 --- src/gromacs/applied_forces/awh/biasstate.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gromacs/applied_forces/awh/biasstate.cpp b/src/gromacs/applied_forces/awh/biasstate.cpp index c248699916..3713c0bbce 100644 --- a/src/gromacs/applied_forces/awh/biasstate.cpp +++ b/src/gromacs/applied_forces/awh/biasstate.cpp @@ -1003,13 +1003,16 @@ bool BiasState::isSamplingRegionCovered(const BiasParams& params, { if (grid.axis(d).isFepLambdaAxis()) { - /* TODO: Verify that a threshold of 1.0 is OK. With a very high sample weight 1.0 can be - * reached quickly even in regions with low probability. Should the sample weight be - * taken into account here? */ + /* Do not modify the weight threshold based on a FEP lambda axis. The spread + * of the sampling weights is not depending on a Gaussian distribution (like + * below). */ weightThreshold *= 1.0; } else { + /* The spacing is proportional to 1/sqrt(betak). The weight threshold will be + * approximately (given that the spacing can be modified if the dimension is periodic) + * proportional to sqrt(1/(2*pi)). */ weightThreshold *= grid.axis(d).spacing() * std::sqrt(dimParams[d].pullDimParams().betak * 0.5 * M_1_PI); } -- 2.22.0