m_style_cartoon: Specify Styling for Cartoon

Description Usage Arguments Examples

View source: R/style.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

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

r3dmol documentation built on March 14, 2021, 5:08 p.m.