Interactive biomolecular structure visualization of bio3d objects in R.
To install the development version of bio3dview from GitHub, use:
# install.packages("pak")
pak::pak("bioboot/bio3dview")
Dependencies include the R CRAN packages bio3d and NGLVieweR, which can be installed with:
install.packages("bio3d")
install.packages("NGLVieweR")
First let’s load up the packages and generate a quick NGL (webGL based)
structure overview of a bio3d pdb
class object with a number of simple
defaults. The returned NGLVieweR object can be further added to for
custom interactive visualizations:
library(bio3dview)
library(bio3d)
library(NGLVieweR)
pdb <- read.pdb("5p21")
view.pdb(pdb) |>
setSpin()
Generate an interactive view of a bio3d pdbs
object containing
multiple structures:
data(transducin)
view.pdbs(transducin$pdbs, colorScheme = "res")
Perform a quick Normal Mode Analysis (NMA) and visualize the predicted large-scale domain motions:
adk <- read.pdb("6s36")
m <- nma(adk)
view.nma(m, pdb=adk) |>
setPlay()
Many additional visualization options are available. Check out the Getting Started vignette for more examples, or refer to individual function help pages for detailed documentation.