Styling options for ball and stick representations.

m_style_ballnstick(
  sphereScale = 0.3,
  colorScheme = NULL,
  color = NULL,
  sphereRadius = NULL,
  stickRadius = 0.25,
  hidden = FALSE,
  opacity = 1,
  colorfunc = NULL
)

Arguments

sphereScale

Relative scaling of sphere atomic radii.

colorScheme

Specify scheme to color the atoms by. Default is "default". Other choices are "Carbon", "ssPyMOL", "ssJmol", "Jmol", "default", "amino", "shapely", "nucleic", "chain", "chainHetatm", "prop".

color

Specific coloring for everything in selection, overrides any specified colorScheme.

sphereRadius

Set absolute radius for all spheres in selection (overriding the atomic raddii)l

stickRadius

Set absolute radius for all sticks in the selection.

hidden

Boolean - do not show atoms in selection. Default FALSE

opacity

Opacity of spheres and sticks, 0 being invisible, 1 being opaque. Must be the same for all atoms in the model.

colorfunc

Allows the user to provide a function for setting the colorSchemes, written in javascript. Official Documentation

Examples

r3dmol() %>%
  m_add_model(data = pdb_1j72, format = "pdb") %>%
  m_set_style(style = m_style_ballnstick()) %>%
  m_zoom_to()