Skip to content
Snippets Groups Projects
Commit 346d90c4 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

add some options to build-sidechains action

parent 0f06618a
Branches
Tags
No related merge requests found
...@@ -147,8 +147,8 @@ You can (re-)construct the sidechains in a model from the command line. ...@@ -147,8 +147,8 @@ You can (re-)construct the sidechains in a model from the command line.
.. code-block:: console .. code-block:: console
$ usage: build-sidechains [-h] (-p <FILE> | -e <FILE>) [-o <FILENAME>] [-k] $ usage: build-sidechains [-h] (-p <FILE> | -e <FILE>) [-o <FILENAME>] [-k] [-n]
[-n] [-r] [-r] [-i] [-s]
Example usage: Example usage:
...@@ -180,3 +180,13 @@ Several flags control the modelling behaviour: ...@@ -180,3 +180,13 @@ Several flags control the modelling behaviour:
Do not use rotamers with subrotamers Do not use rotamers with subrotamers
.. option:: -i, --backbone-independent
Use backbone independent rotamer library
(from :meth:`promod3.sidechain.LoadLib`) instead of the default backbone
dependent one (from :meth:`promod3.sidechain.LoadBBDepLib`)
.. option:: -s, --no-subrotamer-optimization
Dont do subrotamer optimization if flexible rotamer model is used
...@@ -11,7 +11,7 @@ Example usage: ...@@ -11,7 +11,7 @@ Example usage:
import os import os
import ost import ost
from ost import io, settings from ost import io, settings
from promod3 import modelling from promod3 import modelling, sidechain
from promod3.core import pm3argparse, helper from promod3.core import pm3argparse, helper
# make sure we see output when passing '-h' # make sure we see output when passing '-h'
...@@ -32,6 +32,12 @@ parser.add_argument('-n', '--no-disulfids', action='store_true', ...@@ -32,6 +32,12 @@ parser.add_argument('-n', '--no-disulfids', action='store_true',
'optimization') 'optimization')
parser.add_argument('-r', '--rigid-rotamers', action='store_true', parser.add_argument('-r', '--rigid-rotamers', action='store_true',
help='Do not use rotamers with subrotamers') help='Do not use rotamers with subrotamers')
parser.add_argument('-i', '--backbone-independent', action='store_true',
help='Use backbone independent rotamer library instead ' +
'of the default backbone dependent one')
parser.add_argument('-s', '--no-subrotamer-optimization', action='store_true',
help='Dont do subrotamer optimization if flexible ' +
'rotamer model is used.')
opts = parser.Parse() opts = parser.Parse()
...@@ -45,10 +51,20 @@ rotamer_model = "frm" ...@@ -45,10 +51,20 @@ rotamer_model = "frm"
if opts.rigid_rotamers: if opts.rigid_rotamers:
rotamer_model = "rrm" rotamer_model = "rrm"
lib = None
if opts.backbone_independent:
lib = sidechain.LoadLib()
opt_subrot = True
if opts.no_subrotamer_optimization:
opt_subrot = False
# do sidechain modelling # do sidechain modelling
modelling.ReconstructSidechains(prot, keep_sidechains=opts.keep_sidechains, modelling.ReconstructSidechains(prot, keep_sidechains=opts.keep_sidechains,
build_disulfids=opts.no_disulfids==False, build_disulfids=opts.no_disulfids==False,
rotamer_model=rotamer_model) rotamer_model=rotamer_model,
rotamer_library=lib,
optimize_subrotamers=opt_subrot)
# output # output
ost.PopVerbosityLevel() ost.PopVerbosityLevel()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment