proteneer / timemachine

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

Increase which chiral dummy groups can be turned on #1256

Closed proteneer closed 6 months ago

proteneer commented 7 months ago

This PR hopes to address the slow down introduced by chiral restraints (without disabling them). The basic PR operates as follows:

1) Identify additional chiral restraints that may involve >2 core atom that can be turned on. This essentially proceeds via a symmetry argument. p0_restricted -> p0_restraint -> p1_restraint -> p1_restricted -> p1_unrestricted (where the contribution from the final stage is exactly -beta^(-1) ln(2)) 2) We identify all chiral 4-atom centers that can be converted effectively without staggering the angle terms, in particular, for a given cijkl center, there are 4 chiral volumes induced: {cijk, cijl, cikl, cjkl}, which are fully turned on at one end-state, if just one of these are present at the other end state, then we can safely turn on the all the other chiral volumes. i.e. suppose cjkl is present at both end-states, then it's safe to turn on {cijk, cijl, cikl} after all the bond terms have been turned on, without staggering the rest.

proteneer commented 6 months ago

Note to self - add one more test case morphing methyl into nitrile (as opposed to water), and ensuring that all chiral volumes are turned off.

proteneer commented 6 months ago

Interesting - looks like we don't need to check for the angle terms at all! The normalized chiral volume is already numerically stable even if angles terms are at 180, or disabled all together. It's only sensitive to the length but not the angle. i.e. the chiral volume defined by (c, i, j, k) does not change in a numerically unstable way (wrt. small perturbations on individual atoms c,i,j,k) as the angle term (i,c,j), (i,c,k), (j,c,k) goes to zero or 180.