m_style_cartoon {r3dmol}R Documentation

Specify Styling for Cartoon

Description

Styling options for the cartoon representation. Used inside m_add_style() and m_set_style().

Usage

m_style_cartoon(
  color = NULL,
  style = "rectangle",
  ribbon = FALSE,
  arrows = TRUE,
  tubes = FALSE,
  thickness = 0.4,
  width = NULL,
  opacity = 1,
  colorfunc = NULL
)

Arguments

color

Block color values. Strand color, may specify as 'spectrum' which will apply reversed gradient based on residue number.

style

style of cartoon rendering ("trace", "oval", "rectangle" (default), "parabola", "edged").

ribbon

whether to use constant strand width, disregarding secondary structure; use thickness to adjust radius.

arrows

whether to add arrows showing beta-sheet directionality; does not apply to trace or ribbon.

tubes

whether to display alpha helices as simple cylinders; does not apply to trace.

thickness

cartoon strand thickness, default is 0.4.

width

cartoon strand width, default is secondary structure-dependent; does not apply to trace or ribbon.

opacity

set opacity from 0-1; transparency is set per-chain with a warning outputted in the event of ambiguity.

colorfunc

Allows the user to provide a function for setting the colorSchemes, written in javascript. Official Documentation

Examples

r3dmol() %>%
  m_add_model(data = pdb_1j72, format = "pdb") %>%
  m_set_style(style = m_style_cartoon(color = "spectrum")) %>%
  m_zoom_to()

[Package r3dmol version 0.1.2 Index]