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
34b7991c
Commit
34b7991c
authored
6 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
add sidechain modelling actions
parent
ce84a663
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
actions/CMakeLists.txt
+1
-0
1 addition, 0 deletions
actions/CMakeLists.txt
actions/doc/index.rst
+37
-1
37 additions, 1 deletion
actions/doc/index.rst
actions/pm-build-sidechains
+62
-0
62 additions, 0 deletions
actions/pm-build-sidechains
with
100 additions
and
1 deletion
actions/CMakeLists.txt
+
1
−
0
View file @
34b7991c
...
...
@@ -6,3 +6,4 @@ pm_action_init()
pm_action
(
pm-build-model actions
)
pm_action
(
pm-build-rawmodel actions
)
pm_action
(
pm-help actions
)
pm_action
(
pm-build-sidechains actions
)
This diff is collapsed.
Click to expand it.
actions/doc/index.rst
+
37
−
1
View file @
34b7991c
...
...
@@ -113,4 +113,40 @@ Possible exit codes of the action:
- 3: failed to perform modelling (internal error)
- 4: failed to write results to file
- other non-zero: failure in argument checking
(see :class:`promod3.core.pm3argparse.PM3ArgumentParser`)
\ No newline at end of file
(see :class:`promod3.core.pm3argparse.PM3ArgumentParser`)
Sidechain Modelling
--------------------------------------------------------------------------------
You can run (re-)construct the sidechains in a model from the command line.
.. code-block:: console
$ pm build-sidechains [-h] [-o <FILENAME>] [-k] [-n] [-r] in_file
Example usage:
.. code-block:: console
$ pm build-sidechains input.pdb
This reads a structure stored in in.pdb, strips all sidechains,
detects and models disulfid bonds and reconstructs all sidechains with the
flexible rotamer model. The result is stored as :file:`out.pdb`.
The output filename can be controlled with the ``-o`` flag.
Several flags control the modelling behaviour:
.. option:: -k, --keep-sidechains
Keep existing sidechains.
.. option:: -n, --no-disulfids
Do not build disulfid bonds before sidechain optimization
.. option:: -r, --rigid-rotamers
Do not use rotamers with subrotamers
This diff is collapsed.
Click to expand it.
actions/pm-build-sidechains
0 → 100644
+
62
−
0
View file @
34b7991c
'''
Automatically (re-)construct sidechains in a protein model.
Example usage:
pm build-sidechains in.pdb
This reads a structure stored in in.pdb, strips all sidechains,
detects and models disulfid bonds and reconstructs all sidechains with the
flexible rotamer model. The result is stored as out.pdb
'''
import os
import ost
from ost import io, settings
from promod3 import modelling
from promod3.core import pm3argparse, helper
# make sure we see output when passing '-h'
ost.PushVerbosityLevel(2)
# parse command line
parser = pm3argparse.PM3ArgumentParser(__doc__, action=True)
parser.add_argument('in_file', type=str, help='File to load coordinates ' +
'(PDB format)')
parser.add_argument('-o', '--out-file', metavar='<FILENAME>', type=str,
default='out.pdb', help='File to store coordinates ' +
'(default: %(default)s)')
parser.add_argument('-k', '--keep-sidechains', action='store_true',
help='Keep existing sidechains')
parser.add_argument('-n', '--no-disulfids', action='store_true',
help='Do not build disulfid bonds before sidechain ' +
'optimization')
parser.add_argument('-r', '--rigid-rotamers', action='store_true',
help='Do not use rotamers with subrotamers')
opts = parser.Parse()
ost.PushVerbosityLevel(3)
if not os.path.isfile(opts.in_file):
helper.MsgErrorAndExit("Failed to load input file '%s'." % opts.in_file, 4)
prot = io.LoadPDB(opts.in_file)
rotamer_model = "frm"
if opts.rigid_rotamers:
rotamer_model = "rrm"
# do sidechain modelling
modelling.ReconstructSidechains(prot, keep_sidechains=opts.keep_sidechains,
build_disulfids=opts.no_disulfids==False,
rotamer_model=rotamer_model)
# output
ost.PopVerbosityLevel()
io.SavePDB(prot, opts.out_file)
if not os.path.isfile(opts.out_file):
helper.MsgErrorAndExit("Failed to write model file '%s'." % opts.model_file, 4)
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