"git@developer.sourcefind.cn:OpenDAS/sparseconvnet.git" did not exist on "2082f213c214b8b9d15a92ac98ebe63e2dd6c99d"
Commit 8c169fb6 authored by Gustaf Ahdritz's avatar Gustaf Ahdritz
Browse files

Add missing pLDDT test

parent 857e9b7c
...@@ -42,6 +42,7 @@ from openfold.utils.loss import ( ...@@ -42,6 +42,7 @@ from openfold.utils.loss import (
backbone_loss, backbone_loss,
sidechain_loss, sidechain_loss,
tm_loss, tm_loss,
compute_plddt,
) )
from openfold.utils.tensor_utils import ( from openfold.utils.tensor_utils import (
tree_map, tree_map,
...@@ -226,6 +227,21 @@ class TestLoss(unittest.TestCase): ...@@ -226,6 +227,21 @@ class TestLoss(unittest.TestCase):
torch.max(torch.abs(out_gt[k] - out_repro[k])) < consts.eps torch.max(torch.abs(out_gt[k] - out_repro[k])) < consts.eps
) )
@compare_utils.skip_unless_alphafold_installed()
def test_compute_plddt_compare(self):
n_res = consts.n_res
logits = np.random.rand(n_res, 50)
out_gt = alphafold.common.confidence.compute_plddt(logits)
out_gt = torch.tensor(out_gt)
logits_t = torch.tensor(logits)
out_repro = compute_plddt(logits_t)
self.assertTrue(
torch.max(torch.abs(out_gt - out_repro)) < consts.eps
)
def test_find_structural_violations(self): def test_find_structural_violations(self):
n = consts.n_res n = consts.n_res
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment