Densityfitting - enforce similarity increase with adaptive force scaling
authorChristian Blau <cblau@gwdg.de>
Tue, 22 Oct 2019 08:55:59 +0000 (10:55 +0200)
committerChristian Blau <cblau@gwdg.de>
Thu, 12 Dec 2019 14:49:41 +0000 (15:49 +0100)
Previous to this patch, the force constant for density guided
simulations with adaptive force constant scaling was scaled up the same
amount that it was scaled down, not resulting in the announced enforced
increase in similarity. Now, the force constant is increased more strongly
than decreased, resulting in the desired enforced increase in similarity.

Change-Id: I5b149c79d91ea9e5ceeb5b0e7dce854bd6f34711

docs/reference-manual/special/density-guided-simulation.rst
src/gromacs/applied_forces/densityfittingforceprovider.cpp

index 36968f2dbe468a5889dfe193686ae2fe6feeadf3..a38825bcb82c01fc517e4a8b6342a2063c5c2f90 100644 (file)
@@ -197,8 +197,8 @@ measures with a time constant :math:`tau` that is given in ps. If the exponentia
 moving average similarity increases, the force constant is scaled down by
 dividing by :math:`1+\delta t_{\mathrm{density}}/tau`, where
 :math:`\delta t_{\mathrm{density}}` is the time between density guided simulation steps.
-Reversely, if similarity between reference and simulated density is decreasing,
-the force constant is increased by multiplying by :math:`1+\delta t_{\mathrm{density}}/tau`.
+Conversely, if similarity between reference and simulated density is decreasing,
+the force constant is increased by multiplying by :math:`1+2\delta t_{\mathrm{density}}/tau`.
 Note that adaptive force scaling does not conserve energy and will ultimately lead to very high
 forces when similarity cannot be increased further.
 
index 106831562de37c10b3d9e98faf16e22a6ffdee99..452361f2097ba464687831ff73d00ea24469cbb1 100644 (file)
@@ -287,7 +287,8 @@ void DensityFittingForceProvider::Impl::calculateForces(const ForceProviderInput
         }
         else
         {
-            state_.adaptiveForceConstantScale_ *= 1._real + expAverageSimilarity_->inverseTimeConstant();
+            state_.adaptiveForceConstantScale_ *=
+                    1._real + 2 * expAverageSimilarity_->inverseTimeConstant();
         }
     }
 }