Description Usage Arguments Value Examples
Takes a selection and overwrites previous styling with given styles.
1 | m_add_style(id, style = m_style_cartoon(), sel = m_sel())
|
id |
R3dmol |
style |
Style spec to apply to specified atoms using m_style_*() |
sel |
Atom selection specification with |
R3dmol id
or a r3dmol
object (the output from
r3dmol()
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(r3dmol)
# Add style to model
r3dmol() %>%
m_add_model(data = pdb_1j72, format = "pdb") %>%
m_add_style(style = m_style_cartoon()) %>%
m_zoom_to()
# Set style to model
r3dmol() %>%
m_add_model(data = pdb_6zsl, format = "pdb") %>%
m_set_style(style = m_style_cartoon()) %>%
m_set_style(
sel = m_sel(chain = "A"),
style = m_style_stick(
radius = 0.5,
colorScheme = "magentaCarbon"
)
) %>%
m_zoom_to()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.