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
1d2abe08
Unverified
Commit
1d2abe08
authored
2 years ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
fix: SCHWED-5783 element case is unspecified in OST
parent
ed65571c
No related branches found
Branches containing commit
No related tags found
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
+2
-2
2 additions, 2 deletions
modules/mol/alg/pymod/ligand_scoring.py
modules/mol/alg/tests/test_ligand_scoring.py
+5
-0
5 additions, 0 deletions
modules/mol/alg/tests/test_ligand_scoring.py
with
7 additions
and
2 deletions
modules/mol/alg/pymod/ligand_scoring.py
+
2
−
2
View file @
1d2abe08
...
...
@@ -738,12 +738,12 @@ def ResidueToGraph(residue, by_atom_index=False):
:type by_atom_index: :class:`bool`
:rtype: :class:`~networkx.classes.graph.Graph`
Nodes are labeled with the Atom
'
s :attr:`~ost.mol.AtomHandle.
element
`.
Nodes are labeled with the Atom
'
s :attr:`~ost.mol.AtomHandle.
mass
`.
"""
nxg
=
networkx
.
Graph
()
for
atom
in
residue
.
atoms
:
nxg
.
add_node
(
atom
.
name
,
element
=
atom
.
element
)
nxg
.
add_node
(
atom
.
name
,
element
=
atom
.
mass
)
# This will list all edges twice - once for every atom of the pair.
# But as of NetworkX 3.0 adding the same edge twice has no effect, so we're good.
...
...
This diff is collapsed.
Click to expand it.
modules/mol/alg/tests/test_ligand_scoring.py
+
5
−
0
View file @
1d2abe08
...
...
@@ -167,6 +167,11 @@ class TestLigandScoring(unittest.TestCase):
sym
=
ost
.
mol
.
alg
.
ligand_scoring
.
_ComputeSymmetries
(
mdl_g3d
,
trg_g3d1
,
by_atom_index
=
True
)
assert
len
(
sym
)
==
72
# Test that we can match ions read from SDF
sdf_lig
=
io
.
LoadEntity
(
os
.
path
.
join
(
'
testfiles
'
,
"
1r8q_ligand_0.sdf
"
))
sym
=
ost
.
mol
.
alg
.
ligand_scoring
.
_ComputeSymmetries
(
trg_mg1
,
sdf_lig
.
residues
[
0
],
by_atom_index
=
True
)
assert
len
(
sym
)
==
1
# Test that it works with views and only consider atoms in the view
# Skip PA, PB and O[1-3]A and O[1-3]B in target and model
# We assume atom index are fixed and won't change
...
...
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