Repository navigation
feat: add charge×amphipathicity cross-term to activity scoring (#39) - #39
Merged
Merged
Conversation
Add cross_bonus = clamp01(charge_density × mu_h / 0.15) × 0.02 to activity_likeness_score(). Biophysical rationale: electrostatic membrane attraction (charge) and hydrophobic bilayer insertion (amphipathicity/mu_h) are synergistic — AMPs that are simultaneously highly charged AND highly amphipathic outperform single-property peptides by more than additive prediction implies. Cross-term normalizer 0.15 = typical_cd (0.30) × typical_mu_h (0.50). At saturation (cd≥0.30, mu_h≥0.50), bonus = 0.02. Effect on existing nominees: - SEED-003 variants (cd~0.45, mu_h~0.65): +0.020 (saturated) - SEED-005 variants (cd~0.21, mu_h~0.55): +0.015 - SEED-006 Mastoparan-X variants (cd~0.21, mu_h~0.55): +0.015 - SEED-004 variants (cd~0.08, mu_h~0.75): +0.008 (low charge) - SEED-001 variants (cd~0.27, mu_h~0.60): +0.018 Updated test_mu_h_0_4_half_bonus assertion (0.075 → 0.079 to account for cross-term contribution). Added TestChargeAmphipathicityCrossTerm class with 5 new tests.
cschanhniem
force-pushed
the
feat/charge-amphipathicity-crossterm
branch
from
June 28, 2026 05:13
ae4de49 to
458ec17
Compare
4 tasks
cschanhniem
added a commit
that referenced
this pull request
Jun 28, 2026
…D-amino plan, cross-term scoring (#43) (#43) * docs: fix stale amphipathicity weight in test_scoring_activity.py docstring (0.15 → 0.14, add helix_bonus) * docs: update discovery probability to ~22-42% incorporating PRs #39-42 (SEED-007/008, Wave 2 guidance, cross-term scoring) * fix: correct bombolitin species (B. pennsylvanicus), fix MIC citation attribution, clarify per-candidate vs combined probability methodology
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.
Summary
cross_bonus = clamp01(charge_density × mu_h / 0.15) × 0.02toactivity_likeness_score()TestChargeAmphipathicityCrossTermtest_mu_h_0_4_half_bonusto account for cross-term contribution (0.075 → 0.079)Biophysical rationale
AMPs kill bacteria through two synergistic forces:
Research shows that AMPs need BOTH for efficient membrane disruption (Zasloff 2002, Hancock & Sahl 2006). A peptide with high charge but no amphipathicity merely adsorbs; a peptide with amphipathicity but no charge doesn't preferentially target bacterial membranes. The cross-term captures this non-linear interaction.
Effect on scoring
SEED-004 variants (temporin-like, low charge) get the smallest boost, which is scientifically correct — their membrane activity relies on hydrophobicity alone.
Tests
5 new tests:
test_zero_charge_gives_no_cross_bonus— zero charge → zero cross contributiontest_zero_amphipathicity_gives_no_cross_bonus— zero mu_h → zero cross contributiontest_full_cross_bonus_at_saturation— cd=0.30, mu_h=0.50 → exact +0.02test_half_cross_bonus— cd=0.15, mu_h=0.50 → exact +0.01test_dual_property_amps_score_higher_than_single_propertyAll 877 tests pass.
Test plan
pytest tests/test_scoring_activity.py— 36/36 passed (5 new)pytest(full suite) — 877/877 passed🤖 Generated with Claude Code