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
f5efafc7
Commit
f5efafc7
authored
1 year ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
Scoring: add number of native and model contacts as attributes to Scorer
parent
3b843712
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
actions/ost-compare-structures
+2
-0
2 additions, 0 deletions
actions/ost-compare-structures
modules/mol/alg/pymod/scoring.py
+27
-5
27 additions, 5 deletions
modules/mol/alg/pymod/scoring.py
with
29 additions
and
5 deletions
actions/ost-compare-structures
+
2
−
0
View file @
f5efafc7
...
...
@@ -700,6 +700,8 @@ def _Process(model, reference, args):
out["fnat"] = scorer.fnat
out["irmsd"] = scorer.irmsd
out["lrmsd"] = scorer.lrmsd
out["nnat"] = scorer.nnat
out["nmdl"] = scorer.nmdl
out["dockq_ave"] = scorer.dockq_ave
out["dockq_wave"] = scorer.dockq_wave
out["dockq_ave_full"] = scorer.dockq_ave_full
...
...
This diff is collapsed.
Click to expand it.
modules/mol/alg/pymod/scoring.py
+
27
−
5
View file @
f5efafc7
...
...
@@ -289,6 +289,8 @@ class Scorer:
self
.
_fnonnat
=
None
self
.
_irmsd
=
None
self
.
_lrmsd
=
None
self
.
_nnat
=
None
self
.
_nmdl
=
None
self
.
_dockq_scores
=
None
self
.
_dockq_ave
=
None
self
.
_dockq_wave
=
None
...
...
@@ -953,6 +955,26 @@ class Scorer:
self
.
_compute_dockq_scores
()
return
self
.
_fnat
@property
def
nnat
(
self
):
"""
N native contacts for interfaces in :attr:`~dockq_interfaces`
:class:`list` of :class:`int`
"""
if
self
.
_nnat
is
None
:
self
.
_compute_dockq_scores
()
return
self
.
_nnat
@property
def
nmdl
(
self
):
"""
N model contacts for interfaces in :attr:`~dockq_interfaces`
:class:`list` of :class:`int`
"""
if
self
.
_nmdl
is
None
:
self
.
_compute_dockq_scores
()
return
self
.
_nmdl
@property
def
fnonnat
(
self
):
"""
fnonnat scores for interfaces in :attr:`~dockq_interfaces`
...
...
@@ -1506,9 +1528,8 @@ class Scorer:
self
.
_fnonnat
=
list
()
self
.
_irmsd
=
list
()
self
.
_lrmsd
=
list
()
# keep track of native counts for weights in dockq_wave/dockq_wave_full
native_counts
=
list
()
self
.
_nnat
=
list
()
self
.
_nmdl
=
list
()
dockq_alns
=
dict
()
for
aln
in
self
.
aln
:
...
...
@@ -1531,7 +1552,8 @@ class Scorer:
self
.
_irmsd
.
append
(
res
[
"
irmsd
"
])
self
.
_lrmsd
.
append
(
res
[
"
lrmsd
"
])
self
.
_dockq_scores
.
append
(
res
[
"
DockQ
"
])
native_counts
.
append
(
res
[
"
nnat
"
])
self
.
_nnat
.
append
(
res
[
"
nnat
"
])
self
.
_nmdl
.
append
(
res
[
"
nmdl
"
])
# keep track of native counts in target interfaces which are
# not covered in model in order to compute
...
...
@@ -1554,7 +1576,7 @@ class Scorer:
# - average weighted by native_contacts
# - the two above including nonmapped_contact_interfaces => set DockQ to 0.0
scores
=
np
.
array
([
self
.
_dockq_scores
])
weights
=
np
.
array
([
native_counts
])
weights
=
np
.
array
([
self
.
_nnat
])
if
len
(
scores
)
>
0
:
self
.
_dockq_ave
=
np
.
mean
(
scores
)
else
:
...
...
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