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
67a169cf
Commit
67a169cf
authored
6 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
introduce termini modelling in default pipeline and build-model action
parent
f39fc282
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
actions/pm-build-model
+8
-1
8 additions, 1 deletion
actions/pm-build-model
modelling/pymod/_pipeline.py
+22
-3
22 additions, 3 deletions
modelling/pymod/_pipeline.py
with
30 additions
and
4 deletions
actions/pm-build-model
+
8
−
1
View file @
67a169cf
...
@@ -45,6 +45,12 @@ parser.AssembleParser()
...
@@ -45,6 +45,12 @@ parser.AssembleParser()
parser.add_argument('-o', '--model-file', metavar='<FILENAME>', type=str,
parser.add_argument('-o', '--model-file', metavar='<FILENAME>', type=str,
default='model.pdb', help='File to store model coordinates'+
default='model.pdb', help='File to store model coordinates'+
' (default: %(default)s).')
' (default: %(default)s).')
parser.add_argument('-t', '--model-termini', help="Enforce modelling of " +
"terminal stretches without template coverage with a " +
"crude Monte Carlo approach. The accuracy of those " +
"termini is likely to be limited.", action="store_true")
# lots of checking being done here -> see PM3ArgumentParser
# lots of checking being done here -> see PM3ArgumentParser
opts = parser.Parse()
opts = parser.Parse()
...
@@ -78,7 +84,8 @@ try:
...
@@ -78,7 +84,8 @@ try:
if len(opts.fragger_handles) > 0:
if len(opts.fragger_handles) > 0:
modelling.SetFraggerHandles(mhandle, opts.fragger_handles)
modelling.SetFraggerHandles(mhandle, opts.fragger_handles)
# build final model
# build final model
final_model = modelling.BuildFromRawModel(mhandle)
final_model = modelling.BuildFromRawModel(mhandle,
model_termini=opts.model_termini)
except Exception as ex:
except Exception as ex:
helper.MsgErrorAndExit("Failed to perform modelling! An exception of type "+
helper.MsgErrorAndExit("Failed to perform modelling! An exception of type "+
type(ex).__name__ + " occured: " + str(ex), 3)
type(ex).__name__ + " occured: " + str(ex), 3)
...
...
This diff is collapsed.
Click to expand it.
modelling/pymod/_pipeline.py
+
22
−
3
View file @
67a169cf
...
@@ -430,7 +430,8 @@ def CheckFinalModel(mhandle):
...
@@ -430,7 +430,8 @@ def CheckFinalModel(mhandle):
ost
.
LogInfo
(
"
Stereo-chemical problem in sidechain
"
+
\
ost
.
LogInfo
(
"
Stereo-chemical problem in sidechain
"
+
\
"
of residue
"
+
str
(
res
))
"
of residue
"
+
str
(
res
))
def
BuildFromRawModel
(
mhandle
,
use_amber_ff
=
False
,
extra_force_fields
=
list
()):
def
BuildFromRawModel
(
mhandle
,
use_amber_ff
=
False
,
extra_force_fields
=
list
(),
model_termini
=
False
):
'''
Build a model starting with a raw model (see :func:`BuildRawModel`).
'''
Build a model starting with a raw model (see :func:`BuildRawModel`).
This function implements a recommended pipeline to generate complete models
This function implements a recommended pipeline to generate complete models
...
@@ -474,6 +475,19 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
...
@@ -474,6 +475,19 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
existing parametrization are skipped.
existing parametrization are skipped.
:type extra_force_fields: :class:`list` of :class:`ost.mol.mm.Forcefield`
:type extra_force_fields: :class:`list` of :class:`ost.mol.mm.Forcefield`
:param model_termini: The default modelling pipeline in ProMod3 is optimized
to generate a gap-free model of the region in the
target sequence(s) that is covered with template
information. Terminal extensions without template
coverage are negelected.
You can activate this flag to enforce a model of the
full target sequence(s). The terminal parts will be
modelled with a crude Monte Carlo approach. Be aware
that the accuracy of those termini is likely to be
limited. Termini of length 1 won
'
t be modelled.
:type model_termini: :class:`bool`
:return: Delivers the model as an |ost_s| entity.
:return: Delivers the model as an |ost_s| entity.
:rtype: :class:`Entity <ost.mol.EntityHandle>`
:rtype: :class:`Entity <ost.mol.EntityHandle>`
'''
'''
...
@@ -493,8 +507,9 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
...
@@ -493,8 +507,9 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
rotamer_library
=
sidechain
.
LoadBBDepLib
()
rotamer_library
=
sidechain
.
LoadBBDepLib
()
merge_distance
=
4
merge_distance
=
4
# remove terminal gaps
if
not
model_termini
:
RemoveTerminalGaps
(
mhandle
)
# remove terminal gaps
RemoveTerminalGaps
(
mhandle
)
# check whether we have fragger handles
# check whether we have fragger handles
fragger_handles
=
None
fragger_handles
=
None
...
@@ -507,6 +522,10 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
...
@@ -507,6 +522,10 @@ def BuildFromRawModel(mhandle, use_amber_ff=False, extra_force_fields=list()):
fragment_db
=
fragment_db
,
structure_db
=
structure_db
,
fragment_db
=
fragment_db
,
structure_db
=
structure_db
,
torsion_sampler
=
torsion_sampler
,
fragger_handles
=
fragger_handles
)
torsion_sampler
=
torsion_sampler
,
fragger_handles
=
fragger_handles
)
if
model_termini
:
ModelTermini
(
mhandle
,
torsion_sampler
,
fragger_handles
=
fragger_handles
)
RemoveTerminalGaps
(
mhandle
)
# length=1 ignored above
# build sidechains
# build sidechains
BuildSidechains
(
mhandle
,
merge_distance
,
fragment_db
,
BuildSidechains
(
mhandle
,
merge_distance
,
fragment_db
,
structure_db
,
torsion_sampler
,
rotamer_library
)
structure_db
,
torsion_sampler
,
rotamer_library
)
...
...
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