Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
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
ProMod3
Commits
108c8f0e
Commit
108c8f0e
authored
6 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
Avoid loading the rotamer library several times for one model.
This can happen in case of ring punch fixes.
parent
eddd11f1
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
modelling/pymod/_pipeline.py
+13
-4
13 additions, 4 deletions
modelling/pymod/_pipeline.py
with
13 additions
and
4 deletions
modelling/pymod/_pipeline.py
+
13
−
4
View file @
108c8f0e
...
@@ -164,7 +164,8 @@ def _GetSimEntity(sim):
...
@@ -164,7 +164,8 @@ def _GetSimEntity(sim):
def
BuildSidechains
(
mhandle
,
merge_distance
=
4
,
fragment_db
=
None
,
def
BuildSidechains
(
mhandle
,
merge_distance
=
4
,
fragment_db
=
None
,
structure_db
=
None
,
torsion_sampler
=
None
):
structure_db
=
None
,
torsion_sampler
=
None
,
rotamer_library
=
None
):
'''
Build sidechains for model.
'''
Build sidechains for model.
This is a wrapper for :func:`promod3.modelling.ReconstructSidechains`,
This is a wrapper for :func:`promod3.modelling.ReconstructSidechains`,
...
@@ -190,10 +191,16 @@ def BuildSidechains(mhandle, merge_distance=4, fragment_db=None,
...
@@ -190,10 +191,16 @@ def BuildSidechains(mhandle, merge_distance=4, fragment_db=None,
if ring punches are found. A default one is loaded
if ring punches are found. A default one is loaded
if None.
if None.
:type torsion_sampler: :class:`~promod3.loop.TorsionSampler`
:type torsion_sampler: :class:`~promod3.loop.TorsionSampler`
:param rotamer_library: Used as parameter for
:func:`modelling.ReconstructSidechains`, a default
one is loaded if None.
:type rotamer_library: :class:`~promod3.sidechain.RotamerLib` or
:class:`~promod3.sidechain.BBDepRotamerLib`
'''
'''
prof
=
core
.
StaticRuntimeProfiler
.
StartScoped
(
'
pipeline::BuildSidechains
'
)
prof
=
core
.
StaticRuntimeProfiler
.
StartScoped
(
'
pipeline::BuildSidechains
'
)
ost
.
LogInfo
(
"
Rebuilding sidechains.
"
)
ost
.
LogInfo
(
"
Rebuilding sidechains.
"
)
ReconstructSidechains
(
mhandle
.
model
,
keep_sidechains
=
True
)
ReconstructSidechains
(
mhandle
.
model
,
keep_sidechains
=
True
,
rotamer_library
=
rotamer_library
)
# check for ring punches
# check for ring punches
rings
=
GetRings
(
mhandle
.
model
)
rings
=
GetRings
(
mhandle
.
model
)
ring_punches
=
GetRingPunches
(
rings
,
mhandle
.
model
)
ring_punches
=
GetRingPunches
(
rings
,
mhandle
.
model
)
...
@@ -221,7 +228,8 @@ def BuildSidechains(mhandle, merge_distance=4, fragment_db=None,
...
@@ -221,7 +228,8 @@ def BuildSidechains(mhandle, merge_distance=4, fragment_db=None,
FillLoopsByDatabase
(
mhandle
,
fragment_db
,
structure_db
,
FillLoopsByDatabase
(
mhandle
,
fragment_db
,
structure_db
,
torsion_sampler
,
ring_punch_detection
=
2
)
torsion_sampler
,
ring_punch_detection
=
2
)
# re-build sidechains
# re-build sidechains
ReconstructSidechains
(
mhandle
.
model
,
keep_sidechains
=
True
)
ReconstructSidechains
(
mhandle
.
model
,
keep_sidechains
=
True
,
rotamer_library
=
rotamer_library
)
# restore gaps
# restore gaps
mhandle
.
gaps
=
StructuralGapList
()
mhandle
.
gaps
=
StructuralGapList
()
for
g
in
old_gaps
:
for
g
in
old_gaps
:
...
@@ -459,6 +467,7 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
...
@@ -459,6 +467,7 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
fragment_db
=
loop
.
LoadFragDB
()
fragment_db
=
loop
.
LoadFragDB
()
structure_db
=
loop
.
LoadStructureDB
()
structure_db
=
loop
.
LoadStructureDB
()
torsion_sampler
=
loop
.
LoadTorsionSamplerCoil
()
torsion_sampler
=
loop
.
LoadTorsionSamplerCoil
()
rotamer_library
=
sidechain
.
LoadDunbrackLib
()
merge_distance
=
4
merge_distance
=
4
# remove terminal gaps
# remove terminal gaps
...
@@ -471,7 +480,7 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
...
@@ -471,7 +480,7 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
# build sidechains
# build sidechains
BuildSidechains
(
mhandle
,
merge_distance
,
fragment_db
,
BuildSidechains
(
mhandle
,
merge_distance
,
fragment_db
,
structure_db
,
torsion_sampler
)
structure_db
,
torsion_sampler
,
rotamer_library
)
# minimize energy of final model using molecular mechanics
# minimize energy of final model using molecular mechanics
MinimizeModelEnergy
(
mhandle
,
use_amber_ff
=
use_amber_ff
,
MinimizeModelEnergy
(
mhandle
,
use_amber_ff
=
use_amber_ff
,
...
...
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