Skip to contents

Bio3DView

Interactive biomolecular structure visualization of bio3d objects in R.

Installation

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")

Example 1: Basic Structure Visualization

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:

Figure 1. Structure of HRas PDB code: 5p21. Note that the image here is not interactive due to restrictions with GitHub GFM format.

Example 2: Visualizing a Multi-Structure Ensemble

Generate an interactive view of a bio3d pdbs object containing multiple structures:

data(transducin)

view.pdbs(transducin$pdbs, colorScheme = "res") 
Figure 2. All 53 PDB structures of Transducin colored by residue index

Example 3: NMA Visualization

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()
Figure 3. Predicted large scale domain motions of Adenalate kinase from a bio3d based Normal Mode Analysis.

Going further

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.