Description Usage Arguments Value Examples
Create and add model to viewer, given molecular data and its format. If
multi-model file is provided, use m_add_models
adding atom data
to the viewer as separate models.
1 2 3 4 5 6 7 8 9 |
id |
R3dmol |
data |
Path of input data path or a vector of data. |
format |
Input format ( |
keepH |
Default to FALSE, whether to keep or strip hydrogens from imported model. |
options |
Format dependent options. Attributes depend on the input file format. |
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 25 | library(r3dmol)
# Single-model file with m_add_model() function
r3dmol() %>%
m_add_model(data = pdb_6zsl, format = "pdb")
# Multi-model file with m_add_models() function
r3dmol() %>%
m_add_models(data = sdf_multiple, "sdf") %>%
m_zoom_to()
# Multi-model file with m_add_model() function
r3dmol() %>%
m_add_model(data = sdf_multiple, "sdf") %>%
m_zoom_to()
# Add model and keep hydrogens.
## Not run:
r3dmol() %>%
m_add_model(m_fetch_pdb("5D8V"), keepH = TRUE) %>%
m_set_style(m_style_sphere()) %>%
m_zoom_to() %>%
m_spin()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.