Skip to content

Commit

Permalink
Merge pull request #699 from padix-key/lddt
Browse files Browse the repository at this point in the history
Add support for lDDT computation
  • Loading branch information
padix-key authored Jan 6, 2025
2 parents aecc27d + 4c746c3 commit 226f2b4
Show file tree
Hide file tree
Showing 5 changed files with 694 additions and 81 deletions.
32 changes: 32 additions & 0 deletions benchmarks/structure/benchmark_compare.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import itertools
from pathlib import Path
import pytest
import biotite.structure as struc
import biotite.structure.io.pdbx as pdbx
from tests.util import data_dir


@pytest.fixture
def atoms():
pdbx_file = pdbx.BinaryCIFFile.read(Path(data_dir("structure")) / "1gya.bcif")
atoms = pdbx.get_structure(pdbx_file)
# Reduce the number of atoms to speed up the benchmark
return atoms[..., atoms.element != "H"]


@pytest.mark.benchmark
@pytest.mark.parametrize(
"multi_model, aggregation",
itertools.product([False, True], ["all", "chain", "residue", "atom"]),
)
def benchmark_lddt(atoms, multi_model, aggregation):
"""
Compute lDDT on different aggregation levels.
"""
reference = atoms[0]
if multi_model:
subject = atoms
else:
subject = atoms[0]

struc.lddt(reference, subject, aggregation=aggregation)
1 change: 1 addition & 0 deletions doc/apidoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@
"rmsd",
"rmspd",
"rmsf",
"lddt",
"tm_score"
],
"General analysis" : [
Expand Down
Loading

0 comments on commit 226f2b4

Please sign in to comment.