Closed proteneer closed 1 month ago
Converted back to draft after finding some unexpected behavior (possible bug) on an example.
lgtm
Would you update the description since it no longer reflects the approach initially taken?
Would you update the description since it no longer reflects the approach initially taken?
Updated. (At that level of description, not much has changed -- the new approach just changed the implementation of the MCS leaf filter / dummy group filter function to use the existing checks based on a forcefield, rather than a separate implementation that was designed to be fast but was weaker than what we needed)
Background
Putting all this together, the present issue is that disabling bonds to maintain factorizability (1) necessitates disabling associated chiral volumes (2), which can result in a failure of the assertion (3).
Approach
This PR seeks to work around the issue at the atom mapping level. Specifically, we add a new leaf filter (
enforce_chirally_valid_dummy_groups
) to the MCS search restricting the returned atom mappings to ones that have at least one valid dummy group assignment (i.e. not violating the chiral assertion (3)).Separately, the end-state setup code in
SingleTopology
is updated to select a candidate dummy group assignment that does not violate (3), which is guaranteed to exist for atom mappings generated with the optionenforce_chirally_valid_dummy_groups=True
.Todo
leaf_filter_fxn
instead)