m_add_models_as_frames: Create and add model to viewer

Description Usage Arguments Value Examples

View source: R/add.R

Description

Create and add model to viewer. Given multimodel file and its format, different atomlists are stored in model's frame property and model's atoms are set to the 0th frame

Usage

1

Arguments

id

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

data

Path of input data path or a vector of data.

format

Input format (see http://3dmol.csb.pitt.edu/doc/types.html#FileFormats).

Value

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

Examples

1
2
3
4
5
6
7
library(r3dmol)

r3dmol() %>%
  m_add_models_as_frames(data = xyz_multiple, format = "xyz") %>%
  m_animate(options = list(loop = "forward", reps = 1)) %>%
  m_set_style(style = m_style_stick(colorScheme = "magentaCarbon")) %>%
  m_zoom_to()

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