proteneer / timemachine

Differentiate all the things!
Other
140 stars 17 forks source link

Implement lambdas #74

Closed proteneer closed 5 years ago

proteneer commented 5 years ago

I've been digging into the Alchemistry Wiki and the excellent tutorials written by @jchodera. There are some advantages I see of doing potentials that take in a lambda variable in autodiff:

  1. Automatically support regimes like TI since we can compute dU/dLambda with perfect efficiency since it maps F: R^1 -> R^1 (lambda -> energy).
  2. Differentiable free energy calculations coupled with TI - allowing us to automatically train forcefield parameters with respect to the relative free energy.

On the implementation side of things, presumably we want to be able to support both decoupling and annihilation. Since I'm in the midst of doing a port to jax, it might be a good idea to think about how we want to support these use case.

In particular - we'd want to be flexible enough to support both decoupling and annihilation. Open to ideas on the API side of things for how this should be done.

proteneer commented 5 years ago

Softcore aside - are there any other functional forms that need a non-linear transformation? If so I'll likely just make a custom softcore potential that directly bakes-in the lambda.

proteneer commented 5 years ago

Looks like only lambdas I need to worry about for now are LJ612 softcores and ES (if doing one-stage)

jchodera commented 5 years ago

Most of these alchemistry tutorials were written by @lnaden!

jchodera commented 5 years ago

You may also need "softcore" bonds (or some other optimal bond scheme) if you want to break or make bonds. https://pubs.acs.org/doi/abs/10.1021/acs.jcim.5b00057

proteneer commented 5 years ago

This will be done via the 4D approach.