pyrosetta.distributed.viewer
¶Warning: This notebook uses pyrosetta.distributed.viewer
code, which runs in jupyter notebook
and might not run if you're using jupyterlab
.
The pyrosetta.distributed
Viewer quickly renders .pdb
files, dynamically instantiating Pose
objects if required for certain visualization modules (matching the name viewer.set*
). So when adding
visualization modules to the Viewer or using presets, passing Pose
or PackedPose
objects to the Viewer is suggested for quicker rendering. If a Pose
object or list
, tuple
, or set
of Pose
objects are provided to the Viewer, the Viewer will dynamically update upon Pose
conformational changes by calling the view.show()
method or equivalently view()
. The Viewer applies visualization modules in the same order they are added (from left to right), so layering different styles (and ResidueSelectors
) on top of one another becomes possible. The user must have already initialized PyRosetta providing .params
files for any ligands and non-canonical residues in the input Pose
(s)/PackedPose
(s)/.pdb
file(s), otherwise pyrosetta.distributed
automatically initializes PyRosetta with default command line options.
Throughout this notebook, different syntaxes for constructing visualizations are demonstrated to show the flexibility of the pyrosetta.distributed.viewer
API, with hopes you find your favorite.
If you are using Google Colab: Currently, pyrosetta.distributed.viewer
does not require the local machine's PyMOL. You can always dump any Pose
object into a .pdb
file and open that in PyMOL on your own computer.
pose.dump_pdb("output_file.pdb")
Note: If you are having trouble using this notebook, please use the PyRosetta.notebooks
conda environment. Please see chapter 1.0 for instructions on how to setup and use this environment.
import glob
import logging
logging.basicConfig(level=logging.INFO)
import os
import pyrosetta
import pyrosetta.distributed
import pyrosetta.distributed.io as io
import pyrosetta.distributed.viewer as viewer
import sys
if 'google.colab' in sys.modules:
!pip install pyrosettacolabsetup
import pyrosettacolabsetup
pyrosettacolabsetup.setup()
print ("Notebook is set for PyRosetta use in Colab. Have fun!")
viewer
objects:¶viewer.__all__
['expand_notebook', 'init', 'presets', 'setBackgroundColor', 'setDisulfides', 'setHydrogenBonds', 'setHydrogens', 'setStyle', 'setSurface', 'setZoom', 'setZoomTo']
For example: viewer.init()
viewer.presets
objects:¶viewer.presets.__all__
['coreBoundarySurface', 'ligandsAndMetals']
For example: viewer.presets.coreBoundarySurface()
viewer
objects contain docstrings as user documentation:¶help(viewer.init)
Help on function init in module pyrosetta.distributed.viewer.core: init(packed_and_poses_and_pdbs=None, window_size=None, modules=None, delay=None, continuous_update=None, *args, **kwargs) Initialize the Viewer object. Parameters ---------- first : required `packed_and_poses_and_pdbs` `PackedPose`, `Pose`, or `str` of a valid path to a .pdb file, or a `list`, `set`, or `tuple` of these objects. second : optional `window_size` `list` or `tuple` of `int` or `float` values for the (width, height) dimensions of the displayed window screen size. Default: (1200, 800) third : optional `modules` `list` of instantiated visualization modules to run upon changing amongst `packed_and_poses_and_pdbs` objects with the slider, matching the namespace pyrosetta.distributed.viewer.set* Default: [] fourth : optional `delay` `float` time delay in seconds before rendering the Viewer in a Jupyter notebook, which is useful to prevent overburdening the Jupyter notebook client if `for` looping over quick modifications to a `Pose`. Default: 0.25 fifth : optional `continuous_update` `True` or `False`. When using the interactive slider widget, `False` restricts rendering to mouse release events. Default: False Returns ------- A Viewer instance.
viewer.presets
objects contain docstrings as brief descriptions of each preset visualization¶help(viewer.presets.coreBoundarySurface)
Help on function coreBoundarySurface in module pyrosetta.distributed.viewer.presets: coreBoundarySurface(packed_and_poses_and_pdbs=None, *args, **kwargs) Display core residues as 'blackCarbon' sticks, boundary residues as 'greyCarbon' sticks, and surface residues as 'whiteCarbon' sticks, with 'spectrum' cartoon representation, using the default arguments in pyrosetta.rosetta.core.select.residue_selector.LayerSelector() to select layers. @klimaj
help(viewer.presets.ligandsAndMetals)
Help on function ligandsAndMetals in module pyrosetta.distributed.viewer.presets: ligandsAndMetals(packed_and_poses_and_pdbs=None, *args, **kwargs) Display residues with ResidueProperty.LIGAND as 'brownCarbon' sticks with opaque surface, and ResidueProperty.METAL as 'chainHetatm' spheres, with 'spectrum' cartoon representation, disulfide bonds, polar hydrogens, and dashed hydrogen bonds. @klimaj
From previous section:
Make sure you are in the right directory for accessing the .pdb
files:
cd google_drive/My\ Drive/student-notebooks/
Note: import pyrosetta.distributed.viewer
expands the Jupyter notebook cell width to fit your internet browser, and can be called anytime using pyrosetta.distributed.viewer.expand_notebook()
flags = """
-auto_setup_metals 1
-detect_disulf 1
"""
pyrosetta.distributed.init(flags)
INFO:pyrosetta.distributed:maybe_init performing pyrosetta initialization: {'extra_options': '-auto_setup_metals 1 -detect_disulf 1', 'silent': True} INFO:pyrosetta.rosetta:Found rosetta database at: /Users/jadolfbr/Library/Python/3.6/lib/python/site-packages/pyrosetta-2019.39+release.93456a567a8-py3.6-macosx-10.6-intel.egg/pyrosetta/database; using it.... INFO:pyrosetta.rosetta:PyRosetta-4 2019 [Rosetta PyRosetta4.Release.python36.mac 2019.39+release.93456a567a8125cafdf7f8cb44400bc20b570d81 2019-09-26T14:24:44] retrieved from: http://www.pyrosetta.org (C) Copyright Rosetta Commons Member Institutions. Created in JHU by Sergey Lyskov and PyRosetta Team. INFO:rosetta:core.init: Checking for fconfig files in pwd and ./rosetta/flags INFO:rosetta:core.init: Reading fconfig.../Users/jadolfbr/.rosetta/flags/common INFO:rosetta:core.init: INFO:rosetta:core.init: INFO:rosetta:core.init: Rosetta version: PyRosetta4.Release.python36.mac r233 2019.39+release.93456a567a8 93456a567a8125cafdf7f8cb44400bc20b570d81 http://www.pyrosetta.org 2019-09-26T14:24:44 INFO:rosetta:core.init: command: PyRosetta -ex1 -ex2aro -auto_setup_metals 1 -detect_disulf 1 -database /Users/jadolfbr/Library/Python/3.6/lib/python/site-packages/pyrosetta-2019.39+release.93456a567a8-py3.6-macosx-10.6-intel.egg/pyrosetta/database INFO:rosetta:basic.random.init_random_generator: 'RNG device' seed mode, using '/dev/urandom', seed=1917621120 seed_offset=0 real_seed=1917621120 INFO:rosetta:basic.random.init_random_generator: RandomGenerator:init: Normal mode, seed=1917621120 RG_type=mt19937
Show basic line representation of .pdb
file on disk:
view = viewer.init("path/to/my.pdb") view.show()
Change the window_size
option of viewer.init()
to fit your screen size, which should prevent the need to scroll to view your macromolecular objects.
Show basic line representation of Pose
or PackedPose
objects in memory:
pose = pyrosetta.io.pose_from_file("inputs/3EK4.pdb")
INFO:rosetta:core.chemical.GlobalResidueTypeSet: Finished initializing fa_standard residue type set. Created 980 residue types INFO:rosetta:core.chemical.GlobalResidueTypeSet: Total time to initialize 0.90577 seconds. INFO:rosetta:core.import_pose.import_pose: File 'inputs/3EK4.pdb' automatically determined to be of type PDB INFO:rosetta:core.io.pdb.pdb_reader: Parsing 86 .pdb records with unknown format to search for Rosetta-specific comments. INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: CA 350 was added by a jump, with base residue 257 INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: CA 351 was added by a jump, with base residue 299 INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: CA 352 was added by a jump, with base residue 337 INFO:rosetta:core.chemical.AtomICoor: [ WARNING ] IcoorAtomID::atom_id(): Cannot get atom_id for POLYMER_LOWER of residue VAL 164. Returning BOGUS ID instead. INFO:rosetta:core.conformation.Residue: [ WARNING ] missing an atom: 164 H that depends on a nonexistent polymer connection! INFO:rosetta:core.conformation.Residue: [ WARNING ] --> generating it using idealized coordinates. INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OXT on residue ASN:CtermProteinFull 348 INFO:rosetta:core.conformation.Conformation: [ WARNING ] Failed to find a residue connection for residue 163 with connection point 2 INFO:rosetta:core.conformation.Conformation: [ WARNING ] Failed to find a residue connection for residue 164 with connection point 1 INFO:rosetta:core.util.metalloproteins_util: Automatically setting covalent bonds between metal ions and metal-binding residues. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 257's OD1 atom and residue 349's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 261's OD1 atom and residue 349's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 263's O atom and residue 349's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 268's OE1 atom and residue 349's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 268's OE2 atom and residue 349's CA atom. INFO:rosetta:core.conformation.Residue: [ WARNING ] Residue connection id changed when creating a new residue at seqpos 268 INFO:rosetta:core.conformation.Residue: [ WARNING ] ResConnID info stored on the connected residue (residue 349) is now out of date! INFO:rosetta:core.conformation.Residue: [ WARNING ] Connection atom name (in src): OE1 INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 293's OD2 atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 295's OD1 atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 297's OD1 atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 299's O atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 304's OE1 atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 304's OE2 atom and residue 350's CA atom. INFO:rosetta:core.conformation.Residue: [ WARNING ] Residue connection id changed when creating a new residue at seqpos 304 INFO:rosetta:core.conformation.Residue: [ WARNING ] ResConnID info stored on the connected residue (residue 350) is now out of date! INFO:rosetta:core.conformation.Residue: [ WARNING ] Connection atom name (in src): OE1 INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 332's OD2 atom and residue 351's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 334's OD1 atom and residue 351's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 336's O atom and residue 351's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 341's OE2 atom and residue 351's CA atom. INFO:rosetta:core.util.metalloproteins_util: Automatically setting up constraints between metal ions and metal-binding residues.
view = viewer.init(pose, window_size=(800, 600))
view()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
To show basic cartoon representation, add viewer.setStyle()
:
view = viewer.init(pose, window_size=(800, 600)) + viewer.setStyle()
view()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
To visualize ligands, non-conanical residues, metals, etc., viewer.setStyle()
(and several other viewer.set*
objects) optionally accept PyRosetta ResidueSelector
objects. In the case of inputs/3EK4.pdb
which is a $Ca^{2+}$-saturated GCaMP2 monomer, a ligand is a $Ca^{2+}$ ion and a non-canonical residue is the chromophore "CRO", both of which are aleady parameterized and available in the PyRosetta residue type set database. Therefore, we do not need to initialize PyRosetta with custom "CA" or "CRO" .params
files. However, if one wishes to visualize ligands and non-canonical residues for which .params
files are not available in the PyRosetta residue type set database, one must first initialize PyRosetta providing .params
files for any ligands and non-canonical residues in the input Pose
(s) or PackedPose
(s):
pyrosetta.init("-extra_res_fa /path/to/LIG.fa.params")
pyrosetta.distributed.viewer
passes the Pose
's PDB numbering of selected residues to py3dmol
for macromolecular rendering. Also, one may layer any visualization modules with any ResidueSelectors
in the order they are summed (from left to right). In this case:
metals_selector = pyrosetta.rosetta.core.select.residue_selector.ResiduePropertySelector(
pyrosetta.rosetta.core.chemical.ResidueProperty.METAL
)
ligands_selector = pyrosetta.rosetta.core.select.residue_selector.ResiduePropertySelector(
pyrosetta.rosetta.core.chemical.ResidueProperty.LIGAND
)
view = viewer.init(pose, window_size=(800, 600)) \
+ viewer.setStyle() \
+ viewer.setStyle(residue_selector=ligands_selector, style="stick", colorscheme="magentaCarbon", radius=0.5) \
+ viewer.setStyle(residue_selector=metals_selector, style="sphere", colorscheme="chainHetatm", radius=1.5)
viewer.setStyle()
layers the cartoon backbone and stick side-chain representation by defaultviewer.setStyle(residue_selector=ligands_selector, style="stick", colorscheme="magentaCarbon", radius=0.5)
layers any residue with the LIGAND
property a 0.5 radius stick with magenta carbon atoms.viewer.setStyle(residue_selector=metals_selector, style="sphere", colorscheme="chainHetatm", radius=1.5)
layers any residue with the METAL
property a 1.5 radius sphere with the py3dmol
color scheme "chainHetatm".view()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
Show many Pose
s in memory using the interactive slider widget:
poses = [pyrosetta.io.pose_from_sequence("TESTVIEWER" * i) for i in range(1, 10)]
view = viewer.init(poses, continuous_update=True)
view.add(viewer.setStyle(colorscheme="lightgreyCarbon"))
view.add(viewer.setHydrogenBonds(radius=0.1, dashed=False))
view()
interactive(children=(IntSlider(value=0, description='Decoys', max=8), Output()), _dom_classes=('widget-intera…
<function pyrosetta.distributed.viewer.core.Viewer.show.<locals>.view(i=0)>
Below, layer a ResidueSelector
of residues with ResidueProperty.POLAR
, then hydrogen atoms, hydrogen bonds, and disulfide bonds:
#NOTE: PackedPose requires the serialization build of PyRosetta.
#packed_pose = io.to_packed(pose) # Test the Viewer with a PackedPose object
'''
polar_residue_selector = pyrosetta.rosetta.core.select.residue_selector.ResiduePropertySelector(
pyrosetta.rosetta.core.chemical.ResidueProperty.POLAR
)
view = viewer.init(packed_pose)
view.add(viewer.setStyle(radius=0.1))
view.add(viewer.setStyle(residue_selector=polar_residue_selector, colorscheme="whiteCarbon", radius=0.25, label=False))
view.add(viewer.setHydrogens(color="white", polar_only=True, radius=0.1))
view.add(viewer.setHydrogenBonds(color="black"))
view.add(viewer.setDisulfides(radius=0.1))
view()
'''
'\npolar_residue_selector = pyrosetta.rosetta.core.select.residue_selector.ResiduePropertySelector(\n pyrosetta.rosetta.core.chemical.ResidueProperty.POLAR\n)\nview = viewer.init(packed_pose)\nview.add(viewer.setStyle(radius=0.1))\nview.add(viewer.setStyle(residue_selector=polar_residue_selector, colorscheme="whiteCarbon", radius=0.25, label=False))\nview.add(viewer.setHydrogens(color="white", polar_only=True, radius=0.1))\nview.add(viewer.setHydrogenBonds(color="black"))\nview.add(viewer.setDisulfides(radius=0.1))\nview()\n'
view = sum(
[
viewer.init(pose),
viewer.setStyle(cartoon=False, style="sphere", radius=1.5, colorscheme="darkgreyCarbon"),
viewer.setZoom(factor=0.95)
]
)
view()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
pose = pyrosetta.io.pose_from_file("inputs/6MSR.pdb")
INFO:rosetta:core.import_pose.import_pose: File 'inputs/6MSR.pdb' automatically determined to be of type PDB INFO:rosetta:core.io.pdb.pdb_reader: Parsing 1778 .pdb records with unknown format to search for Rosetta-specific comments. INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: [ WARNING ] discarding 3 atoms at position 1 in file inputs/6MSR.pdb. Best match rsd_type: GLY:NtermProteinFull INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: [ WARNING ] discarding 3 atoms at position 134 in file inputs/6MSR.pdb. Best match rsd_type: GLY:NtermProteinFull INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: [ WARNING ] discarding 3 atoms at position 257 in file inputs/6MSR.pdb. Best match rsd_type: GLY:NtermProteinFull INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 3 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 3 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 3 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 7 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 7 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 7 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 7 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 21 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 21 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 21 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 21 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 32 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 32 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 32 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue GLU 33 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 33 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 33 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 33 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 35 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 35 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 35 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 35 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 36 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 36 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 36 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 36 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS:CtermProteinFull 76 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 84 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 84 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 84 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 90 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 97 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 97 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 97 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 97 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OG on residue SER 102 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OG on residue SER 106 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue GLU 108 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 108 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 108 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 108 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 109 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 109 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 109 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 111 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 111 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 112 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 112 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue ASN 113 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OD1 on residue ASN 113 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: ND2 on residue ASN 113 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS:CtermProteinFull 152 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS:CtermProteinFull 152 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS:CtermProteinFull 152 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 160 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 160 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 160 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 166 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 166 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OG on residue SER 182 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue GLU 184 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 184 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 184 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 184 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue GLU 185 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 185 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 185 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 185 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 187 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 187 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 187 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 188 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 188 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 188 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 188 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue ASN 189 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OD1 on residue ASN 189 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: ND2 on residue ASN 189 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS:CtermProteinFull 228 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS:CtermProteinFull 228 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS:CtermProteinFull 228 INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 3 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 7 because of missing atom number 8 atom name NE INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 21 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 22 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 32 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 33 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 35 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 36 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 48 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 76 because of missing atom number 10 atom name NZ INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 83 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 84 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 90 because of missing atom number 9 atom name NZ INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 97 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 98 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 102 because of missing atom number 6 atom name OG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 106 because of missing atom number 6 atom name OG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 108 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 109 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 111 because of missing atom number 8 atom name CE INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 112 because of missing atom number 8 atom name CE INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 113 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 152 because of missing atom number 8 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 159 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 160 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 166 because of missing atom number 8 atom name CE INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 174 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 180 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 182 because of missing atom number 6 atom name OG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 184 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 185 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 187 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 188 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 189 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 228 because of missing atom number 8 atom name CD INFO:rosetta:core.pack.task: Packer task: initialize from command line() INFO:rosetta:core.scoring.ScoreFunctionFactory: SCOREFUNCTION: ref2015 INFO:rosetta:core.scoring.etable: Starting energy table calculation INFO:rosetta:core.scoring.etable: smooth_etable: changing atr/rep split to bottom of energy well INFO:rosetta:core.scoring.etable: smooth_etable: spline smoothing lj etables (maxdis = 6) INFO:rosetta:core.scoring.etable: smooth_etable: spline smoothing solvation etables (max_dis = 6) INFO:rosetta:core.scoring.etable: Finished calculating energy tables. INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/rama/fd/all.ramaProb INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/rama/fd/prepro.ramaProb INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.all.txt INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.gly.txt INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.pro.txt INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.valile.txt INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/P_AA INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/P_AA_n INFO:rosetta:core.scoring.P_AA: shapovalov_lib::shap_p_aa_pp_smooth_level of 1( aka low_smooth ) got activated. INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/shapovalov/10deg/kappa131/a20.prop INFO:rosetta:core.scoring.ScoreFunctionFactory: The -auto_setup_metals flag was used with no metalbinding_constraint weight set in the weights file. Setting to 1.0. INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/elec_cp_reps.dat INFO:rosetta:core.scoring.elec.util: Read 40 countpair representative atoms INFO:rosetta:core.pack.dunbrack.RotamerLibrary: shapovalov_lib_fixes_enable option is true. INFO:rosetta:core.pack.dunbrack.RotamerLibrary: shapovalov_lib::shap_dun10_smooth_level of 1( aka lowest_smooth ) got activated. INFO:rosetta:core.pack.dunbrack.RotamerLibrary: Binary rotamer library selected: /Users/jadolfbr/Library/Python/3.6/lib/python/site-packages/pyrosetta-2019.39+release.93456a567a8-py3.6-macosx-10.6-intel.egg/pyrosetta/database/rotamer/shapovalov/StpDwn_0-0-0/Dunbrack10.lib.bin INFO:rosetta:core.pack.dunbrack.RotamerLibrary: Using Dunbrack library binary file '/Users/jadolfbr/Library/Python/3.6/lib/python/site-packages/pyrosetta-2019.39+release.93456a567a8-py3.6-macosx-10.6-intel.egg/pyrosetta/database/rotamer/shapovalov/StpDwn_0-0-0/Dunbrack10.lib.bin'. INFO:rosetta:core.pack.dunbrack.RotamerLibrary: Dunbrack 2010 library took 0.240326 seconds to load from binary INFO:rosetta:core.pack.pack_rotamers: built 1177 rotamers at 35 positions. INFO:rosetta:core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph INFO:rosetta:core.util.metalloproteins_util: Automatically setting covalent bonds between metal ions and metal-binding residues. INFO:rosetta:core.util.metalloproteins_util: Automatically setting up constraints between metal ions and metal-binding residues.
chA = pyrosetta.rosetta.core.select.residue_selector.ChainSelector("A")
chB = pyrosetta.rosetta.core.select.residue_selector.ChainSelector("B")
view = sum(
[
viewer.init(pose),
viewer.setStyle(cartoon_color="lightgrey", radius=0.25),
viewer.setSurface(residue_selector=chA, colorscheme="greenCarbon", opacity=0.65, surface_type="VDW"),
viewer.setSurface(residue_selector=chB, color="blue", opacity=0.75, surface_type="SAS"),
viewer.setDisulfides(radius=0.25),
viewer.setZoom(factor=1.5)
]
)
view()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
view.reinit() # Subtract all visualization modules previously added to the Viewer
view()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
viewer.setZoomTo()
can zoom into a PyRosetta ResidueSelector
:
pose = pyrosetta.io.pose_from_file("inputs/1QCQ.pdb")
INFO:rosetta:core.import_pose.import_pose: File 'inputs/1QCQ.pdb' automatically determined to be of type PDB INFO:rosetta:core.io.pdb.pdb_reader: Parsing 23 .pdb records with unknown format to search for Rosetta-specific comments. INFO:rosetta:core.util.metalloproteins_util: Automatically setting covalent bonds between metal ions and metal-binding residues. INFO:rosetta:core.util.metalloproteins_util: Automatically setting up constraints between metal ions and metal-binding residues.
helix_selector = pyrosetta.rosetta.core.select.residue_selector.SecondaryStructureSelector("H")
sheet_selector = pyrosetta.rosetta.core.select.residue_selector.SecondaryStructureSelector("E")
loop_selector = pyrosetta.rosetta.core.select.residue_selector.SecondaryStructureSelector("L")
modules = [
viewer.setBackgroundColor(color="black"),
viewer.setStyle(residue_selector=helix_selector, cartoon_color="blue", label=False, radius=0),
viewer.setStyle(residue_selector=sheet_selector, cartoon_color="red", label=False, radius=0),
viewer.setStyle(residue_selector=loop_selector, cartoon_color="white", label=False, radius=0),
viewer.setZoomTo(residue_selector=sheet_selector)
]
viewer.init(pose, window_size=(1200, 600), modules=modules).show()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
View live trajectory:
pose = pyrosetta.io.pose_from_file("inputs/2FD7.pdb")
INFO:rosetta:core.import_pose.import_pose: File 'inputs/2FD7.pdb' automatically determined to be of type PDB INFO:rosetta:core.io.pdb.pdb_reader: Parsing 30 .pdb records with unknown format to search for Rosetta-specific comments. INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG1 on residue VAL 15 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG2 on residue VAL 15 INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 3 40 INFO:rosetta:core.conformation.Conformation: current variant for 3 CYS INFO:rosetta:core.conformation.Conformation: current variant for 40 CYS INFO:rosetta:core.conformation.Conformation: current variant for 3 CYD INFO:rosetta:core.conformation.Conformation: current variant for 40 CYD INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 4 32 INFO:rosetta:core.conformation.Conformation: current variant for 4 CYS INFO:rosetta:core.conformation.Conformation: current variant for 32 CYS INFO:rosetta:core.conformation.Conformation: current variant for 4 CYD INFO:rosetta:core.conformation.Conformation: current variant for 32 CYD INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 16 26 INFO:rosetta:core.conformation.Conformation: current variant for 16 CYS INFO:rosetta:core.conformation.Conformation: current variant for 26 CYS INFO:rosetta:core.conformation.Conformation: current variant for 16 CYD INFO:rosetta:core.conformation.Conformation: current variant for 26 CYD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 15 because of missing atom number 6 atom name CG1 INFO:rosetta:core.pack.task: Packer task: initialize from command line() INFO:rosetta:core.scoring.ScoreFunctionFactory: SCOREFUNCTION: ref2015 INFO:rosetta:core.scoring.ScoreFunctionFactory: The -auto_setup_metals flag was used with no metalbinding_constraint weight set in the weights file. Setting to 1.0. INFO:rosetta:core.pack.pack_rotamers: built 2 rotamers at 1 positions. INFO:rosetta:core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph INFO:rosetta:core.util.metalloproteins_util: Automatically setting covalent bonds between metal ions and metal-binding residues. INFO:rosetta:core.util.metalloproteins_util: Automatically setting up constraints between metal ions and metal-binding residues.
view = viewer.init(pose, delay=0.15) \
+ viewer.setStyle(radius=0.1) \
+ viewer.setDisulfides(radius=0.1)
backrub = pyrosetta.rosetta.protocols.backrub.BackrubMover()
minimize = pyrosetta.rosetta.protocols.minimization_packing.MinMover()
WARNING:pyrosetta.distributed.viewer:Input argument 'delay' should be an instance of float. Setting 'delay' to default.
INFO:rosetta:core.mm.MMBondAngleLibrary: MM bond angle sets added fully assigned: 603; wildcard: 0 and 1 virtual parameter.
for _ in range(100):
backrub.apply(pose)
minimize.apply(pose)
view.show()
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
Display preset custom viewers for routine visualizations:
pdbfiles = [os.path.join("inputs", f) for f in ["3EK4.pdb", "6MSR.pdb", "1QCQ.pdb", "2FD7.pdb"]]
poses = [pyrosetta.io.pose_from_file(p) for p in pdbfiles]
INFO:rosetta:core.import_pose.import_pose: File 'inputs/3EK4.pdb' automatically determined to be of type PDB INFO:rosetta:core.io.pdb.pdb_reader: Parsing 86 .pdb records with unknown format to search for Rosetta-specific comments. INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: CA 350 was added by a jump, with base residue 257 INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: CA 351 was added by a jump, with base residue 299 INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: CA 352 was added by a jump, with base residue 337 INFO:rosetta:core.chemical.AtomICoor: [ WARNING ] IcoorAtomID::atom_id(): Cannot get atom_id for POLYMER_LOWER of residue VAL 164. Returning BOGUS ID instead. INFO:rosetta:core.conformation.Residue: [ WARNING ] missing an atom: 164 H that depends on a nonexistent polymer connection! INFO:rosetta:core.conformation.Residue: [ WARNING ] --> generating it using idealized coordinates. INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OXT on residue ASN:CtermProteinFull 348 INFO:rosetta:core.conformation.Conformation: [ WARNING ] Failed to find a residue connection for residue 163 with connection point 2 INFO:rosetta:core.conformation.Conformation: [ WARNING ] Failed to find a residue connection for residue 164 with connection point 1 INFO:rosetta:core.util.metalloproteins_util: Automatically setting covalent bonds between metal ions and metal-binding residues. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 257's OD1 atom and residue 349's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 261's OD1 atom and residue 349's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 263's O atom and residue 349's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 268's OE1 atom and residue 349's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 268's OE2 atom and residue 349's CA atom. INFO:rosetta:core.conformation.Residue: [ WARNING ] Residue connection id changed when creating a new residue at seqpos 268 INFO:rosetta:core.conformation.Residue: [ WARNING ] ResConnID info stored on the connected residue (residue 349) is now out of date! INFO:rosetta:core.conformation.Residue: [ WARNING ] Connection atom name (in src): OE1 INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 293's OD2 atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 295's OD1 atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 297's OD1 atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 299's O atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 304's OE1 atom and residue 350's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 304's OE2 atom and residue 350's CA atom. INFO:rosetta:core.conformation.Residue: [ WARNING ] Residue connection id changed when creating a new residue at seqpos 304 INFO:rosetta:core.conformation.Residue: [ WARNING ] ResConnID info stored on the connected residue (residue 350) is now out of date! INFO:rosetta:core.conformation.Residue: [ WARNING ] Connection atom name (in src): OE1 INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 332's OD2 atom and residue 351's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 334's OD1 atom and residue 351's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 336's O atom and residue 351's CA atom. INFO:rosetta:core.util.metalloproteins_util: Adding covalent linkage between residue 341's OE2 atom and residue 351's CA atom. INFO:rosetta:core.util.metalloproteins_util: Automatically setting up constraints between metal ions and metal-binding residues. INFO:rosetta:core.import_pose.import_pose: File 'inputs/6MSR.pdb' automatically determined to be of type PDB INFO:rosetta:core.io.pdb.pdb_reader: Parsing 1778 .pdb records with unknown format to search for Rosetta-specific comments. INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: [ WARNING ] discarding 3 atoms at position 1 in file inputs/6MSR.pdb. Best match rsd_type: GLY:NtermProteinFull INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: [ WARNING ] discarding 3 atoms at position 134 in file inputs/6MSR.pdb. Best match rsd_type: GLY:NtermProteinFull INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: [ WARNING ] discarding 3 atoms at position 257 in file inputs/6MSR.pdb. Best match rsd_type: GLY:NtermProteinFull INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 3 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 3 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 3 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 7 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 7 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 7 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 7 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 21 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 21 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 21 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 21 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 22 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 32 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 32 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 32 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue GLU 33 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 33 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 33 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 33 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 35 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 35 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 35 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 35 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 36 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 36 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 36 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 36 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 48 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS:CtermProteinFull 76 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 83 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 84 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 84 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 84 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 90 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 97 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 97 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 97 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 97 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 98 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OG on residue SER 102 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OG on residue SER 106 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue GLU 108 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 108 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 108 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 108 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 109 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 109 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 109 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 111 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 111 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 112 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 112 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue ASN 113 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OD1 on residue ASN 113 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: ND2 on residue ASN 113 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS:CtermProteinFull 152 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS:CtermProteinFull 152 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS:CtermProteinFull 152 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 159 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 160 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 160 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 160 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 166 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 166 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 174 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NE on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH1 on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NH2 on residue ARG 180 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OG on residue SER 182 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue GLU 184 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 184 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 184 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 184 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue GLU 185 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue GLU 185 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE1 on residue GLU 185 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OE2 on residue GLU 185 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 187 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 187 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 187 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue LYS 188 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS 188 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS 188 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS 188 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG on residue ASN 189 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: OD1 on residue ASN 189 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: ND2 on residue ASN 189 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CD on residue LYS:CtermProteinFull 228 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CE on residue LYS:CtermProteinFull 228 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: NZ on residue LYS:CtermProteinFull 228 INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 3 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 7 because of missing atom number 8 atom name NE INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 21 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 22 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 32 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 33 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 35 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 36 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 48 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 76 because of missing atom number 10 atom name NZ INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 83 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 84 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 90 because of missing atom number 9 atom name NZ INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 97 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 98 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 102 because of missing atom number 6 atom name OG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 106 because of missing atom number 6 atom name OG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 108 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 109 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 111 because of missing atom number 8 atom name CE INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 112 because of missing atom number 8 atom name CE INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 113 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 152 because of missing atom number 8 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 159 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 160 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 166 because of missing atom number 8 atom name CE INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 174 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 180 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 182 because of missing atom number 6 atom name OG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 184 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 185 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 187 because of missing atom number 7 atom name CD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 188 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 189 because of missing atom number 6 atom name CG INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 228 because of missing atom number 8 atom name CD INFO:rosetta:core.pack.task: Packer task: initialize from command line() INFO:rosetta:core.scoring.ScoreFunctionFactory: SCOREFUNCTION: ref2015 INFO:rosetta:core.scoring.ScoreFunctionFactory: The -auto_setup_metals flag was used with no metalbinding_constraint weight set in the weights file. Setting to 1.0. INFO:rosetta:core.pack.pack_rotamers: built 1177 rotamers at 35 positions. INFO:rosetta:core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph INFO:rosetta:core.util.metalloproteins_util: Automatically setting covalent bonds between metal ions and metal-binding residues. INFO:rosetta:core.util.metalloproteins_util: Automatically setting up constraints between metal ions and metal-binding residues. INFO:rosetta:core.import_pose.import_pose: File 'inputs/1QCQ.pdb' automatically determined to be of type PDB INFO:rosetta:core.io.pdb.pdb_reader: Parsing 23 .pdb records with unknown format to search for Rosetta-specific comments. INFO:rosetta:core.util.metalloproteins_util: Automatically setting covalent bonds between metal ions and metal-binding residues. INFO:rosetta:core.util.metalloproteins_util: Automatically setting up constraints between metal ions and metal-binding residues. INFO:rosetta:core.import_pose.import_pose: File 'inputs/2FD7.pdb' automatically determined to be of type PDB INFO:rosetta:core.io.pdb.pdb_reader: Parsing 30 .pdb records with unknown format to search for Rosetta-specific comments. INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG1 on residue VAL 15 INFO:rosetta:core.conformation.Conformation: [ WARNING ] missing heavyatom: CG2 on residue VAL 15 INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 3 40 INFO:rosetta:core.conformation.Conformation: current variant for 3 CYS INFO:rosetta:core.conformation.Conformation: current variant for 40 CYS INFO:rosetta:core.conformation.Conformation: current variant for 3 CYD INFO:rosetta:core.conformation.Conformation: current variant for 40 CYD INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 4 32 INFO:rosetta:core.conformation.Conformation: current variant for 4 CYS INFO:rosetta:core.conformation.Conformation: current variant for 32 CYS INFO:rosetta:core.conformation.Conformation: current variant for 4 CYD INFO:rosetta:core.conformation.Conformation: current variant for 32 CYD INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 16 26 INFO:rosetta:core.conformation.Conformation: current variant for 16 CYS INFO:rosetta:core.conformation.Conformation: current variant for 26 CYS INFO:rosetta:core.conformation.Conformation: current variant for 16 CYD INFO:rosetta:core.conformation.Conformation: current variant for 26 CYD INFO:rosetta:core.pack.pack_missing_sidechains: packing residue number 15 because of missing atom number 6 atom name CG1 INFO:rosetta:core.pack.task: Packer task: initialize from command line() INFO:rosetta:core.scoring.ScoreFunctionFactory: SCOREFUNCTION: ref2015 INFO:rosetta:core.scoring.ScoreFunctionFactory: The -auto_setup_metals flag was used with no metalbinding_constraint weight set in the weights file. Setting to 1.0. INFO:rosetta:core.pack.pack_rotamers: built 2 rotamers at 1 positions. INFO:rosetta:core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph INFO:rosetta:core.util.metalloproteins_util: Automatically setting covalent bonds between metal ions and metal-binding residues. INFO:rosetta:core.util.metalloproteins_util: Automatically setting up constraints between metal ions and metal-binding residues.
# Display preset custom viewers for routine visualizations:
viewer.presets.coreBoundarySurface(poses, window_size=(800, 600), continuous_update=True)
INFO:rosetta:core.select.residue_selector.LayerSelector: Setting LayerSelector to use sidechain neighbors to determine burial. INFO:rosetta:core.select.residue_selector.LayerSelector: Set cutoffs for core and surface to 5.2 and 2, respectively, in LayerSelector. INFO:rosetta:core.select.residue_selector.LayerSelector: Setting core=true boundary=false surface=false in LayerSelector. INFO:rosetta:core.select.residue_selector.LayerSelector: Setting LayerSelector to use sidechain neighbors to determine burial. INFO:rosetta:core.select.residue_selector.LayerSelector: Set cutoffs for core and surface to 5.2 and 2, respectively, in LayerSelector. INFO:rosetta:core.select.residue_selector.LayerSelector: Setting core=false boundary=true surface=false in LayerSelector. INFO:rosetta:core.select.residue_selector.LayerSelector: Setting LayerSelector to use sidechain neighbors to determine burial. INFO:rosetta:core.select.residue_selector.LayerSelector: Set cutoffs for core and surface to 5.2 and 2, respectively, in LayerSelector. INFO:rosetta:core.select.residue_selector.LayerSelector: Setting core=false boundary=false surface=true in LayerSelector.
interactive(children=(IntSlider(value=0, description='Decoys', max=3), Output()), _dom_classes=('widget-intera…
<function pyrosetta.distributed.viewer.core.Viewer.show.<locals>.view(i=0)>
viewer.presets.ligandsAndMetals(poses, window_size=(800, 600), continuous_update=False)
interactive(children=(IntSlider(value=0, continuous_update=False, description='Decoys', max=3), Output()), _do…
<function pyrosetta.distributed.viewer.core.Viewer.show.<locals>.view(i=0)>
For Developers: contribute your custom preset visualizations to PyRosetta:
~Rosetta/main/source/src/python/PyRosetta/src/pyrosetta/distributed/viewer/presets/\_\_init\_\_.py
templatePreset
function, renaming it to the name of your new preset Viewer (e.g. myCustomPreset
in step #5).__all__
list.RosettaCommons/main
import pyrosetta.distributed.viewer as viewer
viewer.presets.myCustomPreset(poses)
def myCustomPreset(packed_and_poses_and_pdbs=None, *args, **kwargs):
"""
Add a description of the preset Viewer here
"""
# Add custrom ResidueSelectors
metals_selector = pyrosetta.rosetta.core.select.residue_selector.ResiduePropertySelector(
pyrosetta.rosetta.core.chemical.ResidueProperty.METAL
)
ligands_selector = pyrosetta.rosetta.core.select.residue_selector.ResiduePropertySelector(
pyrosetta.rosetta.core.chemical.ResidueProperty.LIGAND
)
# Add custom Viewer commands
view = viewer.init(packed_and_poses_and_pdbs=packed_and_poses_and_pdbs, *args, **kwargs) \
+ viewer.setBackgroundColor("white") \
+ viewer.setStyle(style="stick", colorscheme="lightgreyCarbon", radius=0.15) \
+ viewer.setStyle(residue_selector=ligands_selector, style="stick", colorscheme="brownCarbon", radius=0.5, label=True) \
+ viewer.setStyle(residue_selector=metals_selector, style="sphere", colorscheme="chainHetatm", radius=1.5, label=True) \
+ viewer.setHydrogenBonds() \
+ viewer.setDisulfides(radius=0.15) \
+ viewer.setHydrogens(color="white", radius=0.033, polar_only=True) \
+ viewer.setSurface(residue_selector=ligands_selector, surface_type="VDW", opacity=0.5, color="magenta") \
+ viewer.setSurface(residue_selector=metals_selector, surface_type="VDW", opacity=0.5, color="magenta") \
+ viewer.setZoomTo(residue_selector=ligands_selector)
return view()
myCustomPreset(poses[0])
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
pyrosetta.distributed.viewer
visualization modules¶help(viewer.setBackgroundColor)
Help on class setBackgroundColor in module pyrosetta.distributed.viewer.modules: class setBackgroundColor(builtins.object) | Set Viewer background color with either Hexcode or standard colors. | | Parameters | ---------- | first : optional | `color` | | Hexcode literal (e.g. 0xffffffff) or `str` indicating a standard color (e.g. "black"). | Default: 0xffffffff | | Returns | ------- | A Viewer instance. | | Methods defined here: | | __init__(self, color=4294967295) | Initialize self. See help(type(self)) for accurate signature. | | apply(self, viewer, pose, pdbstring) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
help(viewer.setDisulfides)
Help on class setDisulfides in module pyrosetta.distributed.viewer.modules: class setDisulfides(builtins.object) | Display disulfide bonds according to `pyrosetta.rosetta.core.conformation.is_disulfide_bond()` | for all combinations of cysteine residues in each initialized `.pdb` file, `Pose` or `PackedPose` object. | | Parameters | ---------- | first : optional | `color` | | `str` indicating a standard color (e.g. "black"). | Default: "gold" | | second : optional | `radius` | | `float` or `int` indicating the radius of the stick connecting the atoms participating in each disulfide bond. | Default: 0.5 | | Returns | ------- | A Viewer instance. | | Methods defined here: | | __init__(self, color='gold', radius=0.5) | Initialize self. See help(type(self)) for accurate signature. | | apply(self, viewer, pose, pdbstring) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
help(viewer.setHydrogenBonds)
Help on class setHydrogenBonds in module pyrosetta.distributed.viewer.modules: class setHydrogenBonds(builtins.object) | Display hydrogen bonds according to `pyrosetta.rosetta.core.pose.Pose.get_hbonds()` | in each initialized `.pdb` file, `Pose` or `PackedPose` object. | | Parameters | ---------- | first : optional | `color` | | `str` indicating a standard color (e.g. "yellow"). | Default: "black" | | second : optional | `dashed` | | `True` or `False` to show hydrogen bonds as dashed lines. | If `True`, then option `radius` must be `None`. | If `False`, then option `radius` must be specified. | Default: True | | third : optional | `radius` | | `float` or `int` indicating the radius of the solid (non-dashed) stick connecting the atoms participating | in each hydrogen bond. If set, this automatically sets the option `dashed` to `False`. | Default: None | | Returns | ------- | A Viewer instance. | | Methods defined here: | | __init__(self, color='black', dashed=True, radius=None) | Initialize self. See help(type(self)) for accurate signature. | | apply(self, viewer, pose, pdbstring) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
help(viewer.setHydrogens)
Help on class setHydrogens in module pyrosetta.distributed.viewer.modules: class setHydrogens(builtins.object) | Show all or only polar hydrogen atoms in each initialized `.pdb` file, `Pose` or `PackedPose` object. | | Parameters | ---------- | first : optional | `color` | | `str` indicating a standard color (e.g. "grey"). | Default: "white" | | second : optional | `radius` | | `float` or `int` indicating the radius of the hydrogen atom stick represnetations. | Default: 0.05 | | third : optional | `polar_only` | | `True` or `False`. `True` to show only polar hydrogen atoms, and `False` to show all hydrogen atoms. | Default: False | | Returns | ------- | A Viewer instance. | | Methods defined here: | | __init__(self, color='white', radius=0.05, polar_only=False) | Initialize self. See help(type(self)) for accurate signature. | | apply(self, viewer, pose, pdbstring) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
help(viewer.setStyle)
Help on class setStyle in module pyrosetta.distributed.viewer.modules: class setStyle(builtins.object) | Show and color cartoon, and/or show heavy atoms with provided style, color and radius for each initialized | `.pdb` file, `Pose` or `PackedPose` object. If the `residue_selector` argument is provided, apply styles | only to the selected residues. If the `command` argument is provided, override all other arguments and pass | `py3Dmol.view.setStyle()` commands to the Viewer. | | Parameters | ---------- | first : optional | `residue_selector` | | An instance of `pyrosetta.rosetta.core.select.residue_selector.ResidueSelector` on which to apply the style(s). | Default: None | | second : optional | `cartoon` | | `True` or `False` to show cartoon representation. | Default: True | | third : optional | `cartoon_color` | | Hexcode literal (e.g. 0xAF10AB) or `str` indicating a standard color (e.g. "grey") for the cartoon representation. | If "spectrum", apply reversed color gradient based on residue numbers. The option `cartoon` must also be set to `True`. | Default: "spectrum" | Reference: https://3dmol.csb.pitt.edu/doc/types.html#ColorSpec | | fourth : optional | `style` | | `str` indicating a representation style of heavy atoms, choosing from either "line", "cross", "stick", or "sphere". | Default: "stick" | | fifth : optional | `colorscheme` | | `str` indicating the color scheme for heavy atoms represented by the `style` option. Options include: | A lower-case standard color followed by "Carbon" (e.g. "orangeCarbon") | "ssPyMOL": PyMol secondary colorscheme | "ssJmol": Jmol secondary colorscheme | "Jmol": Jmol primary colorscheme | "default": default colorscheme | "amino": amino acid colorscheme | "shapely": shapely protien colorscheme | "nucleic": nucleic acid colorscheme | "chain": standard chain colorscheme | "chainHetatm": chain Hetatm colorscheme | Default: "blackCarbon" | Reference: https://3dmol.csb.pitt.edu/doc/types.html#ColorschemeSpec | | sixth : optional | `radius` | | `float` or `int` indicating the radius of the heavy atoms represented by the `style` option. | Default: 0.1 | | seventh : optional | `label` | | `True` or `False` to show labels next to residues selected by the `residue_selector` option. | Default: True | | eighth : optional | `label_fontsize` | | `int` or `float` indicating the font size of labels next to residues selected by the `residue_selector` option, | only if `label` is `True`. | Default: 12 | | ninth : optional | `label_background` | | `True` or `False` to show the background of labels next to residues selected by the `residue_selector` option, | only if `label` is `True`. | Default: False | | tenth : optional | `label_fontcolor` | | `str` indicating a standard font color (e.g. "grey") for label text next to residues selected by the `residue_selector` option, | only if `label` is `True`. | Default: "black" | | eleventh : optional | `command` | | `dict` or `tuple` of `dict`s of `py3Dmol.view.setStyle()` commands. If specified, this option overrides all other options. | Default: None | Example: | command = {"hetflag": True}, {"stick": {"singleBond": False, "colorscheme": "greyCarbon", "radius": 0.15}} | view = viewer.init(poses) + viewer.setStyle(command=command) | view.show() | | Returns | ------- | A Viewer instance. | | Methods defined here: | | __init__(self, residue_selector=None, cartoon=True, cartoon_color='spectrum', style='stick', colorscheme='blackCarbon', radius='0.1', label=True, label_fontsize=12, label_background=False, label_fontcolor='black', command=None) | Initialize self. See help(type(self)) for accurate signature. | | apply(self, viewer, pose, pdbstring) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
help(viewer.setSurface)
Help on class setSurface in module pyrosetta.distributed.viewer.modules: class setSurface(builtins.object) | Show the specified surface for each initialized `.pdb` file, `Pose` or `PackedPose` object. | | Parameters | ---------- | first : optional | `residue_selector` | | An instance of `pyrosetta.rosetta.core.select.residue_selector.ResidueSelector` to select residues | on which to apply the surface. | Default: None | | second : optional | `surface_type` | | `str` indicating surface type to be displayed. py3Dmol supports the following options: | "VDW": Van der Waals surface | "MS": Molecular surface | "SES": Solvent excluded surface | "SAS": Solvent accessible surface | Default: "VDW" | | third : optional | `opacity` | | `float` or `int` between 0 and 1 for opacity of the displayed surface. | Default: 0.5 | | fourth : optional | `color` | | `str` indicating a standard color (e.g. "grey") of the surface to be displayed. | Either `color` or `colorscheme` may be specified, where `colorscheme` overrides `color`. | Default: None | | fifth : optional | `colorscheme` | | `str` indicating the color scheme of the surface to be displayed. | Either `color` or `colorscheme` may be specified, where `colorscheme` overrides `color`. | Options include: | A lower-case standard color followed by "Carbon" (e.g. "yellowCarbon") | "ssPyMOL": PyMol secondary colorscheme | "ssJmol": Jmol secondary colorscheme | "Jmol": Jmol primary colorscheme | "default": default colorscheme | "amino": amino acid colorscheme | "shapely": shapely protien colorscheme | "nucleic": nucleic acid colorscheme | "chain": standard chain colorscheme | "chainHetatm": chain Hetatm colorscheme | Default: None | Reference: https://3dmol.csb.pitt.edu/doc/types.html#ColorschemeSpec | | Returns | ------- | A Viewer instance. | | Methods defined here: | | __init__(self, residue_selector=None, surface_type='VDW', opacity=0.5, color=None, colorscheme=None) | Initialize self. See help(type(self)) for accurate signature. | | apply(self, viewer, pose, pdbstring) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
help(viewer.setZoom)
Help on class setZoom in module pyrosetta.distributed.viewer.modules: class setZoom(builtins.object) | Set the zoom magnification factor of each initialized `.pdb` file, `Pose` or `PackedPose` object. | Values >1 zoom in, and values <1 zoom out. | | Parameters | ---------- | first : optional | `factor` | | `float` or `int` indicating the zoom magnification factor. | Default: 2 | | Returns | ------- | A Viewer instance. | | Methods defined here: | | __init__(self, factor=2) | Initialize self. See help(type(self)) for accurate signature. | | apply(self, viewer, pose, pdbstring) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
help(viewer.setZoomTo)
Help on class setZoomTo in module pyrosetta.distributed.viewer.modules: class setZoomTo(builtins.object) | Zoom to a `ResidueSelector` in each initialized `.pdb` file, `Pose` or `PackedPose` object. | | Parameters | ---------- | first : optional | `residue_selector` | | An instance of `pyrosetta.rosetta.core.select.residue_selector.ResidueSelector` into which to zoom. | Default: None | | Returns | ------- | A Viewer instance. | | Methods defined here: | | __init__(self, residue_selector=None) | Initialize self. See help(type(self)) for accurate signature. | | apply(self, viewer, pose, pdbstring) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)