Description Usage Arguments Value Examples
Add residue labels. This will generate one label per a
residue within the selected atoms. The label will be at the
centroid of the atoms and styled according to the passed style.
The label text will be resn
resi
1 | m_add_res_labels(id, sel = m_sel(), style = m_style_label(), byframe)
|
id |
R3dmol |
sel |
Atom selection specification |
style |
Style spec to add to specified atoms |
byframe |
if true, create labels for every individual frame, not just current |
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)
r3dmol() %>%
m_add_model(data = pdb_1j72, format = "pdb") %>%
m_set_style(
style = c(
m_style_stick(radius = 0.15),
m_style_cartoon()
)
) %>%
m_add_res_labels(
sel = m_sel(resn = "GLY"),
style = m_style_label(
font = "Arial",
fontColor = "white",
backgroundColor = "black",
showBackground = TRUE
)
) %>%
m_zoom_to()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.