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
ca81bec6
Commit
ca81bec6
authored
2 years ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
feat: SCHWED-5783 report progress during processing
parent
11565642
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mol/alg/pymod/ligand_scoring.py
+8
-4
8 additions, 4 deletions
modules/mol/alg/pymod/ligand_scoring.py
with
8 additions
and
4 deletions
modules/mol/alg/pymod/ligand_scoring.py
+
8
−
4
View file @
ca81bec6
...
@@ -265,9 +265,11 @@ class LigandScorer:
...
@@ -265,9 +265,11 @@ class LigandScorer:
if
res
.
entity
.
handle
==
old_entity
.
handle
:
if
res
.
entity
.
handle
==
old_entity
.
handle
:
# Residue is already in copied entity. We only need to grab it
# Residue is already in copied entity. We only need to grab it
new_res
=
new_entity
.
FindResidue
(
res
.
chain
.
name
,
res
.
number
)
new_res
=
new_entity
.
FindResidue
(
res
.
chain
.
name
,
res
.
number
)
LogVerbose
(
"
Ligand residue %s already in entity
"
%
res
.
handle
.
qualified_name
)
else
:
else
:
# Residue is not part of the entity, need to copy it first
# Residue is not part of the entity, need to copy it first
new_res
=
_copy_residue
(
res
.
handle
)
new_res
=
_copy_residue
(
res
.
handle
)
LogVerbose
(
"
Copied ligand residue %s
"
%
res
.
handle
.
qualified_name
)
new_res
.
SetIsLigand
(
True
)
new_res
.
SetIsLigand
(
True
)
return
new_res
return
new_res
...
@@ -384,13 +386,14 @@ class LigandScorer:
...
@@ -384,13 +386,14 @@ class LigandScorer:
self
.
_lddt_pli_full_matrix
=
np
.
empty
(
self
.
_lddt_pli_full_matrix
=
np
.
empty
(
(
len
(
self
.
target_ligands
),
len
(
self
.
model_ligands
)),
dtype
=
dict
)
(
len
(
self
.
target_ligands
),
len
(
self
.
model_ligands
)),
dtype
=
dict
)
for
target_i
,
target_ligand
in
enumerate
(
self
.
target_ligands
):
for
target_i
,
target_ligand
in
enumerate
(
self
.
target_ligands
):
Log
Debug
(
"
Compute RMSD for
target ligand %s
"
%
target_ligand
)
Log
Verbose
(
"
Analyzing
target ligand %s
"
%
target_ligand
)
for
binding_site
in
self
.
_get_binding_sites
(
target_ligand
):
for
binding_site
in
self
.
_get_binding_sites
(
target_ligand
):
if
len
(
binding_site
.
substructure
.
residues
)
==
0
:
if
len
(
binding_site
.
substructure
.
residues
)
==
0
:
LogWarning
(
"
No residue in proximity of target ligand
"
LogWarning
(
"
No residue in proximity of target ligand
"
"
%s
"
%
str
(
target_ligand
))
"
%s
"
%
str
(
target_ligand
))
continue
# next binding site
continue
# next binding site
LogVerbose
(
"
Found binding site with chain mapping %s
"
%
(
binding_site
.
GetFlatChainMapping
()))
ref_bs_ent
=
self
.
_build_binding_site_entity
(
ref_bs_ent
=
self
.
_build_binding_site_entity
(
target_ligand
,
binding_site
.
ref_residues
,
target_ligand
,
binding_site
.
ref_residues
,
...
@@ -412,14 +415,15 @@ class LigandScorer:
...
@@ -412,14 +415,15 @@ class LigandScorer:
model_ligand
,
target_ligand
,
model_ligand
,
target_ligand
,
substructure_match
=
self
.
substructure_match
,
substructure_match
=
self
.
substructure_match
,
by_atom_index
=
True
)
by_atom_index
=
True
)
LogVerbose
(
"
Ligands %s and %s symmetry match
"
%
(
str
(
model_ligand
),
str
(
target_ligand
)))
except
NoSymmetryError
:
except
NoSymmetryError
:
# Ligands are different - skip
# Ligands are different - skip
Log
Debug
(
"
No symmetry between %s and %s
"
%
(
Log
Verbose
(
"
No symmetry between %s and %s
"
%
(
str
(
model_ligand
),
str
(
target_ligand
)))
str
(
model_ligand
),
str
(
target_ligand
)))
continue
continue
LogDebug
(
"
Compute RMSD for model ligand %s
"
%
model_ligand
)
#LogVerbose("Compute RMSD for model ligand %s" % model_ligand)
rmsd
=
SCRMSD
(
model_ligand
,
target_ligand
,
rmsd
=
SCRMSD
(
model_ligand
,
target_ligand
,
transformation
=
binding_site
.
transform
,
transformation
=
binding_site
.
transform
,
substructure_match
=
self
.
substructure_match
)
substructure_match
=
self
.
substructure_match
)
...
...
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