Learn R Programming

r3dmol (version 0.1.2)

m_bio3d: Load structure from package bio3d

Description

Function to take bio3d structure and use in the r3dmol app.

Usage

m_bio3d(pdb)

Arguments

pdb

bio3d object containing coordinates for desired structure

Examples

Run this code
# NOT RUN {
library(bio3d)
library(r3dmol)

# create bio3d object
pdb <- read.pdb("1bna")

# inspect bio3d object
pdb

# load bio3d object into r3dmol
r3dmol() %>%
  m_add_model(data = m_bio3d(pdb)) %>%
  m_zoom_to()
# }

Run the code above in your browser using DataLab