# NOT RUN {
library(r3dmol)
# Translate current view by x,y screen coordinates
r3dmol() %>%
m_add_model(data = pdb_1j72, format = "pdb") %>%
m_set_style(style = list(cartoon = list(), stick = list())) %>%
m_translate(
x = 200,
y = 50,
animationDuration = 1000
) %>%
m_rotate(
angle = 90,
axis = "z",
animationDuration = 1000
) %>%
m_zoom_to()
# Translate current models by x,y screen coordinates
r3dmol() %>%
m_add_model(data = pdb_1j72, format = "pdb") %>%
m_set_style(style = list(cartoon = list(), stick = list())) %>%
m_translate_scene(
x = 200,
y = 50,
animationDuration = 1000
) %>%
m_rotate(
angle = 90,
axis = "z",
animationDuration = 1000
) %>%
m_zoom_to()
# }
Run the code above in your browser using DataLab