Description Usage Arguments Value Examples
Re-center the viewer around the provided selection (unlike zoomTo, does not zoom).
| 1 | m_center(id, sel, animationDuration, fixedPath)
 | 
| id | R3dmol  | 
| sel | Selection specification specifying model and atom properties to select. Default: all atoms in viewer | 
| animationDuration | an optional parameter of milliseconds  | 
| fixedPath | if  | 
R3dmol id or a r3dmol object (the output from
r3dmol())
| 1 2 3 4 5 6 | library(r3dmol)
r3dmol() %>%
  m_add_model(data = pdb_6zsl, format = "pdb") %>%
  m_set_style(style = m_style_cartoon()) %>%
  m_center(animationDuration = 1000)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.