Repository navigation
Report pTM as aggregate score for single-chain inputs - #431
Open
barlowa124 wants to merge 159 commits into
Open
barlowa124 wants to merge 159 commits into
barlowa124 wants to merge 159 commits into
Conversation
allways -> always
chore: update utils.py
move ESM to/from GPU once per complex, not once per chain
…lddt-as-bfactors Add pLDDT to pdb files
…reenshot Update lab.chaidiscovery.com screenshot
Co-authored-by: Alex Rogozhnikov <arogozhnikov@users.noreply.github.com>
Warn user about potentially wrong EntityType
* relax torch version + rework deps relax torch version, move type-stubs to dev deps, use typer-slim to reduce deps bloat, clean out some commented packages * suppress complain from mypy
* do not use esm from transformers * minor
…ies (chaidiscovery#355) * Fix corner case for templates being enabled with no protein entities * Fix typo
* Remove threads from kalign; add test * Update docstring * Add kalign to pytest
…aidiscovery#368) * map d-partners to X in sequence * rm residue corruption logic
…scovery#371) * Add docstring * Global template cif cache folder * Update readme
…mers + reasonable timeout) (chaidiscovery#410) * fixed issue where process hangs on reference conformer generation * autoformat * suppress complain from mypy --------- Co-authored-by: Keaun A <kja.working@gmail.com>
…tity names (chaidiscovery#384) * support [] in addition to () * fix * relax check
* upgrade gemmi * reorder for compatibility
* relax requirement on numpy * allow_pickle = False (taming mypy)
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.
Author
|
Checks are green and the PR is mergeable. Anything blocking review? Happy to adjust. |
barlowa124
force-pushed
the
fix/single-chain-aggregate-score
branch
from
December 4, 2026 22:05
8bd8ebb to
b264987
Compare
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
For a single-chain input,
interface_ptmis meaningless: its key-tokenmask selects other chains, leaving an empty mask and a score of zero.
rank()still blended it intoaggregate_score, so single-chainpredictions reported
0.2 * pTMrather than pTM itself.rank()now counts distinct asym ids first. Multi-chain inputs keepthe existing pTM/ipTM/clash blend. Single-chain inputs aggregate on
complex_ptmalone, still minus the clash penalty so the formulastays uniform.
Motivation
Fixes #327.
scores.npzfor single-chain predictions reportsmisleadingly low confidence, corrupting sample ranking and any
downstream consumer of
aggregate_score.Test plan
pytest tests/test_ranking.pypasses on CPU with no GPU or inference.The new tests build minimal synthetic inputs (one atom per token, 5A
spacing) covering the single-chain case, where
aggregate_scoreequals
complex_ptmand differs from the old blended value, and thetwo-chain case, where the blend is unchanged.