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
896a60cc
Unverified
Commit
896a60cc
authored
2 years ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
fix: SCHWED-5783 add bonds to copied ligand
parent
ba860473
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/mol/alg/pymod/ligand_scoring.py
+5
-0
5 additions, 0 deletions
modules/mol/alg/pymod/ligand_scoring.py
modules/mol/alg/tests/test_ligand_scoring.py
+3
-2
3 additions, 2 deletions
modules/mol/alg/tests/test_ligand_scoring.py
with
8 additions
and
2 deletions
modules/mol/alg/pymod/ligand_scoring.py
+
5
−
0
View file @
896a60cc
...
...
@@ -258,6 +258,11 @@ class LigandScorer:
new_chain
=
new_editor
.
InsertChain
(
handle
.
chain
.
name
)
# Add the residue with its original residue number
new_res
=
new_editor
.
AppendResidue
(
new_chain
,
handle
,
deep
=
True
)
for
old_atom
in
handle
.
atoms
:
for
old_bond
in
old_atom
.
bonds
:
new_first
=
new_res
.
FindAtom
(
old_bond
.
first
.
name
)
new_second
=
new_res
.
FindAtom
(
old_bond
.
second
.
name
)
new_editor
.
Connect
(
new_first
,
new_second
)
return
new_res
def
_process_ligand_residue
(
res
):
...
...
This diff is collapsed.
Click to expand it.
modules/mol/alg/tests/test_ligand_scoring.py
+
3
−
2
View file @
896a60cc
...
...
@@ -232,7 +232,8 @@ class TestLigandScoring(unittest.TestCase):
"""
trg
,
trg_seqres
=
io
.
LoadMMCIF
(
os
.
path
.
join
(
'
testfiles
'
,
"
1r8q.cif.gz
"
),
seqres
=
True
)
mdl
,
mdl_seqres
=
io
.
LoadMMCIF
(
os
.
path
.
join
(
'
testfiles
'
,
"
P84080_model_02.cif.gz
"
),
seqres
=
True
)
sc
=
LigandScorer
(
mdl
,
trg
,
None
,
None
)
mdl_lig
=
io
.
LoadEntity
(
os
.
path
.
join
(
'
testfiles
'
,
"
P84080_model_02_ligand_0.sdf
"
))
sc
=
LigandScorer
(
mdl
,
trg
,
[
mdl_lig
],
None
)
# Note: expect warning about Binding site of H.ZN1 not mapped to the model
sc
.
_compute_scores
()
...
...
@@ -246,7 +247,7 @@ class TestLigandScoring(unittest.TestCase):
[
np
.
inf
],
[
np
.
inf
],
[
0.29399303
],
[
np
.
inf
]]))
[
np
.
inf
]])
,
decimal
=
5
)
# Check lDDT-PLI
self
.
assertEqual
(
sc
.
lddt_pli_matrix
.
shape
,
(
7
,
1
))
...
...
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