Styling options for the cartoon representation. Used inside
m_add_style()
and m_set_style()
.
m_style_cartoon(
color = NULL,
style = "rectangle",
ribbon = FALSE,
arrows = TRUE,
tubes = FALSE,
thickness = 0.4,
width = NULL,
opacity = 1,
colorfunc = NULL
)
Block color values. Strand color, may specify as 'spectrum' which will apply reversed gradient based on residue number.
style of cartoon rendering ("trace", "oval", "rectangle" (default), "parabola", "edged").
whether to use constant strand width, disregarding secondary structure; use thickness to adjust radius.
whether to add arrows showing beta-sheet directionality; does not apply to trace or ribbon.
whether to display alpha helices as simple cylinders; does not apply to trace.
cartoon strand thickness, default is 0.4.
cartoon strand width, default is secondary structure-dependent; does not apply to trace or ribbon.
set opacity from 0-1; transparency is set per-chain with a warning outputted in the event of ambiguity.
Allows the user to provide a function for setting the colorSchemes, written in javascript. Official Documentation
r3dmol() %>%
m_add_model(data = pdb_1j72, format = "pdb") %>%
m_set_style(style = m_style_cartoon(color = "spectrum")) %>%
m_zoom_to()