Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
56f724fa
Commit
56f724fa
authored
2 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
qsscore: explicitely test symmetry in qsscore, i.e. S(x,y) == S(y,x)
parent
115c411c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mol/alg/tests/test_qsscore.py
+22
-0
22 additions, 0 deletions
modules/mol/alg/tests/test_qsscore.py
with
22 additions
and
0 deletions
modules/mol/alg/tests/test_qsscore.py
+
22
−
0
View file @
56f724fa
...
...
@@ -144,6 +144,17 @@ class TestQSScore(unittest.TestCase):
qs_score
=
qs_scorer
.
GetQSScore
(
res
.
mapping
)
self
.
assertAlmostEqual
(
qs_score
,
0.323
,
2
)
def
test_hetero_model_switched_order
(
self
):
# same as above but with switched order to test for symmetric behaviour
# of QS score
target
=
_LoadFile
(
'
1eud_mdl_partial-dimer.pdb
'
)
# BA, no symmetry
model
=
_LoadFile
(
'
1eud_ref.pdb
'
)
# AB, no symmetry
mapper
=
ChainMapper
(
target
)
res
=
mapper
.
GetRigidMapping
(
model
,
strategy
=
"
greedy_iterative_rmsd
"
)
qs_scorer
=
QSScorer
.
FromMappingResult
(
res
)
qs_score
=
qs_scorer
.
GetQSScore
(
res
.
mapping
)
self
.
assertAlmostEqual
(
qs_score
,
0.323
,
2
)
def
test_homo_1
(
self
):
# different stoichiometry SOD
ent_1
=
_LoadFile
(
'
4dvh.1.pdb
'
)
# A2, symmetry: C2
...
...
@@ -167,6 +178,17 @@ class TestQSScore(unittest.TestCase):
qs_score
=
qs_scorer
.
GetQSScore
(
res
.
mapping
)
self
.
assertAlmostEqual
(
qs_score
,
1
/
6
,
2
)
def
test_homo_2_switched_order
(
self
):
# same as above but with switched order to test for symmetric behaviour
# of QS score
ent_2
=
_LoadFile
(
'
4r7y.1.pdb
'
)
# A6, symmetry: C6
ent_1
=
ent_2
.
Select
(
'
cname=A,B
'
)
# A2, no symmetry
mapper
=
ChainMapper
(
ent_1
)
res
=
mapper
.
GetRigidMapping
(
ent_2
,
strategy
=
"
greedy_iterative_rmsd
"
)
qs_scorer
=
QSScorer
.
FromMappingResult
(
res
)
qs_score
=
qs_scorer
.
GetQSScore
(
res
.
mapping
)
self
.
assertAlmostEqual
(
qs_score
,
1
/
6
,
2
)
if
__name__
==
"
__main__
"
:
from
ost
import
testutils
if
testutils
.
SetDefaultCompoundLib
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment