![]() |
Rosetta
2021.16
|
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 | |
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.
| 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 |
|||
| ) |
References pyrosetta.tests.distributed.test_dask.format, and fmt.join().
Referenced by pyrosetta.distributed.tasks.taskbase.TaskBase.__setstate__().
| def pyrosetta.distributed.viewer.modules.setStyle.apply | ( | self, | |
| viewer, | |||
| pose, | |||
| pdbstring | |||
| ) |
References pyrosetta.distributed.viewer.modules._pdbstring_to_pose(), pyrosetta.distributed.viewer.modules._pose_to_residue_chain_tuples(), 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.setDisulfides.radius, pyrosetta.distributed.viewer.modules.setHydrogenBonds.radius, basic::sampling::orientations::QuatDBMetadata.radius, pyrosetta.distributed.viewer.modules.setHydrogens.radius, pyrosetta.distributed.viewer.modules.setStyle.radius, pyrosetta.distributed.viewer.modules.setStyle.residue_selector, and pyrosetta.distributed.viewer.modules.setStyle.style.
Referenced by pyrosetta.distributed.tasks.rosetta_scripts.BaseRosettaScriptsTask.execute().
| pyrosetta.distributed.viewer.modules.setStyle.cartoon |
Referenced by pyrosetta.distributed.viewer.modules.setStyle.apply().
| pyrosetta.distributed.viewer.modules.setStyle.cartoon_color |
Referenced by pyrosetta.distributed.viewer.modules.setStyle.apply().
| pyrosetta.distributed.viewer.modules.setStyle.colorscheme |
| pyrosetta.distributed.viewer.modules.setStyle.command |
Referenced by pyrosetta.distributed.viewer.modules.setStyle.apply().
| pyrosetta.distributed.viewer.modules.setStyle.label |
Referenced by pyrosetta.distributed.viewer.modules.setStyle.apply().
| pyrosetta.distributed.viewer.modules.setStyle.label_background |
Referenced by pyrosetta.distributed.viewer.modules.setStyle.apply().
| pyrosetta.distributed.viewer.modules.setStyle.label_fontcolor |
Referenced by pyrosetta.distributed.viewer.modules.setStyle.apply().
| pyrosetta.distributed.viewer.modules.setStyle.label_fontsize |
Referenced by pyrosetta.distributed.viewer.modules.setStyle.apply().
| pyrosetta.distributed.viewer.modules.setStyle.radius |
| pyrosetta.distributed.viewer.modules.setStyle.residue_selector |
| pyrosetta.distributed.viewer.modules.setStyle.style |
Referenced by pyrosetta.distributed.viewer.modules.setStyle.apply().
1.8.7