openmmtools icon indicating copy to clipboard operation
openmmtools copied to clipboard

Hard-code some parameters in Custom*Force terms for alchemical factory

Open jchodera opened this issue 3 years ago • 1 comments

From @peastman:

Rather than using global parameters for the constants, I suggest hardcoding them in the expression. That is, add softcore_alpha=0.5; softcore_a=1; softcore_b=1; softcore_c=6 to your expression. That will let it optimize much more effectively. For example, it will do the optimization ((1)-(lambda))^(-1+(softcore_b)) = (1-lambda)^(-1+1) = (1-lambda)^0 = 1. With that change, the nans go away.

cc https://github.com/openmm/openmm/issues/2914#issuecomment-724182279

jchodera avatar Nov 10 '20 00:11 jchodera

I have made the changes to address this here #493 . Please use this code if it is helpful.

Cheers, Alex

adw62 avatar Nov 10 '20 11:11 adw62