Report pTM as aggregate score for single-chain inputs - #431
Open
barlowa124 wants to merge 1 commit into
Open
barlowa124 wants to merge 1 commit into
barlowa124 wants to merge 1 commit into
Conversation
ipTM is undefined when only one chain is present, so the 0.2*pTM + 0.8*ipTM aggregate reported ~0.2*pTM for monomers. Aggregate on pTM alone when a single asym id exists. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Description
ipTM is undefined when the input contains a single chain:
interface_ptmmasks key tokens to other chains, so the mask is empty and the score is always 0.rank()still blended it intoaggregate_score, so a single-chain prediction reported0.2 * pTMinstead of the pTM it should report.rank()now counts unique asym ids before computing the aggregate. Multi-chain inputs keep the0.2 * pTM + 0.8 * ipTM - 100 * clashblend. Single-chain inputs aggregate oncomplex_ptmalone, still minus the clash penalty so the formula stays uniform.Motivation
Fixes #327. Confidence scores written to
scores.npzfor single-chain predictions are misleadingly low, which affects ranking of samples and any downstream consumer ofaggregate_score.Test plan
tests/test_ranking.pybuilds minimal synthetic inputs (one atom per token, atoms spaced 5A apart, batch dim of 1) and asserts:aggregate_score == complex_ptm, and differs from0.2 * pTM(the buggy value).aggregate_score == 0.2 * pTM + 0.8 * ipTM, confirming the multi-chain blend is unchanged.pytest tests/test_ranking.py: 2 passed on CPU. No GPU or inference is needed for the ranking path.