Skip to content

Add opt-in --score_coefficients and --write_score_descriptors - #186

Closed
ksy141 wants to merge 2 commits into
Discngine:masterfrom
siyoungkimlab:score-coefficients
Closed

ksy141 wants to merge 2 commits into
Discngine:masterfrom
siyoungkimlab:score-coefficients

Conversation

@ksy141

@ksy141 ksy141 commented Oct 6, 2026

Copy link
Copy Markdown

Adds two opt-in options to fpocket. Without them, behaviour and output are unchanged.

--score_coefficients c0,...,c8 replaces the pocket score by a linear score over nine terms:

c0 + c1*nas_norm + c2*prop_asapol_norm + c3*mean_loc_hyd_dens_norm + c4*polarity_score
   + c5*as_density + c6*convex_hull_volume + c7*surf_pol_vdw14 + c8*surf_apol_vdw14

fpocket 4's built-in score (the last assignment in score_pocket) has exactly this form. Passing its coefficients, -0.03783394,0.48461469,0,0,0,0.09093926,0.0004155899,-0.003995233,-0.004072336, reproduces the default scores and ranking exactly. The option exists so the ranking can be refitted for structures that differ from the all-atom training data, without recompiling. We use it for coarse-grained proteins (Martini 2, Martini 3, SIRAH), where the default score ranks pockets poorly. We refitted the score on fpocket's own training set (fpocket-data-1.0, 263 complexes) and retuned the detection flags. Together they raise Top-1 on fpocket's 48 apo test structures from about 0.1 to about 0.6.

--write_score_descriptors writes those eight descriptors for every pocket to <name>_out/<name>_score_desc.txt, so a score can be refitted from one fpocket run per structure.

Changes:

  • fparams.h / fparams.c: the two long options, parsing (exits with a message unless exactly 9 numbers are given), and -h text.
  • pscoring.c: score_pocket_custom().
  • pocket.c: use it when the option is set.
  • fpout.c / fpmain.c: the descriptor file.

Testing:

  • Default output is identical to the current master on 39 structures, apart from the Monte-Carlo volume lines, which vary between runs anyway.
  • With the built-in coefficients passed explicitly, scores are identical to the default (for example 22/22 pockets on 11GS).
  • The repository's tests give the same results as on master; 8 of 11 fail there too, before this change.

ksy141 added 2 commits October 6, 2026 17:30
--score_coefficients=c0,...,c8 replaces the pocket score by a linear score
over nine terms: intercept, nas_norm, prop_asapol_norm,
mean_loc_hyd_dens_norm, polarity_score, as_density, convex_hull_volume,
surf_pol_vdw14 and surf_apol_vdw14. fpocket 4's built-in score is this form
with coefficients -0.03783394,0.48461469,0,0,0,0.09093926,0.0004155899,
-0.003995233,-0.004072336, which reproduces it exactly.

--write_score_descriptors writes those descriptors for every pocket to
<name>_out/<name>_score_desc.txt, so a score can be refitted without
re-running fpocket.

Without either option fpocket's behaviour and output are unchanged.
@ksy141 ksy141 closed this Oct 6, 2026
@ksy141
ksy141 deleted the score-coefficients branch October 6, 2026 21:48
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