Closed proteneer closed 2 weeks ago
Updated description and opened for comments.
Introduced a new constant DEFAULT_BOND_IS_PRESENT_K = 30.0
that is now referenced by both the plotting code, as well as assertion code indicating whether or not a bond is considered to be "present".
I think I've resolved most of the major issues - did I miss anything? (Thank you reviewers for the diligent comments),.
Rebased onto master
This PR adds support for converting chiral volumes from either
OFF -> ON
or fromON -> OFF
. Note that it does not support inversion of chiral volumes.Consider the following transformation where we go from an sp2 center with a dummy atom attached to an sp3 center:
If we break the core-dummy bond
(C-*)
at the left end-state, then the associated chiral volumes[(C,O1,O2,*), (C,O1,H,*), (C,H,O2,*)]
will also need to be turned off, as well as any associated angle terms. So if we interpolate in a way such that the angles are turned on before the chiral volumes are turned on, eg. atlambda=0.5
, we will have a mixture of chiral states, of which roughly half will be inconsistent with the chiral volume defined at the right end-state, leading to an HREX bottleneck. So instead, we need to turn on the chiral restraints before we turn on the angle terms.High-level implementation details:
1) Disables the chiral validity check both within the single topology code as well as the atom-mapping code (now raising a
DeprecationWarning
) 2) Refactors the logic for the interpolation of bonded parameters from one that determines directionality based on the force constant, to one that's based on inspecting the idxs themselves and assigning it into one of three types {core, dummy_a, dummy_b}. 3) Explicitly identifies bonds/angles involved in chiral volume conversions that are being toggled depending on the type, and setting up an interpolation schedule that appropriate for the said type. 4) For terms that are not involved in chiral volume conversions, the old default schedule is used. 5) Adds three utility plotting functionsplot_core_interpolation_schedule
,plot_dummy_a_interpolation_schedule
, andplot_dummy_b_interpolation_schedule
for visualizing force constants associated with the transformation.The flow chart for determining which schedule to use is as follows:
Lambda schedule implementing the above diagram.
Update [10/30/2024] - Support for visualizing interpolation schedule.
Pending a lot more systematic validation.