Description Usage Arguments Examples
Creates a scene with a number of simple defaults in order to quickly view the structure without having to write multiple lines of code.
1 2 3 4 5 6 7 8 9 10 |
model |
Model to add to scene. Can be |
highlight |
Given selection will additionally have 'ball-n-stick' representation. View will also zoom to selection. |
zoom |
Logical. FALSE will not zoom onto highlighted selection. |
spin |
TRUE / FALSE will enable or disable spin. A numeric value will change spin speed and negative will reverse the direction. |
nomouse |
Logical. Enables / disables mouse input. |
ribbon |
Logical. Enables / disables ribbon representation. |
outline |
Logical. Enables / disables black outline. |
backgroundColor |
String of simple colour names or hex code to change background color of viewer. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | library(r3dmol)
# write/read demo structure as {bio3d} object
tmp <- tempfile()
write(pdb_6zsl, tmp)
pdb <- bio3d::read.pdb(tmp)
# quickly preview structure
pdb %>%
m_glimpse()
# preview structure, highlighting particular region.
pdb %>%
m_glimpse(m_sel(resi = 1:10, chain = "A"), spin = 0.2)
## Not run:
# Fetch given PDB string and quickly preview structure
"4ozs" %>%
m_glimpse(spin = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.