Add GDT and TM-score structural similarity metrics#189
Add GDT and TM-score structural similarity metrics#189
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/PDB/Kabsch.jl
Outdated
| return mean(values(scores)) | ||
| end | ||
|
|
||
| tm_d0(L::Integer) = max(0.5, 1.24 * (L - 15)^(1 / 3) - 1.8) |
There was a problem hiding this comment.
Avoid DomainError in tm_score for short targets
tm_d0 currently computes 1.24 * (L - 15)^(1 / 3) - 1.8; when Ltarget is below 15 (short peptides), raising a negative base to the fractional exponent throws a DomainError before the max(0.5, …) guard can run. That means tm_score crashes instead of returning a score for small structures. Handle the Ltarget < 15 case explicitly (e.g., real cube root or early clamp) so short targets are supported.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Summary
- Updated TM-score normalization to use a real cube root for
d0, avoiding DomainErrors for short targets while preserving the clamp behavior. src/PDB/Kabsch.jlL485
Testing
⚠️ not run (not requested)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #189 +/- ##
==========================================
- Coverage 96.97% 96.96% -0.01%
==========================================
Files 64 64
Lines 4861 4948 +87
==========================================
+ Hits 4714 4798 +84
- Misses 147 150 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Summary
Testing
julia --project -e 'push!(LOAD_PATH,"test"); using MIToSTests; MIToSTests.retest("PDB"); MIToSTests.retest("Structure similarity (GDT/TM-score)")'Codex Task