ncbi / icn3d

web-based protein structure viewer and analysis tool interactively or in batch mode
https://www.ncbi.nlm.nih.gov/Structure/icn3d
Other
154 stars 42 forks source link
3d-structure 3d-viewer ar chemical delphi icn3d jupyter-notebook molecular-viewer nodejs nucleotide protein protein-viewer snp structure-viewer vr webgl

iCn3D Structure Viewer

Gallery with live examples, Tutorial

About iCn3D

"I see in 3D" (iCn3D) Structure Viewer is not only a web-based 3D viewer, but also a structure analysis tool interactively or in the batch mode using NodeJS scripts based on the npm package icn3d. iCn3D synchronizes the display of 3D structure, 2D interaction, and 1D sequences and annotations. Users' custom display can be saved in a short URL or a PNG image. The complete package of iCn3D including Three.js and jQuery is in the directory "dist" after you get the source code with the "Code" button. You can click the file "index.html" in the "dist" directory to launch a local version of iCn3D.

Embed iCn3D with iframe or JavaScript libraries

iCn3D can be embedded in a web page by including the URL in HTML iframe, e.g. . This method always shows the most recent version of iCn3D.

To embed iCn3D with JavaScript libraries, the following libraries need to be included: jQuery, jQuery UI, Three.js, and iCn3D library. An html div tag to hold the 3D viewer is added. The iCn3D widget is initialized with the custom defined parameter "cfg": "let icn3dui = new icn3d.iCn3DUI(cfg); await icn3dui.show3DStructure();". Multiple iCn3D widgets can be embedded in a single page. Please see the source code of the example page for reference.

Users can choose to show the most recent version of iCn3D, or a locked version of iCn3D. To show the most recent version, use the library files without the version postfix as shown in the iCn3D Doc page. To show a locked version, use the library files with the version postfix as shown in the source code of iCn3D page. If the input is provided as an MMDB ID, both library files and backend cgis are versioned so that the 3D display will be stable.

Data Sources

iCn3D accepts the following IDs:

iCn3D also accepts the following file types: PDB, mmCIF, Mol2, SDF, XYZ, and iCn3D PNG. The files can be passed through a url, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d/?type=pdb&url=https://storage.googleapis.com/membranome-assets/pdb_files/proteins/FCG2A_HUMAN.pdb, https://www.ncbi.nlm.nih.gov/Structure/icn3d/?type=mmcif&url=https://files.rcsb.org/download/1GPK.cif, or https://www.ncbi.nlm.nih.gov/Structure/icn3d/?type=icn3dpng&url=https://api.figshare.com/v2/file/download/39125801. See the help page or the Doc page for more details.

Third-party libraries used in Frontend

Third-party libraries used in Backend

Tools based on

Building

If you want to build your code easily, you'll need to install nodejs and npm.

Next, clone this repository, and then perform the following setup steps in your working copy of icn3d.

npm config set -g production false
npm install -g gulp
npm install
npm install uglify-js@3.3.9

delete package-lock.json

The first line sets the npm default as dev so that all modules will be installed. The second line installs the gulp build tool globally, making the gulp command available on the command line. The third line install all modules. The fourth line changes the version of uglify-js to an old version, which does not compress class names. The last line may be required for a fresh build to remove old package-lock.json.

You only have to perform the above steps once, to set up your working directory. From then on, to build, simply enter:

gulp

Contact

Please send all comments to wangjiy@ncbi.nlm.nih.gov.

Citing

Bioinformatics. 2020 Jan 1;36(1):131-135. doi: 10.1093/bioinformatics/btz502.

To cite iCn3D, please reference:

Wang J, Youkharibache P, Zhang D, Lanczycki CJ, Geer RC, Madej T, Phan L, Ward M, Lu S, Marchler GH, Wang Y, Bryant SH, Geer LY, Marchler-Bauer A. iCn3D, a Web-based 3D Viewer for Sharing 1D/2D/3D Representations of Biomolecular Structures. Bioinformatics. 2020 Jan 1; 36(1):131-135. (Epub 2019 June 20.) doi: 10.1093/bioinformatics/btz502. PubMed PMID: 31218344, Full Text at Oxford Academic

Wang J, Youkharibache P, Marchler-Bauer A, Lanczycki C, Zhang D, Lu S, Madej T, Marchler GH, Cheng T, Chong LC, Zhao S, Yang K, Lin J, Cheng Z, Dunn R, Malkaram SA, Tai C-H, Enoma D, Busby B, Johnson NL, Tabaro F, Song G, Ge Y. iCn3D: From Web-Based 3D Viewer to Structural Analysis Tool in Batch Mode. Front. Mol. Biosci. 2022 9:831740. (Epub 2022 Feb 17.) doi: 10.3389/fmolb.2022.831740. PubMed PMID: 35252351, Full Text at Frontiers