Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
pyrosetta.distributed.viewer.modules.setStyle Class Reference

Public Member Functions

def __init__
 
def apply
 

Public Attributes

 residue_selector
 
 cartoon
 
 cartoon_color
 
 style
 
 colorscheme
 
 radius
 
 label
 
 label_fontsize
 
 label_background
 
 label_fontcolor
 
 command
 

Detailed Description

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.

Constructor & Destructor Documentation

def pyrosetta.distributed.viewer.modules.setStyle.__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 
)

Member Function Documentation

def pyrosetta.distributed.viewer.modules.setStyle.apply (   self,
  viewer,
  pose,
  pdbstring 
)

Member Data Documentation

pyrosetta.distributed.viewer.modules.setStyle.cartoon
pyrosetta.distributed.viewer.modules.setStyle.cartoon_color
pyrosetta.distributed.viewer.modules.setStyle.colorscheme
pyrosetta.distributed.viewer.modules.setStyle.command
pyrosetta.distributed.viewer.modules.setStyle.label
pyrosetta.distributed.viewer.modules.setStyle.label_background
pyrosetta.distributed.viewer.modules.setStyle.label_fontcolor
pyrosetta.distributed.viewer.modules.setStyle.label_fontsize
pyrosetta.distributed.viewer.modules.setStyle.radius
pyrosetta.distributed.viewer.modules.setStyle.residue_selector
pyrosetta.distributed.viewer.modules.setStyle.style

The documentation for this class was generated from the following file: