Description Usage Arguments Value Examples
Add lines between the given points. Will match starting point/s with ending point/s to create a line between each point. Styling options can be supplied as one option, or a vector of length equal to the number of lines.
1 2 3 4 5 6 7 8 9 | m_add_line(
id,
start,
end,
dashed = TRUE,
color = "black",
opacity = 1,
hidden = FALSE
)
|
id |
R3dmol |
start |
Starting position (or |
end |
Ending position (or |
dashed |
Logical whether the lines are dashed. |
color |
Either single or list of color values equal to number of lines. |
opacity |
Either single or list of opacity values equal to number of lines. |
hidden |
Either single or list of hidden values equal to number of lines. |
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 21 22 23 24 | library(r3dmol)
r3dmol() %>%
m_add_model(data = pdb_6zsl) %>%
m_set_style(style = m_style_cartoon()) %>%
m_zoom_to() %>%
m_add_style(
sel = m_sel(resi = 1:10),
style = c(
m_style_stick(),
m_style_sphere(scale = 0.3)
)
) %>%
m_add_line(
start = list(
m_sel(resi = 1, chain = "A"),
m_sel(resi = 1, chain = "A")
),
end = list(
m_sel(resi = 10, chain = "A"),
m_sel(resi = 10, chain = "B")
),
dashed = TRUE
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.