Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenFold
Commits
8c169fb6
"git@developer.sourcefind.cn:OpenDAS/sparseconvnet.git" did not exist on "2082f213c214b8b9d15a92ac98ebe63e2dd6c99d"
Commit
8c169fb6
authored
Apr 15, 2022
by
Gustaf Ahdritz
Browse files
Add missing pLDDT test
parent
857e9b7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
tests/test_loss.py
tests/test_loss.py
+16
-0
No files found.
tests/test_loss.py
View file @
8c169fb6
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment