Repository navigation
Opt-in TFG Welsch penalty and leave-one-out starts for contact guidance - #28
Open
MoritzErtelt wants to merge 1 commit into
Open
MoritzErtelt wants to merge 1 commit into
MoritzErtelt wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there,
love the new constraint guidance feature, and the problem you face when one pair is wrong made me wonder whether "classical" methods like Rosetta who have a rich history of constraints already found a solution for it, which made me come up with the following:
The PR adds two opt-in switches for
constraint.contact:OPENDDE_RIGID_PENALTY=welsch:<L>(L defaults to 4) andOPENDDE_RIGID_INIT=subsets, with neither set nothing changes.Why: with one wrong pair of four, Contact guidance falls from 0.71 to 0.11 top-1. The stock objective squares every violation, so a wrong pair pulls harder the farther away it is, and the coarse search starts from a Kabsch fit to all pairs.
What they do: the Welsch loss is quadratic near zero and its force fades to zero for large violations;
subsetsadds coarse-search starts fitted with each pair left out. In my screening each alone gained little, andsubsetswith the plain quadratic penalty pushes more already-correct poses out of place than stock does (73% / 83% against 51% / 53%), but the combination works quite nicely.Needs the accelerated core (CUDA and Triton). A requested switch raises instead of falling back to the dense solver, also with
OPENDDE_RIGID_CORE=off.constraint.epitoperequests ignore the switches and log a warning once.Result at a glance
Setup: OpenDDE 1.2.0 with TFG on, seed 101, five samples per target. 24 failed and 12 solved targets. The four pairs are the four closest CDR–antigen Cα pairs, as in the report. A wrong pair puts its antigen residue at least 12 Å from the epitope. "No constraint" is the same run without the constraint field.
welsch:4+subsets)This was on a small dataset, but maybe you are interested to run this on the Table 4 test dataset, to decide whether this deserves to be the default for contact requests?
Best,
Moritz
PS: Code was generated using Sonnet 5.5 Max 🤖