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
93edac50
Commit
93edac50
authored
3 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
lDDT: code cleanup
parent
96805edc
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/pymod/lddt.py
+3
-3
3 additions, 3 deletions
modules/mol/alg/pymod/lddt.py
with
3 additions
and
3 deletions
modules/mol/alg/pymod/lddt.py
+
3
−
3
View file @
93edac50
...
@@ -631,6 +631,7 @@ class lDDTScorer:
...
@@ -631,6 +631,7 @@ class lDDTScorer:
for
ch
in
self
.
target
.
chains
:
for
ch
in
self
.
target
.
chains
:
ch_name
=
ch
.
GetName
()
ch_name
=
ch
.
GetName
()
self
.
chain_names
.
append
(
ch_name
)
self
.
chain_names
.
append
(
ch_name
)
rnums
=
list
()
if
ch_name
in
seqres_mapping
:
if
ch_name
in
seqres_mapping
:
seqres
=
seqres_mapping
[
ch_name
].
GetSequence
(
0
).
GetString
()
seqres
=
seqres_mapping
[
ch_name
].
GetSequence
(
0
).
GetString
()
atomseq
=
seqres_mapping
[
ch_name
].
GetSequence
(
1
).
GetString
()
atomseq
=
seqres_mapping
[
ch_name
].
GetSequence
(
1
).
GetString
()
...
@@ -646,7 +647,6 @@ class lDDTScorer:
...
@@ -646,7 +647,6 @@ class lDDTScorer:
"
raw sequence extracted from chain
"
"
raw sequence extracted from chain
"
"
residues
"
"
residues
"
)
)
rnums
=
list
()
rnum
=
0
rnum
=
0
for
seqres_olc
,
atomseq_olc
in
zip
(
seqres
,
atomseq
):
for
seqres_olc
,
atomseq_olc
in
zip
(
seqres
,
atomseq
):
if
seqres_olc
!=
"
-
"
:
if
seqres_olc
!=
"
-
"
:
...
@@ -659,7 +659,6 @@ class lDDTScorer:
...
@@ -659,7 +659,6 @@ class lDDTScorer:
f
"
ATOMSEQ mismatch
"
f
"
ATOMSEQ mismatch
"
)
)
rnums
.
append
(
rnum
)
rnums
.
append
(
rnum
)
residue_numbers
[
ch_name
]
=
rnums
else
:
else
:
rnums
=
[
r
.
GetNumber
()
for
r
in
ch
.
residues
]
rnums
=
[
r
.
GetNumber
()
for
r
in
ch
.
residues
]
if
sum
([
len
(
rn
.
GetInsCode
().
strip
(
"
\0
"
))
for
rn
in
rnums
])
>
0
:
if
sum
([
len
(
rn
.
GetInsCode
().
strip
(
"
\0
"
))
for
rn
in
rnums
])
>
0
:
...
@@ -667,13 +666,14 @@ class lDDTScorer:
...
@@ -667,13 +666,14 @@ class lDDTScorer:
"
Residue numbers in target must not
"
"
Residue numbers in target must not
"
"
contain insertion codes
"
"
contain insertion codes
"
)
)
rnums
=
[
rnum
.
GetNum
()
for
rnum
in
rnums
]
if
not
all
(
x
<
y
for
x
,
y
in
zip
(
rnums
,
rnums
[
1
:])):
if
not
all
(
x
<
y
for
x
,
y
in
zip
(
rnums
,
rnums
[
1
:])):
raise
RuntimeError
(
raise
RuntimeError
(
"
Residue numbers in each target chain
"
"
Residue numbers in each target chain
"
"
must be monotonically increasing
"
"
must be monotonically increasing
"
)
)
residue_numbers
[
ch_name
]
=
[
rnum
.
GetNum
()
for
rnum
in
rnums
]
assert
len
(
rnums
)
==
len
(
ch
.
residues
)
assert
len
(
rnums
)
==
len
(
ch
.
residues
)
residue_numbers
[
ch_name
]
=
rnums
current_idx
=
0
current_idx
=
0
for
chain
in
self
.
target
.
chains
:
for
chain
in
self
.
target
.
chains
:
...
...
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