modules¶
- class pyrosetta.distributed.viewer.modules.setBackgroundColor(color=4294967295)¶
Bases:
object
Set Viewer background color with either Hexcode or standard colors.
- firstoptional
color
Hexcode literal (e.g. 0xffffffff) or str indicating a standard color (e.g. “black”). Default: 0xffffffff
A Viewer instance.
- __init__(color=4294967295)¶
- apply(viewer, pose, pdbstring)¶
- class pyrosetta.distributed.viewer.modules.setDisulfides(color='gold', radius=0.5)¶
Bases:
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.
- firstoptional
color
str indicating a standard color (e.g. “black”). Default: “gold”
- secondoptional
radius
float or int indicating the radius of the stick connecting the atoms participating in each disulfide bond. Default: 0.5
A Viewer instance.
- __init__(color='gold', radius=0.5)¶
- apply(viewer, pose, pdbstring)¶
- class pyrosetta.distributed.viewer.modules.setHydrogenBonds(color='black', dashed=True, radius=None)¶
Bases:
object
Display hydrogen bonds according to pyrosetta.rosetta.core.pose.Pose.get_hbonds() in each initialized .pdb file, Pose or PackedPose object.
- firstoptional
color
str indicating a standard color (e.g. “yellow”). Default: “black”
- secondoptional
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
- thirdoptional
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
A Viewer instance.
- __init__(color='black', dashed=True, radius=None)¶
- apply(viewer, pose, pdbstring)¶
- class pyrosetta.distributed.viewer.modules.setHydrogens(color='white', radius=0.05, polar_only=False)¶
Bases:
object
Show all or only polar hydrogen atoms in each initialized .pdb file, Pose or PackedPose object.
- firstoptional
color
str indicating a standard color (e.g. “grey”). Default: “white”
- secondoptional
radius
float or int indicating the radius of the hydrogen atom stick represnetations. Default: 0.05
- thirdoptional
polar_only
True or False. True to show only polar hydrogen atoms, and False to show all hydrogen atoms. Default: False
A Viewer instance.
- __init__(color='white', radius=0.05, polar_only=False)¶
- apply(viewer, pose, pdbstring)¶
- class pyrosetta.distributed.viewer.modules.setStyle(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)¶
Bases:
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.
- firstoptional
residue_selector
An instance of pyrosetta.rosetta.core.select.residue_selector.ResidueSelector on which to apply the style(s). Default: None
- secondoptional
cartoon
True or False to show cartoon representation. Default: True
- thirdoptional
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
- fourthoptional
style
str indicating a representation style of heavy atoms, choosing from either “line”, “cross”, “stick”, or “sphere”. Default: “stick”
- fifthoptional
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
- sixthoptional
radius
float or int indicating the radius of the heavy atoms represented by the style option. Default: 0.1
- seventhoptional
label
True or False to show labels next to residues selected by the residue_selector option. Default: True
- eighthoptional
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
- ninthoptional
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
- tenthoptional
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”
- eleventhoptional
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()
A Viewer instance.
- __init__(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)¶
- apply(viewer, pose, pdbstring)¶
- class pyrosetta.distributed.viewer.modules.setSurface(residue_selector=None, surface_type='VDW', opacity=0.5, color=None, colorscheme=None)¶
Bases:
object
Show the specified surface for each initialized .pdb file, Pose or PackedPose object.
- firstoptional
residue_selector
An instance of pyrosetta.rosetta.core.select.residue_selector.ResidueSelector to select residues on which to apply the surface. Default: None
- secondoptional
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”
- thirdoptional
opacity
float or int between 0 and 1 for opacity of the displayed surface. Default: 0.5
- fourthoptional
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
- fifthoptional
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
A Viewer instance.
- __init__(residue_selector=None, surface_type='VDW', opacity=0.5, color=None, colorscheme=None)¶
- apply(viewer, pose, pdbstring)¶
- class pyrosetta.distributed.viewer.modules.setZoom(factor=2)¶
Bases:
object
Set the zoom magnification factor of each initialized .pdb file, Pose or PackedPose object. Values >1 zoom in, and values <1 zoom out.
- firstoptional
factor
float or int indicating the zoom magnification factor. Default: 2
A Viewer instance.
- __init__(factor=2)¶
- apply(viewer, pose, pdbstring)¶
- class pyrosetta.distributed.viewer.modules.setZoomTo(residue_selector=None)¶
Bases:
object
Zoom to a ResidueSelector in each initialized .pdb file, Pose or PackedPose object.
- firstoptional
residue_selector
An instance of pyrosetta.rosetta.core.select.residue_selector.ResidueSelector into which to zoom. Default: None
A Viewer instance.
- __init__(residue_selector=None)¶
- apply(viewer, pose, pdbstring)¶
- exception pyrosetta.distributed.viewer.modules.ViewerInputError(obj)¶
Bases:
Exception
Exception raised for errors with the input argument residue_selector.
- __init__(obj)¶
- add_note()¶
Exception.add_note(note) – add a note to the exception
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- pyrosetta.distributed.viewer.modules._pose_to_residue_chain_tuples(pose, residue_selector, logger=<Logger pyrosetta.distributed.viewer (WARNING)>)¶
Given a Pose object and ResidueSelector object, return a tuple of `list`s containing PDB residue numbers and chain IDs for the selection.
- pyrosetta.distributed.viewer.modules._pdbstring_to_pose(pdbstring, class_name, logger=<Logger pyrosetta.distributed.viewer (WARNING)>)¶
Convert pdbstring to a Pose with logging.