m_add_sphere: Add Sphere Shape

Description Usage Arguments Examples

View source: R/add.R

Description

Adds sphere at given location, with given radius.

Usage

1
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

1
2
3
4
5
6
7
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))

r3dmol documentation built on March 14, 2021, 5:08 p.m.