Skip to content

Opt-in TFG Welsch penalty and leave-one-out starts for contact guidance - #28

Open
MoritzErtelt wants to merge 1 commit into
aurekaresearch:mainfrom
MoritzErtelt:feat/tfg-robust-contact-penalty
Open

MoritzErtelt wants to merge 1 commit into
aurekaresearch:mainfrom
MoritzErtelt:feat/tfg-robust-contact-penalty

Conversation

@MoritzErtelt

Copy link
Copy Markdown
Contributor

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) and OPENDDE_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; subsets adds coarse-search starts fitted with each pair left out. In my screening each alone gained little, and subsets with 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.epitope requests 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.

stock this PR (welsch:4 + subsets)
One of four pairs wrong: mean DockQ on failed targets 0.056 0.233
One of four wrong: default failed targets with a correct top-1 (of 24) 0 7
Solved targets that lose their correct top-1 (of 12): one / two wrong pairs 5 / 7 0 / 1
All four pairs right: mean DockQ 0.303 0.343
Time per target 108–110 s ≈ 112 s

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 🤖

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant