iCn3D

AI Tutor for iCn3D: shows step-by-step instructions about how to build a custom view

What is iCn3D Structure Viewer?

"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. Some features are listed below.
  1. View a 3D structure in iCn3D
    Open the link https://www.ncbi.nlm.nih.gov/Structure/icn3d, input a PDB ID, and click "Load". You can also click "File" menu to "Open File" to load PDB files or MD trajectories, or input other IDs.

    As mentioned in the menu "Help > Transformation Hints", you can use Left mouse button for rotation, Middle mouse wheel for zooming, and Right mouse button for translation.

    The most important point about using iCn3D is the current selection. Any operations on color, style, etc. are working on the current selection. By default, all atoms are selected. Once you select any subset, your operation will work ONLY on the subset. You can switch the selection using the toggle next to the Help menu.

  2. VR and AR views in iCn3D
    The Virtual Reality (VR) and Augmented Reality (AR) views are shown in this video.

    You can open a bowser in your Virtual Reality (VR) headset and view a 3D structure in iCn3D. Then click the button "ENTER VR" at the bottom center of your browser to enter the VR view. You can select residues with the trigger button, open the menu with the squeeze button and click menus with the trigger, navigate with the thumbstick pressed forward/backward and press the trigger. There are menus for Select, Style, Color, and Analysis. You need to make one selection before clicking the Interaction button and make two selections before clicking the Distance button.

    The Augmented Reality (AR) view is currently only available to iCn3D views in Chrome browser using Android phones. You can view a 3D structure in iCn3D and click the button "START AR" at the bottom center to see the 3D structure in your surroundings. You can tap twice quickly on the screen to locate a minimized 3D structure in your tapped location, and pinch to scale the 3D structure.

  3. Create custom 3D view
    You first open a structure in "File" menu, then select a subset in "Select" menu, view only the selected subset by clicking "View Only Selection" in View menu, finally change styles or colors in "Style" and "Color" menus.

    Each operation has a corresponding command as listed at https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d.html#commands. These commands will show up in the command/log window right beneath the 3D display. To view all previous commands, you can click "Share Link" in "File" menu. Both the original URL and the short URL can be used to display your custom view.

  4. Save your work
    You can save "iCn3D PNG Image" in the menu "File > Save File". Both the PNG file and an HTML file are saved. Click the HTML file to see the PNG image, which is linked to the custom display via a shorten URL. The downloaded "iCn3D PNG Image" itself can also be used as an input in the menu "File > Open File" to reproduce the custom display. You can combine these HTML files to generate your own galleries.

    The "iCn3D PNG Image" can also be stored in a web server (e.g., https://figshare.com, https://zenodo.org). The PNG image can then be loaded into iCn3D via the URL, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d/?type=icn3dpng&url=https://api.figshare.com/v2/file/download/39125801, or https://www.ncbi.nlm.nih.gov/Structure/icn3d/?type=icn3dpng&url=https://zenodo.org/api/files/1a3325c8-0c84-4f1e-be2c-c143b08c6563/3GVU-XCxR6fSTmXHxR3o1A.png, where the URL of the PNG image is retrieved from the JSON blob at https://zenodo.org/api/records/7599970.

    You can also save "Share Link" in "File" menu to share with your colleagues. These URLs are lifelong. You can click "Replay Each Step > On" in "File" menu to learn how a custom display was generated. (Note: Due to the retirement of Google Firebase Dynamic Link, any short URL containing "https://icn3d.page.link/" should be replaced with "https://www.ncbi.nlm.nih.gov/Structure/icn3d/share.html?". For example, "https://icn3d.page.link/2rZWsy1LZmtTS3kBA" should be replaced with "https://www.ncbi.nlm.nih.gov/Structure/icn3d/share.html?2rZWsy1LZmtTS3kBA".)

    All "Share Link" URLs can show the original view using the archived version of iCn3D by clicking "Open File > Share Link in Archived Ver." in "File" menu.

  5. Python scripts" to batch process structures: Python scripts can be used to process 3D structures (e.g., export secondary structures, PNG images, or analysis output) in batch mode. The example scripts are at icn3dpython.

  6. Node.js scripts using npm "icn3d" to batch process structures: You can download npm "icn3d" package to write Node.js scripts by calling iCn3D functions. These scripts can be used to process 3D structures (e.g., calculate interactions) in batch mode. The example scripts are at icn3dnode.

  7. Annotations for AlphaFold structures: For any custom structures such as AlphaFold structures, you can show conserved domain and 3D domain annotations. For AlphaFold structures, you can also show SNP and ClinVar annotations.

  8. Align AlphaFold structures: You can align AlphaFold structures or PDB structures with the menu "File > Align > Multiple Chains" or "File > Align > Protein Complexes > Two AlphaFold Structures". You can also load any structures as usual, then load your custom PDB file with the menu "File > Open File > PDB File (appendable)", then relaign these structures with the menu "File > Realign Selection > by Structure Alignment".

  9. Alternate SNPs in 3D
    You can alternate in 3D wild type and mutant of SNPs by clicking the menu "Analysis > Sequences & Annotations", the tab "Details", the checkbox "SNP", and mouseover on SNPs.

  10. DelPhi Electrostatic Potential
    You can view the DelPhi Electrostatic Potential in the menu "Analysis > DelPhi Potential".

  11. Isoforms and Exons
    You can view the Isoforms and Exons by clicking the button "Add Track" in the "Sequences & Annotations" window via the menu "Analysis > Sequences & Annotations".

  12. Multiple Sequence Alignment (MSA) Input
    You can input a MSA file (CLUSTALW or FASTA format) into iCn3D via the menu "File > Open File > Muleiple Seq. Alignment" in the "All Menus" mode. The view can be shared with others, e.g., GPCR MSA.

  13. Symmetry
    You can show precalculated symmetry, or calculate symmetry dynamically using SymD.

  14. Use iCn3D in Jupyter Notebook
    You can use iCn3D in Jupyter Notebook with the widget "icn3dpy". The instructions are at pypi.org/project/icn3dpy.

  15. 2D Diagram for RNAs and Ig Domains
    You can click the menu "Analysis > 2D Diagram" to show 2D Diagram for RNAs, and 2D Diagram for Ig Domains.
  16. 2D Cartoons in the chain, domain, and secondary structure levels
    You can click the menu "Analysis > 2D Cartoon" to show 2D Cartoons in the chain, domain, and secondary structure levels.

  17. Contact Map for any Selected Residues
    You can click the menu "Analysis > Contact Map" to show the interactive contact map for any selected residues. You can export the map in PNG or SVG.

  18. Show binding site
    You can click "Chem. Binding" in "View" menu to show all hydrogen bonds around chemicals. You can also Show interaction interface by clicking "H-Bonds & Interactions > 2D Interaction Graph, or Highlight Interactionsin Table" in "View" menu.

  19. Export models for 3D printing
    You can click "3D Printing" in "File" menu to export models for 3D printing. Both STL and VRML files are supported.

  20. Show transmembrane proteins
    If the protein is a transmembrane protein, you can click "File > Retrieve by ID > OPM PDB ID" to input a PDB ID to view the membranes.

  21. Show surface, EM map, or electron density map (MTZ, CCP4, or DSN6)
    You can click "Style > Surface Type", "Style > EM Density Map", or "Style > Electron Density". You can load electron density files at "File > Open File > Electron Density".

  22. View 1D sequences and 2D interactions
    In the page https://www.ncbi.nlm.nih.gov/Structure/icn3d/?mmdbid=1TUP, you can click in "Analysis" menu to "Seq. & Annotations", "2D Diagram", and see all "Defined Sets", which can be clicked to see any of your selections.

  23. Select on 3D, 1D and 2D
    To select on 3D structures: hold "Alt" and use mouse to pick, hold "Ctrl" to union selection, hold "Shift" to select a range, press the up/down arrow to switch among atom/residue/strand/chain/structure. Click "Save Selection" in "Select" menu to save the current selection.

    To select on 1D sequences: drag on the sequences or the blue track title to select.

    To select on 2D interaction diagram: click on the nodes or lines. The nodes are chains and can be united with the Ctrl key. The lines are interactions and can NOT be united. Each click on the lines selects half of the lines, i.e., select the interacting residues in one of the two chains.

  24. Align two structures, align multiple chains, or align a protein sequence to a structure
    You can click "File > Align" to see all three alignment options. You can also realign a subset of the structures.

  25. Add custom tracks
    You can add custom tracks in various formats (FASTA, bed file, etc.) in the annotation window by clicking the menu "Analysis > View Sequences & Annotations".

  26. Show force-directed graph for interactions
    You can show the interactions using 2D force-directed graph in the menu "View > H-Bonds & Interactions > 2D Graph (Force-Directed)".

  27. Calculate and show Solvent accessible surface area (SASA)
    You can color structures with SASA, or show the SASA for each residue.

  28. Make videos via the menu "File > Save File > Video".

AlphaFold-related gallery with live examples back to top


COVID-19-related gallery with live examples back to top


iCn3D gallery with live examples ("iCn3D PNG Images", all images below except the first five snapshots, can be loaded into iCn3D by clicking "Open File > iCn3D PNG Image" in iCn3D File menu) back to top


Videos & Tutorialsback to top

Frequently Asked Questionsback to top

URL parametersback to top

ParameterDescription
mmdbafidA list of PDB or AlphaFold UniProt IDs for realignment, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d/?mmdbafid=1HHO,4N7N,P69905,P01942. You could then input multiple PDB files with the menu "File > Open File > PDB Files (appendable)". Next you could click the menu "File > Realign Selection > by Structure Alignment" to realign all loaded structures.
mmdbidNCBI MMDB ID or PDB ID, e.g., ?mmdbid=1tup&showanno=1&show2d=1
mmtfidMMTF ID, e.g., ?mmtfid=1tup
pdbidPDB ID, e.g., ?pdbid=1tup
mmcifidmmCIF ID, e.g., ?mmcifid=1tup
giNCBI protein gi number, e.g., ?gi=827343227
cidPubChem Compound ID, e.g., ?cid=2244
blast_rep_idNCBI protein accession of a chain of a 3D structure. "blast_rep_id" combines with the parameter "query_id" of a protein sequence to show the sequence-structure alignment, e.g., from=icn3d&blast_rep_id=1TSR_A&query_id=NP_001108451.1
alignTwo PDB IDs or MMDB IDs for structure alignment, e.g., ?align=1hho,4n7n
chainalignTwo chains for structure alignment, e.g., ?chainalign=1HHO_A,4N7N_A
urlUse the url (encoded) to retrieve the 3D structure. The url requires another parameter "type", e.g., ?type=pdb&url=https%3A%2F%2Ffiles.rcsb.org%2Fview%2F1gpk.pdb
widthWidth of the structure image. It can be percentage such as '100%', or pixel values such as 400. The default is "100%".
heightHeight of the structure image. It can be percentage such as '100%', or pixel values such as 400. The default is "100%".
resizeSet "true" or "1" to resize the image when the container is resized. The default is "true".
rotateSet "right", "left", "up", or "down" to rotate the structure when it is displayed at the beginning. The default is "right".
showannoSet "true" or "1" to show annotations, such as SNPs, ClinVar, domains, binding sites. The default is "false".
showalignseqSet "true" or "1" to show the aligned sequence window. The default is "false".
showsetsSet "true" or "1" to show the defined sets. The default is "false".
show2dSet "true" or "1" to show the 2D interaction. The default is "false".
showlogoSet "false" or "0" to hide the NCBI logo at the top of the page. The default is "true".
showmenuSet "false" or "0" to hide the menus and buttons at the top of the structure canvas. The default is "true".
showtitleSet "false" or "0" to hide the title at the top of the structure canvas. The default is "true".
showcommandSet "false" or "0" to hide the command window. The default is "true".
mobilemenuSet "true" or "1" to show the mobile-style menu. Users can click to see all menus. The default is "false".
imageonlySet "true" or "1" to show an image instead of interactive 3D viewer. The default is "false".
closepopupSet "true" or "1" to close the dialogs of "Defined Sets", "Interactions", and "Sequences and Annotations". The default is "false".
commandBesides the "Script/Log" section at the bottom of the canvas, commands can also be attached to the url parameter "command". The easy way to generate the commands is to operate manually to get your custom display and then click "File > Share Link" to find the URL with full commands or just the short URL.
replaySet "true" or "1" to replay each step of a custom display.
usepdbnumSet "true" or "1" to use PDB residue numbers instead of NCBI residue numbers when the input is MMDB ID and the residue numbers are different. The default is "true".
hidelicenseSet "true" or "1" to hide the features requiring licenses, such as "Analysis > DelPhi Potential". The default is "false".
shownoteSet "true" or "1" to show the content in "Analysis > Window Title" as the window title. The default is "false".
menuiconSet "true" or "1" to show icons for those menus requiring internet or license. The default is "false".

iCn3D Selection Definition back to top

In the dialog Select > Advanced, users can use simple specification to select atoms:

Specification: In the selection "$1HHO,4N7N.A,B,C:5-10,LV,3LeuVal,chemicals@CA,C,C*": Set Operation: Full commands in url or command window:

iCn3D Menus and Commands used to Construct Sharable URLs back to top

There are two methods to generate a custom view in iCn3D.

The first method is to use the iCn3D web interface (https://www.ncbi.nlm.nih.gov/Structure/icn3d/) interactively to select a set with the menu "Analysis > Defined Sets", or the menu "Select > Advanced" using specifications described in the "iCn3D Selection Definition" section above, and apply some features on the set. Then you can click the menu "File > Share Link" to see the commands in the section "Original URL with commands".

The second method is to generate an iCn3D URL with a series of commands corresponding to the interactive steps, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d/?mmdbafid=[PDB or AlphaFold ID]&command=[a list of commands], where the URL parameter "mmdbafid" has to be specified with a PDB or AlphaFold ID to load a structure, and "command" can have a list of commands separated by ";+", not "+|+". Each command corresponds to a menu item in the iCn3D web interface. The commands are listed in the table below.

(A third way to analyze a structure is to use iCn3D Node.js scripts with functions. Most functions corresponding to commands are in the file "src/icn3d/selection/applyCommand.js". Other functions related to asynchronized retrieval are in the file "src/icn3d/selection/loadScript.js".)

Menu Command Description
File > Search Structure > PDB Structures N/A Search PDB structures at NCBI Structure page
File > Search Structure > AlphaFold Structures N/A Search AlphaFold structures with AlphaFold ID, protein names, or gene names
File > Search Structure > AlphaFold UniProt Database URL: https://alphafold.ebi.ac.uk/ Search AlphaFold structures at AlphaFold UniProt Database
File > Search Similar > NCBI VAST+ (PDB Complex) URL: https://www.ncbi.nlm.nih.gov/Structure/vastplus/vastplus.cgi?uid=6VXX Search similar PDB complexes with the tool VAST+
File > Search Similar > NCBI VAST (PDB Chain) URL: https://www.ncbi.nlm.nih.gov/Structure/vast/vastsrv.cgi?pdbid=4N7N&chain=A Search similar PDB chains with the tool VAST
File > Search Similar > Foldseek (PDB & AlphaFold) https://search.foldseek.com/ Search similar PDB and AlphaFold structures with the tool Foldseek
File > Retrieve by ID > PDB/MMDB/AlphaFold IDs load mmdbaf0 1GPK,P69905
or URL parameter:
&mmdbafid=1GPK,P69905
Load a list of comma-separated PDB IDs, MMDB IDs, or AlphaFold IDs
File > Retrieve by ID > AlphaFold Structures > NCBI Protein Accession load refseq NP_001743.1
or URL parameter:
&refseqid=NP_001743.1
Load an AlphaFold structure with an NCBI protein accession
File > Retrieve by ID > RCSB mmCIF ID load mmcif pdb_00001tup
or URL parameter:
&mmcifid=pdb_00001tup
Load a structure with an RCSB mmCIF ID
File > Retrieve by ID > PubChem CID/Name/InChI load cid 2244
or URL parameter:
&cid=2244
Load a compound with PubChem CID, name, or InChI
File > Retrieve by ID > Chemical SMILES load smiles CC(=O)OC1=CC=CC=C1C(=O)O
or URL parameter:
&smiles=CC(%3DO)OC1%3DCC%3DCC%3DC1C(%3DO)O
Load a compound with SMILES
File > Open File > PDB Files (appendable) N/A Open one or more PDB files
File > Open File > mmCIF Files (appendable) N/A Open one or more mmCIF files
File > Open File > SDF File N/A Open one chemical SDF file
File > Open File > MD Trajectory File N/A Open one MD trajectory file (DCD or XTC)
File > Open File > Multiple Seq. Alignment > CLUSTALW Format N/A Open one multiple sequence alignment file in CLUSTALW format to show the MSA and the structural alignment
File > Open File > Multiple Seq. Alignment > FASTA Format N/A Open one multiple sequence alignment file in FASTA format to show the MSA and the structural alignment
File > Open File > AlphaFold PAE File N/A Open one AlphaFold PAE (Predicted Aligned Error) file to show the PAE heatmap
File > Open File > iCn3D PNG (appendable) N/A Open one or more iCn3D PNG files
File > Open File > Selection File N/A Open one iCn3D selection file with defined sets such as "1TUP_A select .A:94-289"
File > Open File > Collection File N/A Open one iCn3D collection file with a list of IDs. The examples are at https://github.com/ncbi/icn3d/tree/master/example/collection.
File > Open File > Electron Density > Local File N/A Open one local electron density map file in CCP4 or MTZ format
File > Open File > Predict by Seq. > ESMFold N/A Predict a structure from a protein sequence with the tool ESMFold
File > Align > Multiple Chains > by Structure Alignment URL: https://www.ncbi.nlm.nih.gov/Structure/icn3d/?chainalign=P69905_A,P01942_A,1HHO_A&aligntool=tmalign Align a list of comma-separated PDB chains (e.g., 1HHO_A) or AlphaFold IDs (e.g., P69905) with the tool TM-align or VAST align. This is different from aligning two structures.
File > Align > Multiple Chains > by Sequence Alignment URL: https://www.ncbi.nlm.nih.gov/Structure/icn3d/?chainalign=P69905_A,P01942_A,1HHO_A&resnum=1-10,20-50&showalignseq=1 Align a list of comma-separated PDB chains (e.g., 1HHO_A) or AlphaFold IDs (e.g., P69905) based on a list of residue numbers (e.g., 1-10,20-50) in the first chain
File > Align > Multiple Chains > Residue by Residue URL: https://www.ncbi.nlm.nih.gov/Structure/icn3d/?chainalign=P69905_A,P01942_A,1HHO_A&resdef=1,5,10-50 | 1,5,10-50:+2,6,11-51 | 1,5,10-50&showalignseq=1 Align a list of comma-separated PDB chains (e.g., 1HHO_A) or AlphaFold IDs (e.g., P69905) based on a list of ":+"-separated residue mapping (e.g., 1,5,10-50 | 1,5,10-50, where " | " is used to separate the residues in the first chain and in the current chain) for each pair of chains
File > Align > Protein Complexes > Two PDB Structures URL: https://www.ncbi.nlm.nih.gov/Structure/icn3d/?align=2DN3,4N7N Align two PDB structures with the tool VAST+. This is different from aligning two chains.
File > Align > Sequence to Structure URL: https://www.ncbi.nlm.nih.gov/Structure/icn3d/?from=icn3d&alg=blast&blast_rep_id=1TSR_A&query_id=NP_001108451.1 Show the sequence alignment of a protein sequence with a PDB chain using BLAST in the context of 3D structure
File > Realign Selection > Multiple Chains > by Structure Alignment realign on tmalign | 1HHO_A,P01942_A,P69905_A Realign the selected list of comma-separated PDB chains (e.g., 1HHO_A) or AlphaFold IDs (e.g., P69905) with the tool TM-align or VAST align
File > Realign Selection > Multiple Chains > by Sequence Alignment realign on seq align | 1HHO_A,P01942_A,P69905_A Realign the selected list of comma-separated PDB chains (e.g., 1HHO_A) or AlphaFold IDs (e.g., P69905) based on the sequence alignment with the tool BLAST
File > Realign Selection > Multiple Chains > Residue by Residue realign predefined P69905_A,P01942_A,1HHO_A 1,5,10-50 | 1,5,10-50:+2,6,11-51 | 1,5,10-50 Realign the selected list of comma-separated PDB chains (e.g., 1HHO_A) or AlphaFold IDs (e.g., P69905) based on a list of ":+"-separated residue mapping (e.g., 1,5,10-50 | 1,5,10-50, where " | " is used to separate the residues in the first chain and in the current chain) for each pair of chains
File > Realign Selection > Protein Complexes realign on vastplus | 1HHO,P01942 Realign the selected list of structures with the tool VAST+
File > 3D Printing > WRL/VRML (Color, W/ Stabilizers) export vrml stabilizer file Export the current 3D structure in WRL/VRML file format with original color for 3D printing
File > 3D Printing > STL (W/ Stabilizers) export stl stabilizer file Export the current 3D structure in STL file format with black/white color for 3D printing
File > Save File > iCn3D PNG Image > Original Size export canvas Export the canvas as an iCn3D PNG image with all involved commands appended at the end of the PNG file
File > Save File > iCn3D PNG Image > 4X Large export canvas 4 Export the canvas as an 4 times large iCn3D PNG image with all involved commands appended at the end of the PNG file
File > Save File > Video N/A Export the canvas as a MP4 video as the structure changes its orientation by the user or automatically
File > Save File > Selection File N/A Export the current defined sets in a selection file. Each set contains the name and the selection command, e.g., "1TUP_A select .A:94-289".
File > Save File > PDB export pdb Export the current 3D coordinates in a PDB file
File > Save File > Secondary Structure export secondary structure Export the secondary structure and residue number information in a JSON file
File > Share Link N/A Generate a URL with all commands, a shortened URL, and commands used in Jupyter Notebook.
Select > Defined Sets defined sets Show all defined sets to make a selection
Select > All select all Select all atoms of the structures
Select > Displayed Set select displayed set Select all atoms currently displayed
Select > by Distance select zone cutoff [cutoff value in angstrom] Select all residues within a certain distance from the current selection
Select > by Property > Positive select prop positive Select all positively charged residues (Arg, Lys, and His) for the current selection
Select > by Property > Negative select prop negative Select all negatively charged residues (Asp and Glu) for the current selection
Select > by Property > Hydrophobic select prop hydrophobic Select all hydrophobic residues (Val, Leu, Ile, Met, Phe, Tyr, Trp, and Cys) for the current selection
Select > by Property > Polar select prop polar Select all polar residues (Ser, Thr, Asn, Gln, Pro, Ala, and Gly) for the current selection
Select > by Property > B-factor/pLDDT select prop b factor | 90_100 Select all residues with B-factor or pLDDT value in a certain range (e.g., 90_100) for the current selection
Select > by Property > Solvent Accessibility select prop percent out | 0_50 Select all residues with solvent accessibility in a certain range (e.g., 0_50) for the current selection
Select > Inverse select complement Select all atoms not in the current selection
Select > Main Chains select main chains Select the main chain atoms (C-alpha, C, N, and O) for the current selection
Select > Side Chains select side chains Select the side chain atoms (i.e., all atoms except main chain atoms) for the current selection
Select > Advanced select [specification] | name [name of the set] Use a simple specification (e.g., $1HHO.A:5-10@CA) specified at https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d.html#selectb to select a set of atoms and name the set
Select > Select on 3D > Chain set pk chain Press the Alt key and click on 3D structure to select a chain
Select > Select on 3D > Strand/Helix set pk strand Press the Alt key and click on 3D structure to select a secondary structure (strand or helix)
Select > Select on 3D > Residue set pk residue Press the Alt key and click on 3D structure to select a residue
Select > Select on 3D > Atom set pk atom Press the Alt key and click on 3D structure to select an atom
Select > Save Selection select [specification] | name [name of the set] Save the current selection with a name in the Defined Sets menu
Select > Clear Selection clear all Reset the selection to all atoms
Select > Highlight Style > Outline set highlight style outline Set the highlight style as outline
Select > Highlight Style > 3D Objects set highlight style 3d Set the highlight style as 3D objects (e.g., cubes)
Select > Toggle Highlight toggle highlight Toggle between the current selection and all atoms
View > View Selection show selection View only the current selection
View > Hide Selection hide selection Hide the current selection
View > Zoom in Selection zoom selection Zoom into the current selection
View > Center Selection center selection Set the current selection to the center
View > Alternate(Key "a") N/A Alternate the structures one by one
View > Stereo View > On stereo on Turn on stereo view
View > Stereo View > Off stereo off Turn off stereo view
View > Side by Side URL: https://www.ncbi.nlm.nih.gov/Structure/icn3d/full2.html?... Show the first structure in the first window and the second (if available, otherwise the same structure) in the second window to compare side by side. THis is achieved by replace "icn3d/?" or "icn3d/full.html?" with "icn3d/full2.html?".
View > Rotate > Auto Rotation > Rotate Left rotate left Rotate the structure continuously to the left until a mouse click is made
View > Rotate > Auto Rotation > Rotate Right rotate right Rotate the structure continuously to the right until a mouse click is made
View > Rotate > Auto Rotation > Rotate Up rotate up Rotate the structure continuously upward until a mouse click is made
View > Rotate > Auto Rotation > Rotate Down rotate down Rotate the structure continuously downward until a mouse click is made
View > Fog for Selection > On set fog on Set fog on for the current selection to hide objects in the back
View > Fog for Selection > Off set fog off Set fog off for the current selection to show objects in the back
View > Slab for Selection > On set slab on Set slab on for the current selection to hide objects in the front
View > Slab for Selection > Off set slab off Set slab off for the current selection to show objects in the front
View > XYZ-axes > Original set axis on Show the original XYZ axes
View > XYZ-axes > Prin. Axes on Sel. set pc1 axis Show the principal axes for the current selection
View > XYZ-axes > Hide set axis off Remove the axes
View > Reset > All reset Reset everything to the default
View > Reset > Orientation reset orientation Reset just the orientation of the structures
View > Full Screen N/A Show the canvas in full screen mode
Style > Protein > Ribbon style proteins ribbon Show the secondary structures of proteins as ribbon and coils as thin tubes
Style > Protein > Strand style proteins strand Show the secondary structures of proteins as six curves and coils as thin tubes
Style > Protein > Cylinder and Plate style proteins cylinder and plate Show the helices as cylinders, the strands as ribbons, and coils as thin tubes
Style > Protein > Schematic style proteins schematic Show each residue in proteins as a single-letter label, and connect the residues with sticks
Style > Protein > C Alpha Trace style proteins c alpha trace Connect all residues in proteins with sticks through C-alpha atoms
Style > Protein > Backbone style proteins backbone Show the backbone atoms (C-alpha, C, N, and O) of the proteins as sticks
Style > Protein > B-factor Tube style proteins b factor tube Connect all residues in proteins with a tube, where the thickness of the tube is proportional to the B-factor or pLDDT value of each residue
Style > Protein > Lines style proteins lines Show all bonds in proteins as lines
Style > Protein > Stick style proteins stick Show all bonds in proteins as sticks
Style > Protein > Ball and Stick style proteins ball and stick Show all atoms in proteins as spheres and all bonds as sticks
Style > Protein > Sphere style proteins sphere Show all atoms in proteins as spheres
Style > Protein > Hide style proteins nothing Hide the proteins
Style > Side Chains > Lines style sidec lines Show all bonds in side chains as lines
Style > Side Chains > Stick style sidec stick Show all bonds in side chains as sticks
Style > Side Chains > Ball and Stick style sidec ball and stick Show all atoms as spheres and all bonds as sticks for the side chains
Style > Side Chains > Sphere style sidec sphere Show all atoms in side chains as spheres
Style > Side Chains > Hide style sidec nothing Hide the protein side chains
Style > Nucleotides > Nucleotide Cartoon style nucleotides nucleotide cartoon Show nucleotides as nucleotide cartoon
Style > Nucleotides > O3' Trace style nucleotides o3 trace Connect all residues in nucleotides with sticks through O3 atoms
Style > Nucleotides > Backbone style nucleotides o3 trace Show the backbone atoms of the nucleotides as sticks and hide the nucleotide bases
Style > Nucleotides > Schematic style nucleotides schematic Show each residue in nucleotides as a single-letter label, and connect the residues with sticks
Style > Nucleotides > Lines style nucleotides lines Show all bonds in nucleotides as lines
Style > Nucleotides > Stick style nucleotides stick Show all bonds in nucleotides as sticks
Style > Nucleotides > Ball and Stick style nucleotides ball and stick Show all atoms in nucleotides as spheres and all bonds as sticks
Style > Nucleotides > Sphere style nucleotides sphere Show all atoms in nucleotides as spheres
Style > Nucleotides > Hide style nucleotides nothing Hide the nucleotides
Style > Nucl. Bases > Lines style ntbase lines2 Show all bonds in the bases of nucleotides as lines
Style > Nucl. Bases > Stick style ntbase stick2 Show all bonds in the bases of nucleotides as sticks
Style > Nucl. Bases > Ball and Stick style ntbase ball and stick2 Show all atoms as spheres and all bonds as sticks for the bases of nucleotides
Style > Nucl. Bases > Sphere style ntbase sphere2 Show all atoms in the bases of nucleotides as spheres
Style > Nucl. Bases > Hide style ntbase nothing Hide the bases of the nucleotides
Style > Chemicals > Lines style chemicals lines Show all bonds in Chemicals as lines
Style > Chemicals > Stick style chemicals stick Show all bonds in Chemicals as sticks
Style > Chemicals > Ball and Stick style chemicals ball and stick Show all atoms in Chemicals as spheres and all bonds as sticks
Style > Chemicals > Schematic style chemicals schematic Show each non-carbon and non-hydrogen atom in chemicals as a single-letter label
Style > Chemicals > Sphere style chemicals sphere Show all atoms in Chemicals as spheres
Style > Chemicals > Hide style chemicals nothing Hide the chemicals
Style > Glycans > Show Cartoon glycans cartoon yes Show glycans as transparent 3D objects (e.g., cubes, spheres)
Style > Glycans > Hide Cartoon glycans cartoon no Show glycans as chemicals
Style > Ions > Sphere style ions sphere Show all ions as spheres
Style > Ions > Dot style ions dot Show all ions as small spheres
Style > Ions > Hide style ions nothing Hide the ions
Style > Water > Sphere style water sphere Show all water as spheres
Style > Water > Dot style water dot Show all water as small spheres
Style > Water > Hide style water nothing Hide the water
Style > Save Style save style Save the current style to be used later
Style > Apply Saved Style apply saved style Apply the previously saved style to the current selection
Style > Surface Type > Van der Waals set surface Van der Waals surface Show the Van der Waals surface for the current selection
Style > Surface Type > Molecular Surface set surface molecular surface Show the molecular surface for the current selection
Style > Surface Type > Solvent Accessible set surface solvent accessible surface Show the solvent accessible surface for the current selection
Style > Remove Surface set surface nothing Remove all surfaces
Style > Surface Opacity > Fast Transparency set surface opacity [opacity value] Set the opacity of the surface for the current selection. The opacity value can be between 0 (fully transparent) and 1 (fully opaque).
Style > Surface Wireframe > Yes set surface wireframe on Use wireframe to show the surface for the current selection
Style > Surface Wireframe > No set surface wireframe off Show the regular surface for the current selection
Style > Line btw. Two Sets add line | x1 4.4 y1 2.8 z1 7.3 | x2 7.9 y2 3.4 z2 7.3 | color #ffff00 | dashed false | type cylinder | radius 0.4 | opacity 0.3 Add a line between two sets specified by the coordinates of the center of masses of the two sets. Additional parameters include color (hex color code), dashed (true/false), radius (for cylinder), and opacity (0 to 1)
Style > Plane among 3 Sets add plane | x1 4.4 y1 2.8 z1 7.3 | x2 7.9 y2 3.4 z2 7.3 | x3 97.9 y3 23.4 z3 07.3 | color #ffff00 | thickness 2 | opacity 0.3 Add a plane among three sets specified by the coordinates of the center of masses of the three sets. Additional parameters include color (hex color code), thickness, and opacity (0 to 1)
Style > Electron Density > 2Fo-Fc Map set map 2fofc sigma 1.5 Show the 2Fo-Fc electron density map at a certain sigma level (e.g., 1.5) for crystal structures
Style > Electron Density > Fo-Fc Map set map fofc sigma 3 Show the Fo-Fc electron density map at a certain sigma level (e.g., 3) for crystal structures
Style > Electron Density > Remove Map setoption map nothing Remove all electron density maps
Style > Map Wireframe > Yes set map wireframe on Show the electron density map in wireframe style
Style > Map Wireframe > No set map wireframe off Show the electron density map as surface
Style > EM Density Map set emmap percentage 30 Show the EM density map at a certain percentage (e.g., 30) of maximum EM values for Cryo-EM structures
Style > Remove EM Map setoption emmap nothing Remove all EM density maps
Style > EM Map Wireframe > Yes set emmap wireframe on Show the EM density map in wireframe style
Style > EM Map Wireframe > No set emmap wireframe off Show the EM density map as surface
Style > Background > Transparent set background transparent Set the backgrouond of the canvas to transparent
Style > Background > Black set background black Set the backgrouond of the canvas to black
Style > Background > Grey set background grey Set the backgrouond of the canvas to grey
Style > Background > White set background white Set the backgrouond of the canvas to white
Color > Unicolor color [color name or hex color code] Color the current selection with a single color specified by the color name (e.g., red, green, blue) or hex color code (e.g., FF0000 for red)
Color > Color Picker color [hex color code] Color the current selection with a picked color specified by the hex color code (e.g., FF0000 for red)
Color > Rainbow (R-V) > for Selection color rainbow Color the current selection with a rainbow color scheme from red to violet
Color > Rainbow (R-V) > for Chains color rainbow for chains Color each chain in the current selection with a rainbow color scheme from red to violet
Color > Spectrum (V-R) > for Selection color spectrum Color the current selection with a spectrum color scheme from violet to red
Color > Spectrum (V-R) > for Chains color spectrum for chains Color each chain in the current selection with a spectrum color scheme from violet to red
Color > Secondary > Sheet in Green color secondary structure Color the secondary structure of the current selection with a color scheme (helix in red, strand in green, coil in light blue)
Color > Secondary > Sheet in Yellow color secondary structure yellow Color the secondary structure of the current selection with a default color scheme (helix in red, strand in yellow, coil in light blue)
Color > Charge color charge Color the current selection based on the charge of the residues (positive in blue, negative in red, neutral in gray)
Color > Hydrophobicity > Normalized color normalized hydrophobic Color the current selection based on the normalized Wimley-White hydrophobicity (https://en.wikipedia.org/wiki/Hydrophobicity_scales) of the residues (hydrophobic in green, hydrophilic in gray)
Color > B-factor > Original color b factor Color the current selection based on the original B-factor values of the residues (low in blue, high in red)
Color > B-factor > Percentile color b factor percentile Color the current selection based on the percentile of the B-factor values of the residues (low in blue, high in red)
Color > Solvent Accessibility color area | 35 Color each residue based on the percentage of solvent accessilbe surface area. The color ranges from blue, to white, to red for a percentage of 0, 35(variable), and 100, respectively.
Color > Structure color structure Color each structure in the current selection with a different color
Color > Chain color chain Color each chain in the current selection with a different color
Color > 3D Domain color 3ddomain Color each 3D domain in the current selection with a different color based on the 3D domain definition in iCn3D
Color > Residue > Default color residue Color each residue in the current selection with a different default color
Color > Atom color atom Color each atom in the current selection with a different default color based on the atom type
Color > Identity color identity For aligned structures, color aligned residues in red if the residues are identical, in blue if the residues are different
Color > Conservation color conservation For aligned structures, assign the conservation color based on the BLOSUM62 matrix
Color > pLDDT color confidence Color the current selection based on the pLDDT confidence score of the atoms. Atoms with very high pLDDT (> 90) are colored in blue, high (90 > pLDDT > 70) in light blue, low (70 > pLDDT > 50) in yellow, and very low (pLDDT < 50) in orange.
Color > Ig Strand color ig strand When Ig domains are identified for the structures, assign the Ig strands (strands A, B, C, C', D, E, F, G) with predefined color.
Color > Save Color save color Save the current color scheme to be used later
Color > Apply Saved Color apply saved color Apply the previously saved color scheme to the current selection
Analysis > Seq. & Annotations view annotations View the sequences and annotations of the current selection in the 1D sequence viewer
Analysis > Aligned Seq. window aligned sequence View the aligned sequences of the current selection in a separate window
Analysis > 2D Diagram > for RNAs > R2DT Diagram diagram 2d nucleotide | 8SH5_R View the R2DT diagram, generated by RNACentral, of the chain 8SH5_R in a separate window.
Analysis > 2D Diagram > for RNAs > 2D Diagram with RNAcanvas diagram 2d fr3d | 8SH5_R View the 2D diagram, generated by RNAcanvas, of the chain 8SH5_R in a separate window.
Analysis > 2D Diagram > for Ig Domains diagram 2d ig | 1CD8_A View the 2D diagram of the Ig domain in the chain 1CD8_A in a separate window.
Analysis > 2D Diagram > for Chains view 2d diagram View the 2D diagram of the current selection in a separate window. This command is not required to show the interactions, which can be done via the menu "Analysis > Interactions".
Analysis > 2D Cartoon > Chain Level cartoon 2d chain Show each chain as an oval with a gradient color for the current selection in a separate window
Analysis > 2D Cartoon > Domain Level cartoon 2d domain Show each domain as an oval with a gradient color for the current selection in a separate window
Analysis > 2D Cartoon > Helix/Sheet Level cartoon 2d secondary Show each helix as a filled cylinder and sheet as an empty rectangle for the current selection in a separate window
Analysis > Defined Sets defined sets View all defined sets to make a selection in a separate window
Analysis > Interactions line graph interaction pairs | [1st set] [2nd set]
or
line graph interaction pairs | [1st set] [2nd set] | hbonds,salt bridge,interactions,halogen,pi-cation,pi-stacking | false | threshold 3.8 6 4 3.8 6 5.5
Show the interactions between two sets in a separate window based on the specified interaction types and thresholds. By default, 2D Interaction Network is used with the prefix "line graph interaction pairs", not "view interaction pairs".
Analysis > Contact Map contact map | dist 8 | type cbeta Show the contact map for the current selection in a separate window based on the specified distance cutoff (e.g., 8 Angstrom) and atom type (e.g., c-alpha, c-beta, and heavy atoms)
Analysis > Mutation scap interaction [mutation, e.g., 6M0J_E_501_Y] Please specify the mutations with a comma separated mutation list. Each mutation can be specified as "[uppercase PDB ID or AlphaFold UniProt ID]_[Chain Name]_[Residue Number]_[One Letter Mutant Residue]". E.g., the mutation of N501Y in the E chain of PDB 6M0J can be specified as "6M0J_E_501_Y". For AlphaFold structures, the "Chain ID" is "A".
Analysis > DelPhi Potential > DelPhi Potential set delphi surface
or
set delphi surface | contour 2 | gsize 65 | salt 0.15 | surface 22 | opacity 1.0 | wireframe no
Show the DelPhi/electrostatic potential surface for the current selection with the specified contour level (e.g., max potential 2 kT/e), grid size, salt concentration, surface type, opacity, and wireframe option
Analysis > Distance > between Two Atoms add line | x1 44.74 y1 -2.248 z1 95.95 | x2 50.62 y2 -4.272 z2 99.41 | color #ffff00 | dashed true | type distance; add label [label text] | x [x] y [y] z [z] | size [label size] | color [FF0000] | background [FFFFFF] Show the distance between two atoms with a dashed line between the atoms and a label with the specified position, text, size, color, and background color
Analysis > Distance > between Two Sets dist | 6ENY_B 6ENY_C Show the distance between two sets with a dashed line between the center of masses and a label with the distance
Analysis > Distance > among Many Sets disttable | [1st comma-separated sets] [2nd comma-separated sets] Show the distances among many set in a table
Analysis > Distance > Hide set lines off Hide all distance lines and labels
Analysis > Surface Area area Calculate the solvent accessible surface area (SASA) for each residue in the current selection and show the result in a popup window
Analysis > Label > by Picking Atoms N/A Add a label to the center of two picked atoms in the 3D viewer
Analysis > Label > per Selection select sets 6ENY_B; add label [my text] | x 125.6 y 98.76 z 87.23 | size 18 | color #ffff00 | background undefined | type custom Add a custom label to the center of the current selection with the specified text, size, color, and background color
Analysis > Label > per Atom add atom labels Add labels of atom name for each atom in the current selection
Analysis > Label > per Atom Element add element labels Add labels of atom elements for each atom in the current selection
Analysis > Label > per Residue add residue labels Show one-letter residue labels for the current selection
Analysis > Label > per Residue & Number add residue number labels Show labels for residues in the current selection with the one-letter residue name followed by the residue number, e.g., R273
Analysis > Label > N- & C- Termini add terminal labels Show labels for the N- and C- termini of each chain in the current selection
Analysis > Label > Change Label Color set label color ffff00 Change the color of all labels to the specified color (e.g., yellow with hex color code ffff00)
Analysis > Label > Remove set labels off Remove all labels
Analysis > Label Scale set label scale [scale value] Set the scale of all labels to the specified scale value (e.g., 2.0)
Analysis > Chem. Binding > Show set chemicalbinding show Show the chemical binding interactions in 3D
Analysis > Chem. Binding > Hide set chemicalbinding hide Remove the chemical binding interactions from 3D
Analysis > Assembly > Biological Assembly set assembly on Show the biological assembly for the current structure based on the assembly information provided in the PDB or mmCIF file
Analysis > Assembly > Asymmetric Unit set assembly off Show the asymmetric unit for the current structure based on the assembly information provided in the PDB or mmCIF file
Analysis > Symmetry > from PDB(precalculated) symmetry C3 (global) Show the symmetry (a prism and its central axis) for the current structure based on the symmetry information provided in the PDB or mmCIF file. The point group (e.g., C3) and scope (global or local) need to be specified.
Analysis > Symmetry > from SymD(Dynamic) symd symmetry Show the symmetry (a prism and its central axis) for the current structure based on the symmetry information calculated by SymD (http://symd.nci.nih.gov/). The alignment used in SymD is also shown.
Analysis > Symmetry > Show Axes Only show axis Show only the symmetry axes without the prisms
Analysis > Ref. Number > Show Ig for Selection ig refnum on Identify Ig domains and show the reference numbering for the identified Ig domains in the current selection based on the IgStrand numbering scheme for Ig domains (https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1012813)
Analysis > Window Title your note | 2POR(MMDB) in iCn3D Set the title of the iCn3D window to a custom text (e.g., "2POR(MMDB) in iCn3D")

Citing iCn3D:back to top

  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] Click here to read  
  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]  

iCn3D source code:back to top


Develop

How to get started as a contributor:back to top

  1. Create a GitHub Account
    If you don’t already have one, sign up at github.com.

  2. Learn Git and GitHub Basics
    Understand the fundamentals:
    • Git: Version control system (learn commands like git clone, git commit, git push, etc.)
    • GitHub: Platform to host and collaborate on Git repositories

    Resources:

  3. Understand the Project


  4. Set Up Your Development Environment
    • Fork the repository by clicking the "Fork" button in the iCn3D GitHub page.
    • Clone your fork locally by clicking the "Code" button in your forked page. Then clone it with the command: "git clone https://github.com/your-username/icn3d.git".
    • Install dependencies as described in the "Building" section of the README.md page.


  5. Pick an Issue and Start Working
    • Choose a small issue (e.g., fix a typo, update documentation, small bug).
    • Comment on the issue to let maintainers know you’re working on it.
    • Create a new branch for your fix with the command: "git checkout -b fix-issue-name".


  6. Make Your Changes and Commit
    • If you are adding a new feature, you can add a new class as described here.
    • Test your code.
    • Commit your changes with a clear message: git commit -am "Fix: corrected typo in README"


  7. Push and Create a Pull Request (PR)
    • Push your changes: "git push origin fix-issue-name".
    • Go to your fork on GitHub and click “Compare & Pull Request”.
    • Write a helpful PR description.
    • Submit the PR.


  8. Respond to Feedback
    • Be open to feedback from project maintainers
    • Make requested changes and push again — GitHub will update the PR automatically


  9. Stay Involved
    • Watch the repository by clicking the "Watch" button to stay updated.

How to embed iCn3D Structure Viewer in your html page:back to top

Data Structureback to top

Class Structureback to top

iCn3D uses JavaScript classes starting from version 3.0.0. In both the browser version (GitHub) and the Node.js version (npm), a global variable "icn3d" is used to access all classes in iCn3D. As shown in the table below, the variable "icn3d" can access the class "iCn3DUI" (with the instance "icn3dui"). The instance "icn3dui" can access all util classes (e.g., "icn3d.icn3dui.utilsCls") and two major classes "iCn3D" (with the instance "icn3d", which is different from the global variable "icn3d") and "Html" (with the instance "htmlCls"), which can access all the rest classes. For example, the class "AlignSeq" (with the instance "alignSeqCls") can be called using "icn3d.icn3dui.htmlCls.alignSeqCls". All class names except "icn3dui" and "icn3d" start with an upper-case letter.

Since static functions are not supported in Safari, all classes (e.g., "AlignSeq") don't have static functions. The instance names of the classes convert the first letter to lower-case and add the postfix "Cls" (e.g., "alignSeqCls"). Each class has its own file with the file name the same as the class name with the first letter lower-case (e.g., "alignSeq.js").

Each function in classes in the directory "icn3d" has a variable "ic" to represent the instance "icn3d". "ic.icn3dui" can be used to represent the instance "icn3dui".

Each function in classes in the directory "html" has a variable "me" to represent the instance "icn3dui". "me.icn3d" can be used to represent the instance "icn3d".

GlobalClass (directory)Class (directory)Class (directory)Functions
icn3dicn3dui (src)utilsCls (utils)setIcn3d, setDialogAjax
icn3dicn3duiutilsCls (utils)isIE, isMobile, isMac, isSessionStorageSupported, hexToRgb, isCalphaPhosOnly, hasCovalentBond, residueName2Abbr, residueAbbr2Name, getJSONFromArray, checkFileAPI, getIdArray, compResid, toggle, setViewerWidthHeight
icn3dicn3duihashUtilsCls (utils)cloneHash, intHash, exclHash, unionHash, unionHashInPlace, unionHashNotInPlace, intHash2Atoms, exclHash2Atoms, unionHash2Atoms, hash2Atoms, hashvalue2array
icn3dicn3duiparasCls (utils)Parameters: glycanHash, nucleotidesArray, ionsArray, cationsTrimArray, anionsTrimArray, ionCharges, vdwRadii, covalentRadii, surfaces, atomColors, defaultAtomColor, stdChainColors, backgroundColors, residueColors, residueArea, defaultResidueColor, chargeColors, hydrophobicColors, ssColors, ssColors2, b62ResArray, b62Matrix
Functions: thr
icn3dicn3duimyEventCls (utils)onId, onIds
icn3dicn3duisubdivideCls (utils)subdivide, getKnot, getValueFromKnot
icn3dicn3duirmsdSuprCls (utils)getRmsdSuprCls, eigen_values, null_basis, getEigenForSelection, getEigenVectors
icn3dicn3duiconvertTypeCls (utils)passFloat32, passInt8, passInt16, passInt32, getUint8View, getDataView, getView, getBlobFromBufferAndText
icn3dicn3dui (src)htmlCls (html)N/A
icn3dicn3duihtmlClsalignSeqCls (html)getAlignSequencesAnnotations
icn3dicn3duihtmlClsclickMenuCls (html)clickMenu1, clickMenu2, clickMenu3, clickMenu4, clickMenu5, clickMenu6, setLogCmd
icn3dicn3duihtmlClsdialogCls (html)openDlg, addSaveButton, addHideButton, getDialogStatus, openDlgHalfWindow, openDlg2Ddgm, openDlgRegular, openDlgNotebook
icn3dicn3duihtmlClseventsCls (html)fullScreenChange, allEventFunctions
icn3dicn3duihtmlClssetDialogCls (html)setCustomDialogs, setDialogs
icn3dicn3duihtmlClssetHtmlCls (html)getLink, getLinkWrapper, getRadio, getRadioColor, setAdvanced, getOptionHtml, setColorHints, setThicknessHtml, setSequenceGuide, setAlignSequenceGuide, getSelectionHints, addGsizeSalt, getFootHtml, getPotentialHtml, exportPqr, clickReload_pngimage, setLineThickness, updateSurfPara, exportPdb
icn3dicn3duihtmlClssetMenuCls (html)setTopMenusHtml, setTopMenusHtmlMobile, setReplayHtml, setTools, setButton, setTools_base, setTheme, setLogWindow, setMenu1, setMenu1_base, setMenu2, setMenu2_base, setMenu2b, setMenu2b_base, setMenu3, setMenu3_base, setMenu4, setMenu4_base, setMenu5, setMenu5_base, setMenu6, setMenu6_base, hideMenu, showMenu
icn3dicn3dui (src)icn3d (icn3d)init, init_base, reinitAfterLoad, resetConfig
icn3dicn3duiicn3danalysisCls (analysis)calculateArea, calcBuriedSurface, measureDistTwoSets, addLine, addLineFromPicking, addLabel, addChainLabels, addTerminiLabels
icn3dicn3duiicn3dapplySymdCls (analysis)applySymd, applySymmetry
icn3dicn3duiicn3ddelphiCls (analysis)CalcPhiUrl, CalcPhi, PhiParser, loadPhiData, loadCubeData, applyCommandPhi, applyCommandDelphi, loadDelphiFile, loadPhiFile, loadPhiFileUrl
icn3dicn3duiicn3ddiagram2dCls (analysis)draw2Ddgm, set2DdgmNote, highlightNode, removeLineGraphSelection, removeScatterplotSelection, click2Ddgm, selectInteraction, selectInteractionAtoms, draw2DProtein, draw2DNucleotide, draw2DChemical
icn3dicn3duiicn3dcartoon2dCls (analysis)draw2Dcartoon, click2Dcartoon
icn3dicn3duiicn3ddsspCls (analysis)applyDssp, parseDsspData
icn3dicn3duiicn3dscapCls (analysis)applyCommandScap, adjust2DWidth, retrieveScap
icn3dicn3duiicn3dsymdCls (analysis)applyCommandSymd, retrieveSymd, getResObj, setSeqAlignForSymmetry, retrieveSymmetry, getPolygonColor, getAxisColor
icn3dicn3duiicn3daddTrackCls (annotations)clickAddTrackButton, showNewTrack, alignSequenceToStructure, defineSecondary, simplifyText, checkGiSeq, getFullText, setCustomFile
icn3dicn3duiicn3dannoCddSiteCls (annotations)showCddSiteAll, setDomainFeature, showAnnoType, setToolTip
icn3dicn3duiicn3dannoContactCls (annotations)showInteraction, showInteraction_base
icn3dicn3duiicn3dannoPTMCls (annotations)showPTM
icn3dicn3duiicn3dannoCrossLinkCls (annotations)showCrosslink, showCrosslink_base
icn3dicn3duiicn3dannoDomainCls (annotations)showDomainPerStructure, showDomainAll, showDomainWithData
icn3dicn3duiicn3dannoSnpClinVarCls (annotations)navClinVar, showClinVarLabelOn3D, getSnpLine, processSnpClinvar, showClinvarPart2, showSnp, showClinvar, showSnpClinvar, showSnpPart2, processNoClinvar, processNoSnp
icn3dicn3duiicn3dannoSsbondCls (annotations)showSsbond, showSsbond_base
icn3dicn3duiicn3dannoTransMemCls (annotations)showTransmem, showTransmem_base
icn3dicn3duiicn3dannotationCls (annotations)hideAllAnno, hideAllAnnoBase, setAnnoSeqBase, setAnnoTabBase, setAnnoTabAll, hideAnnoTabAll, resetAnnoAll, resetAnnoTabAll, setAnnoTabCustom, hideAnnoTabCustom, setAnnoTabClinvar, hideAnnoTabClinvar, setAnnoTabSnp, hideAnnoTabSnp, setAnnoTabCdd, hideAnnoTabCdd, setAnnoTab3ddomain, hideAnnoTab3ddomain, setAnnoTabSite, hideAnnoTabSite, setAnnoTabInteraction, hideAnnoTabInteraction, setAnnoTabSsbond, hideAnnoTabSsbond, setAnnoTabCrosslink, hideAnnoTabCrosslink, setAnnoTabTransmem, hideAnnoTabTransmem, setTabs, clickCdd, showAnnoSelectedChains, showAnnoAllChains, setAnnoView, setAnnoDisplay, showFixedTitle, hideFixedTitle, setAnnoViewAndDisplay, updateClinvar, updateSnp, updateDomain, updateInteraction, updatPTM, updateSsbond, updateCrosslink, updateTransmem
icn3dicn3duiicn3dshowAnnoCls (annotations)showAnnotations, showAnnoSeqData, getAnnotationData, getSequenceData, getCombinedSequenceData, processSeqData, enableHlSeq, getAnDiv, addButton, addSnpButton, conservativeReplacement, getColorhexFromBlosum62
icn3dicn3duiicn3dshowSeqCls (annotations)showSeq, insertGap, insertGapOverview, setAlternativeSeq, getProteinName
icn3dicn3duiicn3dalternateCls (display)alternateStructures, alternateWrapper
icn3dicn3duiicn3dapplyCenterCls (display)applyCenterOptions, setRotationCenter, setCenter, centerSelection, centerAtoms, setWidthHeight
icn3dicn3duiicn3dapplyClbondsCls (display)applyClbondsOptions, applyClbondsOptions_base
icn3dicn3duiicn3dapplyDisplayCls (display)applyDisplayOptions, selectMainChainSubset
icn3dicn3duiicn3dapplyOtherCls (display)applyOtherOptions, applyChemicalbindingOptions, updateStabilizer, getResidueRepPos
icn3dicn3duiicn3dapplySsbondsCls (display)applySsbondsOptions
icn3dicn3duiicn3dcameraCls (display)setCamera
icn3dicn3duiicn3ddrawCls (display)draw, applyTransformation, render
icn3dicn3duiicn3dfogCls (display)setFog
icn3dicn3duiicn3dsceneCls (display)rebuildScene, rebuildSceneBase
icn3dicn3duiicn3dsetColorCls (display)setColorByOptions, setAtmClr, updateChainsColor, setMmdbChainColor, setConservationColor, applyOriginalColor, applyPrevColor, setOutlineColor
icn3dicn3duiicn3dsetOptionCls (display)setOption, setStyle, saveStyle, applySavedStyle, saveColor, applySavedColor
icn3dicn3duiicn3dsetStyleCls (display)setStyle2Atoms, setAtomStyleByOptions, setBackground, saveCommandsToSession, getCommandsBeforeCrash, handleContextLost, adjustIcon
icn3dicn3duiicn3dexport3DCls (export)exportStlFile, exportVrmlFile, getFaceCnt, saveStlFile, updateArray, processStlMeshGroup, saveVrmlFile, processVrmlMeshGroup
icn3dicn3duiicn3dsaveFileCls (export)saveFile, saveSvg, getSvgXml, savePng, exportCustomAtoms, getAtomPDB, getSelectedResiduePDB, getPDBHeader, showTitle, getLinkToStructureSummary, setEntrezLinks
icn3dicn3duiicn3dshareLinkCls (export)shareLink, shareLinkUrl, getPngText
icn3dicn3duiicn3dthreeDPrintCls (export)setThichknessFor3Dprint, prepareFor3Dprint, resetAfter3Dprint, removeOneStabilizer, outputSelection, addStabilizer, hideStabilizer, getResidueRepAtom
icn3dicn3duiicn3daxesCls (geometry)buildAxes, buildAllAxes, createArrow, setPc1Axes
icn3dicn3duiicn3dboxCls (geometry)createBox, createBox_base, createBoxRepresentation_P_CA
icn3dicn3duiicn3dbrickCls (geometry)createBrick
icn3dicn3duiicn3dcartoonNuclCls (geometry)drawStrandNucleicAcid, drawNucleicAcidStick
icn3dicn3duiicn3dcurveCls (geometry)createCurveSub
icn3dicn3duiicn3dcurveStripArrowCls (geometry)createCurveSubArrow, createStripArrow, prepareStrand
icn3dicn3duiicn3dcylinderCls (geometry)createCylinder, createCylinder_base, createCylinderHelix, createCylinderCurve
icn3dicn3duiicn3dglycanCls (geometry)showGlycans
icn3dicn3duiicn3dimpostorCls (geometry)setParametersForShader , drawImpostorShader , getShader , createImpostorShaderBase, createImpostorShaderCylinder, createImpostorShaderSphere, clearImpostors
icn3dicn3duiicn3dinstancingCls (geometry)positionFromGeometry, colorFromGeometry, indexFromGeometry, normalFromGeometry, drawSymmetryMates, applyMat, drawSymmetryMatesNoInstancing, createInstancedGeometry, getInstancedMaterial, createInstancedMesh, drawSymmetryMatesInstancing
icn3dicn3duiicn3dlabelCls (geometry)makeTextSprite, createLabelRepresentation, hideLabels
icn3dicn3duiicn3dlineCls (geometry)createLineRepresentation, createConnCalphSidechain, createSingleLine, createLines
icn3dicn3duiicn3dreprSubCls (geometry)createRepresentationSub
icn3dicn3duiicn3dresidueLabelsCls (geometry)addResidueLabels, addNonCarbonAtomLabels, addAtomLabels
icn3dicn3duiicn3dsphereCls (geometry)createSphere, createSphereBase, createSphereRepresentation
icn3dicn3duiicn3dstickCls (geometry)createStickRepresentation
icn3dicn3duiicn3dstrandCls (geometry)createStrand, getOneExtraResidue
icn3dicn3duiicn3dstripCls (geometry)createStrip, setCalphaDrawnCoord
icn3dicn3duiicn3dtubeCls (geometry)createTube, getCustomtubesize, createTubeSub, getRadius
icn3dicn3duiicn3dhlObjectsCls (highlight)addHlObjects, removeHlObjects
icn3dicn3duiicn3dhlSeqCls (highlight)selectSequenceNonMobile, selectSequenceMobile, selectChainMobile, selectTitle, selectResidues
icn3dicn3duiicn3dhlUpdateCls (highlight)update2DdgmContent, changeSeqColor, removeHlAll, removeHlObjects, removeHlSeq, removeHl2D, removeHlMenus, updateHlAll, updateHlObjects, updateHlSeq, updateHlSeqInChain, updateHl2D, updateHlMenus, hlSequence, hlSeqInChain, toggleHighlight, clearHighlight, showHighlight, highlightChains, hlSummaryDomain3ddomain, updateHlAll
icn3dicn3duiicn3dcontactCls (interaction)getAtomsWithinAtom, getNeighboringAtoms, getExtent, hideContact
icn3dicn3duiicn3ddrawGraphCls (interaction)drawGraph
icn3dicn3duiicn3dgetGraphCls (interaction)getGraphData, drawResNode, getNodeTopBottom, updateGraphJson, updateGraphColor, handleForce, getNodesLinksForSet, getHbondLinksForSet, getIonicLinksForSet, getHalogenPiLinksForSet, getContactLinksForSet, getContactLinks, compNode, getGraphLinks, convertLabel2Resid
icn3dicn3duiicn3dhBondCls (interaction)isHbondDonorAcceptor, calcAngles, calcPlaneAngle, isValidHbond, calculateChemicalHbonds, setHbondsContacts, hideHbonds
icn3dicn3duiicn3dlineGraphCls (interaction)drawLineGraph, drawLineGraph_base, drawScatterplot_base, copyStylesInline
icn3dicn3duiicn3dpiHalogenCls (interaction)calculateHalogenPiInteractions, getHalogenDonar, getHalogenAcceptor, getPi, getCation, getHalogenPiInteractions, getRingNormal, getAromaticRings, dfs_cycle, getAromaticPisLigand, hideHalogenPi
icn3dicn3duiicn3dsaltbridgeCls (interaction)calculateIonicInteractions, hideSaltbridge
icn3dicn3duiicn3dshowInterCls (interaction)showInteractions, showHbonds, showHydrogens, hideHydrogens, hideHbondsContacts, showIonicInteractions, showHalogenPi, showClbonds, showSsbonds, pickCustomSphere, pickCustomSphere_base
icn3dicn3duiicn3dviewInterPairsCls (interaction)viewInteractionPairs, clearInteractions, resetInteractionPairs, retrieveInteractionData, getAllInteractionTable, getInteractionPerResidue, getInteractionPairDetails, getContactPairDetails, exportInteractions, exportSsbondPairs, exportClbondPairs, exportHbondPairs, exportSaltbridgePairs, exportHalogenPiPairs, exportSpherePairs
icn3dicn3duiicn3dalignParserCls (parsers)downloadAlignment, downloadAlignmentPart2, loadOpmDataForAlign
icn3dicn3duiicn3dchainalignParserCls (parsers)downloadChainalignmentPart2, downloadChainalignmentPart3, downloadChainalignment, parseChainAlignData, loadOpmDataForChainalign
icn3dicn3duiicn3ddensityCifParserCls (parsers)densityCifParser, parseChannels, getChannel, CIFParse, BinaryParse, MessagePackParse
icn3dicn3duiicn3ddsn6ParserCls (parsers)dsn6Parser, dsn6ParserBase, loadDsn6Data, getMatrix, loadDsn6File, loadDsn6FileUrl
icn3dicn3duiicn3dloadAtomDataCls (parsers)loadAtomDataIn
icn3dicn3duiicn3dloadPDBCls (parsers)loadPDB, adjustSeq, setSsbond, getChainCalpha
icn3dicn3duiicn3dmmcifParserCls (parsers)downloadMmcif, downloadMmcifSymmetry, loadMmcifData
icn3dicn3duiicn3dmmdbParserCls (parsers)parseMmdbData, downloadMmdb, downloadBlast_rep_id, loadMmdbOpmData
icn3dicn3duiicn3dbcifParserCls (parsers)downloadBcif, parseBcifData
icn3dicn3duiicn3dmol2ParserCls (parsers)loadMol2Data, loadMol2AtomData
icn3dicn3duiicn3dopmParserCls (parsers)downloadOpm, loadOpmData, setOpmData, parseAtomData
icn3dicn3duiicn3dParserUtilsCls (parsers)alignCoords, getMissingResidues, set2DDiagramsForAlign, set2DDiagramsForChainalign, parse2DDiagramsData, set2DDiagrams, showLoading, hideLoading, setYourNote, transformToOpmOri, transformToOpmOriForAlign, addOneDumAtom, addMemAtoms, setMaxD, renderStructure
icn3dicn3duiicn3dpdbParserCls (parsers)downloadPdb, downloadUrl, loadPdbData, loadPdbDataRender
icn3dicn3duiicn3drealignParserCls (parsers)realign, parseChainRealignData, realignOnSeqAlign, realignChainOnSeqAlign
icn3dicn3duiicn3dsdfParserCls (parsers)downloadCid, loadSdfData, loadSdfAtomData
icn3dicn3duiicn3dsetSeqAlignCls (parsers)setSeqAlign, setSeqAlignChain, setSeqAlignForRealign, setSeqPerResi
icn3dicn3duiicn3dxyzParserCls (parsers)loadXyzData, setXyzAtomSeq, loadXyzAtomData
icn3dicn3duiicn3ddcdParserCls (parsers)loadDcdData
icn3dicn3duiicn3dxtcParserCls (parsers)loadXtcData
icn3dicn3duiicn3dcontrolCls (picking)setControl, mouseMove
icn3dicn3duiicn3dpickingCls (picking)showPicking, showPickingBase, showPickingHilight, select3ddomainFromAtom, selectStrandHelixFromAtom
icn3dicn3duiicn3drayCls (picking)rayCasterBase, isIntersect, getAtomsFromPosition
icn3dicn3duiicn3dapplyCommandCls (selection)applyCommand, setStrengthPara, getThresholdNameArrays, setQueryresi2score, getMenuFromCmd
icn3dicn3duiicn3ddefinedSetsCls (selection)setProtNuclLigInMenu, setPredefinedInMenu, setAtomMenu, setChainsInMenu, setTransmemInMenu, showSets, clickCustomAtoms, deleteSelectedSets, changeCustomAtoms, setHAtomsFromSets, updateAdvancedCommands, combineSets, commandSelect, clickCommand_apply, selectCombinedSets, clickModeswitch, setModeAndDisplay, setMode, getAtomsFromOneSet, getAtomsFromSets, getAtomsFromNameArray
icn3dicn3duiicn3dfirstAtomObjCls (selection)getFirstAtomObj, getFirstCalphaAtomObj, getFirstAtomObjByName, getLastAtomObj, getResiduesFromAtoms, getResiduesFromCalphaAtoms, getChainsFromAtoms, getAtomFromResi, getAtomCoordFromResi
icn3dicn3duiicn3dloadScriptCls (selection)loadScript, execCommands, execCommandsBase, pressCommandtext, applyCommandLoad, applyCommandMap, applyCommandEmmap, applyCommandRealign, applyCommandGraphinteractionBase, applyCommandGraphinteraction, applyCommandAnnotationsAndCddSite, applyCommandClinvarBase, applyCommandSnpBase, applyCommandClinvar, applyCommandSnp, applyCommand3ddomainBase, applyCommand3ddomain, applyCommandViewinteractionBase, applyCommandViewinteraction, renderFinalStep, replayFirstStep
icn3dicn3duiicn3dresid2specCls (selection)residueids2spec, atoms2spec, atoms2residues, selectProperty, selectComplement, switchHighlightLevel, switchHighlightLevelUp, switchHighlightLevelDown
icn3dicn3duiicn3dselectByCommandCls (selection)selectByCommand, selectBySpec
icn3dicn3duiicn3dselectionCls (selection)selectAll, selectAll_base, selectAChain, selectResidueList, selectMainChains, selectSideChains, selectMainSideChains, clickShow_selected, clickHide_selected, getGraphDataForDisplayed, updateSelectionNameDesc, addCustomSelection, showSelection, hideSelection, saveSelection, removeSelection, resetAll, loadSelection, oneStructurePerWindow, showAll, saveSelectionIfSelected, saveSelectionPrep, selectOneResid, toggleSelection, toggleMembrane, adjustMembrane, selectBtwPlanes
icn3dicn3duiicn3dapplyMapCls (surface)applySurfaceOptions, applyMapOptions, applyEmmapOptions, applyPhimapOptions, applyphisurfaceOptions, removeSurfaces, removeLastSurface, removeMaps, removeEmmaps, removePhimaps, removeLastMap, removeLastEmmap, removeLastPhimap
icn3dicn3duiicn3delectronMapCls (surface)getFacesAndVertices, initparm, transformMemPro, fillvoxels, buildboundary, marchingcubeinit, counter, marchingcube
icn3dicn3duiicn3dmarchingCubeCls (surface)march, laplacianSmooth
icn3dicn3duiicn3dproteinSurfaceCls (surface)getVDWIndex, inOrigExtent, getFacesAndVertices, initparm, boundingatom, fillvoxels, fillAtom, fillvoxelswaals, fillAtomWaals, buildboundary, fastdistancemap, fastoneshell, marchingcubeinit, counter, marchingcube
icn3dicn3duiicn3dsurfaceCls (surface)createSurfaceRepresentation, transformMemPro, SetupSurface, SetupMap
icn3dicn3duiicn3dresizeCanvasCls (transform)resizeCanvas, windowResize, openFullscreen, rotStruc, back, forward, replayon, replayoff, closeDialogs
icn3dicn3duiicn3dtransformCls (transform)resetOrientation, rotateLeft , rotateRight , rotateUp , rotateDown , rotate_base , setRotation, translateLeft, translateRight, translateUp, translateDown, translate_base, zoomIn, zoomOut, zoominSelection, getTransformationStr

Add New Classesback to top

To contribute new classes to iCn3D, you can follow the example of "module.html". You need to do the following steps:
  1. Comment out icn3d library: <!--script src="icn3d.min.js"></script->
  2. Script type should be "module": <script type="module">
  3. Import iCn3D module: "import * as icn3d from './icn3d.module.js';"
  4. Import your custom class (e.g., "LoadStateFile"): "import {LoadStateFile} from './loadStateFile.js';"
  5. Remove "$( document ).ready(async function() {" and the corresponding "//});" since module will always be run after the document is ready.
  6. Call your class after the function "await icn3dui.show3DStructure()". You first define the class instance "loadStateFileCls" and pass the iCn3D instance "icn3dui.icn3d". Then call the functions of your class.
        var loadStateFileCls = new LoadStateFile(icn3dui.icn3d);
        loadStateFileCls.loadStateFile('color spectrum');
    
  7. Your custom class could look like the following.
        // import any classes from icn3d.module.js to be used in your class
        import {LoadScript} from './icn3d.module.js';
    
        // class name starts with a upper-case letter
        class LoadStateFile {
            // pass the instance of the class iCn3D
            constructor(icn3d) {
                this.icn3d = icn3d;
            }
    
            // functions start with a lower-case letter
            // use "ic" to access the instance of iCn3D class
            loadStateFile(fileStr) { var ic = this.icn3d;
                // "ic" has a lot of class instances such as "loadScriptCls"
                ic.loadScriptCls.loadScript(fileStr, true);
            }
        }
    
        // export your class
        export {LoadStateFile}
    
  8. Install static-server and run "static-server -i module.html -o" to test your code. "import" and "export" do not work in "file://" protocol.
  9. Specify the ID of the structure in the URL, e.g., "localhost:9080/module.html?mmdbid=1kq2".

Modify Functions in Classesback to top

To modify functions in some classes of iCn3D, you can follow the example of "example.html". You can add the modified functions after the line containing "icn3d.min.js". The line to define the function starts with the global variable "icn3d", then the class name (e.g., "Picking"), then the keyword "prototype", then the function name. One example is as follows:
    icn3d.Picking.prototype.showPicking = function(atom, x, y) { var ic = this.icn3d, me = ic.icn3dui;
        // 1. copy the function showPicking() here
        // 2. Modify the function as if it is in the class "Picking"
    }

RESTful APIsback to top

delphi.cgi
The "DelPhi" program from the Honig lab calculates electrostatic potentials. It was licensed to be used in iCn3D by Columbia University. A typical use of the API https://www.ncbi.nlm.nih.gov/Structure/delphi/delphi.cgi is to post data to this API with a few parameters. The parameter "pdb2pqr" inputs the Protein Data Bank (PDB) string and outputs the PQR string with atom partial charge and atom size. The parameters "pdb2phi" and "pqr2phi" input the PDB string or PQR string, respectively, and both output the calculated potential. The parameters "gsize" and "salt" are used to define the grid size and salt concentration (M), respectively. The parameter "cube" is used to output the potential in the text format, not the default binary format.

scap.cgi
The "scap" program from the Honig lab predicts side chains due to mutations. A typical use of the API https://www.ncbi.nlm.nih.gov/Structure/scap/scap.cgi is to post data to this API with a few parameters. The parameters "pdb" and "snp" input the PDB string and the SNP in the format "[chain ID],[residue number],[mutant]". For example, "A,10,K" means that the residue with a residue number 10 in the chain A will be mutated to Lys. The parameter "json=1" outputs the mutant's PDB string in the JSON format.

tmalign.cgi
The "TM-align" program from the Zhang lab aligns two structures. A typical use of the API https://www.ncbi.nlm.nih.gov/Structure/tmalign/tmalign.cgi is to post data to this API with two parameters: "pdb_query" and "pdb_target", which are the query and target PDB files, respectively.

symd.cgi
The "SymD" program from NCI determines symmetries in structures. A typical use of the API https://www.ncbi.nlm.nih.gov/Structure/symd/symd.cgi is to post a PDB string to this API with the parameter "pdb". The output is a JSON blob describing the symmetry.

cdannots.fcgi
The "cdannots.fcgi" backend returns conserved domains and binding sites information from NCBI in JSON format. An example use of the API is https://www.ncbi.nlm.nih.gov/Structure/cdannots/cdannots.fcgi?fmt&live=lcl&queries=1KQ2_A,22219082,Q76EI6. The input is a list of accessions such as NCBI protein accession, NCBI gi, or UniProt IDs. The parsing code is in the file https://github.com/ncbi/icn3d/blob/master/src/icn3d/annotations/annoCddSite.js.


Codeathon/Workshop Contributorsback to top