Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🧬 An R package for visualizing molecular data in 3D

License

NotificationsYou must be signed in to change notification settings

swsoyee/r3dmol

Repository files navigation

CRAN statusCodecov test coverageR-CMD-checkLifecycle: experimentalMetacran downloads

This is an R package that provides support for3Dmol.js as ahtmlwidgets.

Installation

Important: This package is still very early in its developmentstages. Please give the repository a star on Github if you find thepackage is useful. In addition, we need your feedback to improve thepackage, feel free to create an issue if you have any question orfeature requirement. You are more than welcome to submit a PR to makeany feasible improvements.

You could install the released version of r3dmol fromCRAN with:

install.packages("r3dmol")

And the development version fromGitHub with:

# install.packages("devtools")devtools::install_github("swsoyee/r3dmol")

Example

library(r3dmol)r3dmol(# Set up the initial viewerviewer_spec= m_viewer_spec(cartoonQuality=10,lowerZoomLimit=50,upperZoomLimit=350  )) %>%  m_add_model(# Add model to scenedata=pdb_6zsl,format="pdb"  ) %>%  m_zoom_to() %>%# Zoom to encompass the whole scene  m_set_style(# Set style of structuresstyle= m_style_cartoon(color="#00cc96"    )  ) %>%  m_set_style(# Set style of specific selectionsel= m_sel(ss="s"),# (selecting by secondary)style= m_style_cartoon(color="#636efa",arrows=TRUE    )  ) %>%  m_set_style(# Style the alpha helixsel= m_sel(ss="h"),# (selecting by alpha helix)style= m_style_cartoon(color="#ff7f0e"    )  ) %>%  m_rotate(# Rotate the scene by given angle on given axisangle=90,axis="y"  ) %>%  m_spin()# Animate the scene by spinning it

spin demo
You can find more demo athere.

About3Dmol.js

Nicholas Rego, David Koes,3Dmol.js: molecular visualization withWebGL,Bioinformatics, Volume 31, Issue 8, 15 April 2015, Pages 1322–1324,

Code of Conduct

Please note that the r3dmol project is released with aContributor CodeofConduct.By contributing to this project, you agree to abide by its terms.

Sponsor this project

 

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp