Adds sphere at given location, with given radius.

m_add_sphere(id, center, radius = 1, spec = m_shape_spec(), ...)

Arguments

id

R3dmol id or a r3dmol object (the output from r3dmol())

center

center point of sphere. Can be m_sel().

radius

radius of sphere.

spec

Additional shape specifications defined with m_shape_spec().

...

Additional shape specifcations, that can be called outside of m_shape_spec() such as color = 'blue'

Examples

r3dmol() %>%
  m_add_model(data = m_fetch_pdb("1bna")) %>%
  m_add_sphere(
    center = m_sel(resi = 1),
    spec = m_shape_spec(color = "green", wireframe = TRUE)
  ) %>%
  m_zoom_to(sel = m_sel(resi = 1))