colvars icon indicating copy to clipboard operation
colvars copied to clipboard

More practical smoothing of changing force constant in restraint

Open jhenin opened this issue 4 years ago • 2 comments

Right now targetForceExponent in restraints smoothes the lambda dependence of the force constant according to: kλ=k0+λ^α(k1−k0) , where k0, kλ, and k1 are the initial, current, and final values of the force constant.

This is ideal when the force constant starts from 0, that is for the coupling transformation. However when doing the uncoupling transformation it would be more convenient to start from λ=1 and decrease it. This can be done explicitly by providing lambdaSchedule, but could be done automatically with a "decreasingLambda" flag. And that would allow for single-stage uncoupling, if anyone ever uses that.

Essentially, the current convention is very convenient in the situation that is not often used in practice.

jhenin avatar May 22 '20 13:05 jhenin

Ideas to improve this:

  1. add a "decoupling" keyword that makes lambda go from 1 to 0. Problem: then the role of forceConstant and targetForceConstant is not very clear.
  2. decide that in the expression kλ=k0+λ^α(k1−k0), k0 is always the smaller value of forceConstant and targetForceConstant, and k1 the larger one.
  3. detect if one of the end points is k=0, because that's what the real use case is, and set that as k0.

jhenin avatar Feb 25 '21 15:02 jhenin

In progress with #485

jhenin avatar Jun 28 '22 14:06 jhenin