Re-center the viewer around the provided selection (unlike zoomTo, does not zoom).
m_center(id, sel, animationDuration, fixedPath)
R3dmol id
or a r3dmol
object (the output from
r3dmol()
)
Selection specification specifying model and atom properties to select. Default: all atoms in viewer
an optional parameter of milliseconds numeric
that
denotes the duration of a zoom animation
if true
animation is constrained to
requested motion, overriding updates that happen during the animation
R3dmol id
or a r3dmol
object (the output from
r3dmol()
)
library(r3dmol)
r3dmol() %>%
m_add_model(data = pdb_6zsl, format = "pdb") %>%
m_set_style(style = m_style_cartoon()) %>%
m_center(animationDuration = 1000)