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
No related branches found
No related tags found
No related merge requests found
......@@ -147,8 +147,8 @@ You can (re-)construct the sidechains in a model from the command line.
.. code-block:: console
$ usage: build-sidechains [-h] (-p <FILE> | -e <FILE>) [-o <FILENAME>] [-k]
[-n] [-r]
$ usage: build-sidechains [-h] (-p <FILE> | -e <FILE>) [-o <FILENAME>] [-k] [-n]
[-r] [-i] [-s]
Example usage:
......@@ -180,3 +180,13 @@ Several flags control the modelling behaviour:
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:
import os
import ost
from ost import io, settings
from promod3 import modelling
from promod3 import modelling, sidechain
from promod3.core import pm3argparse, helper
# make sure we see output when passing '-h'
......@@ -32,6 +32,12 @@ parser.add_argument('-n', '--no-disulfids', action='store_true',
'optimization')
parser.add_argument('-r', '--rigid-rotamers', action='store_true',
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()
......@@ -45,10 +51,20 @@ rotamer_model = "frm"
if opts.rigid_rotamers:
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
modelling.ReconstructSidechains(prot, keep_sidechains=opts.keep_sidechains,
build_disulfids=opts.no_disulfids==False,
rotamer_model=rotamer_model)
rotamer_model=rotamer_model,
rotamer_library=lib,
optimize_subrotamers=opt_subrot)
# output
ost.PopVerbosityLevel()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment