diff --git a/actions/doc/index.rst b/actions/doc/index.rst index 3e3c611bc620239a1601c475fe37f750751a013b..450ffa57d28ef1f491876e3f468880a55741713d 100644 --- a/actions/doc/index.rst +++ b/actions/doc/index.rst @@ -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 + diff --git a/actions/pm-build-sidechains b/actions/pm-build-sidechains index a04cd7b1b927994ee2603f7b24280ab2e500f3b4..c7ceb24428b799893f2be30ed23434f046d3ae50 100644 --- a/actions/pm-build-sidechains +++ b/actions/pm-build-sidechains @@ -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()