Skip to content

Commit

Permalink
Merge pull request #15 in STRUC/icn3d from state to master
Browse files Browse the repository at this point in the history
* commit 'ede19e27199dd50e2b93514613d786c29425c34c':
  improve commands-related features
  • Loading branch information
jiywang3 committed Mar 10, 2016
2 parents 04a2564 + ede19e2 commit e91c0f7
Show file tree
Hide file tree
Showing 9 changed files with 1,486 additions and 1,322 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ See the [help page](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d.html) for

## Download

The complete version with all libraries can be downloaded from [https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-0.9.2-dev.zip](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-0.9.2-dev.zip)
The complete version with all libraries can be downloaded from [https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-0.9.3-dev.zip](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-0.9.3-dev.zip)

## Contact

Expand Down Expand Up @@ -92,6 +92,8 @@ gulp gh-pages

## Change log

The beta version [icn3d-0.9.3-dev](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-0.9.3-dev.zip) was release on March 9, 2016. Improved the following features: "Back" and "Forward" button, Export State, Open State.

The beta version [icn3d-0.9.2-dev](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-0.9.2-dev.zip) was release on March 4, 2016. CSS namespace was added. The file simple_ui.js was reorganized to share some codes with full_ui.js. A "Schematic" style was added to show one letter residue name in the C-alpha (for protein) or phosphorus (for nucleotide) position.

The beta version [icn3d-0.9.1-dev](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-0.9.1-dev.zip) was release on Feb 9, 2016. The surface generation was switched from the iview version (surface.js) to the more efficient 3Dmol version (ProteinSurface4.js and marchingcube.js).
Expand Down
11 changes: 8 additions & 3 deletions full.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>iCn3D Structure Viewer</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="iCn3D Structure Viewer">
<meta name="ncbi_db" content="structure">
<meta name="keywords" content="NCBI, Structure, iCn3D, 3D, Viewer, WebGL, three.js, sequence, chemical">
<meta name="robots" content="index,follow,noarchive">
<title>iCn3D Structure Viewer</title>
</head>
<body>
<div id="div0"></div>
Expand Down Expand Up @@ -37,9 +42,9 @@

// for mmdb structures, pass the parameters after the first "&" sign
var inpara = "";
var ampPos = document.URL.indexOf("&");
var ampPos = document.URL.indexOf("?");
if(ampPos !== -1) {
inpara = document.URL.substr(ampPos);
inpara = "&" + document.URL.substr(ampPos + 1);
}

var gi = params.gi;
Expand Down
33 changes: 13 additions & 20 deletions icn3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ <h1>iCn3D Structure Viewer</h1>
<a href="#setCamera">setCamera</a><br>
<a href="#setColorByOptions">setColorByOptions</a><br>

<a href="#setStylesForAtoms">setStylesForAtoms</a><br>
<a href="#setOutlineColor">setOutlineColor</a><br>

<a href="#showPicking">showPicking</a><br>
Expand Down Expand Up @@ -532,16 +531,16 @@ <h2>Commands for the advanced interface<img src="https://www.ncbi.nlm.nih.gov/St
<a name="style"></a><b>3. Style</b> <a href="#Top"><span class="top">&nbsp;&nbsp;&nbsp;</span></a><br>
<table>
<tbody><tr><td colspan="2">a) Style -&gt; Protein</td></tr>
<tr><td><span class="indent">ribbon:</span></td> <td>style protein ribbon</td></tr>
<tr><td><span class="indent">strand:</span></td> <td>style protein strand</td></tr>
<tr><td><span class="indent">cylinder &amp; plate:</span></td> <td>style protein cylinder &amp; plate</td></tr>
<tr><td><span class="indent">c alpha trace:</span></td> <td>style protein c alpha trace</td></tr>
<tr><td><span class="indent">b factor tube:</span></td> <td>style protein b factor tube</td></tr>
<tr><td><span class="indent">lines:</span></td> <td>style protein lines</td></tr>
<tr><td><span class="indent">stick:</span></td> <td>style protein stick</td></tr>
<tr><td><span class="indent">ball &amp; stick:</span></td> <td>style protein ball &amp; stick</td></tr>
<tr><td><span class="indent">sphere:</span></td> <td>style protein sphere</td></tr>
<tr><td><span class="indent">hide:</span></td> <td>style protein nothing</td></tr>
<tr><td><span class="indent">ribbon:</span></td> <td>style proteins ribbon</td></tr>
<tr><td><span class="indent">strand:</span></td> <td>style proteins strand</td></tr>
<tr><td><span class="indent">cylinder &amp; plate:</span></td> <td>style proteins cylinder &amp; plate</td></tr>
<tr><td><span class="indent">c alpha trace:</span></td> <td>style proteins c alpha trace</td></tr>
<tr><td><span class="indent">b factor tube:</span></td> <td>style proteins b factor tube</td></tr>
<tr><td><span class="indent">lines:</span></td> <td>style proteins lines</td></tr>
<tr><td><span class="indent">stick:</span></td> <td>style proteins stick</td></tr>
<tr><td><span class="indent">ball &amp; stick:</span></td> <td>style proteins ball &amp; stick</td></tr>
<tr><td><span class="indent">sphere:</span></td> <td>style proteins sphere</td></tr>
<tr><td><span class="indent">hide:</span></td> <td>style proteins nothing</td></tr>

<tr><td colspan="2"><br>b) Style -&gt; Nucleotides</td></tr>
<tr><td><span class="indent">nucleotide cartoon:</span></td> <td>style nucleotides nucleotide cartoon</td></tr>
Expand Down Expand Up @@ -598,9 +597,8 @@ <h2>Commands for the advanced interface<img src="https://www.ncbi.nlm.nih.gov/St
<table>
<tbody><tr><td colspan="2"><br>a) Surface -&gt; Type</td></tr>
<tr><td><span class="indent">Van der Waals surface:</span></td> <td>set surface Van der Waals surface</td></tr>
<tr><td><span class="indent">solvent excluded surface:</span></td> <td>set surface solvent excluded surface</td></tr>
<tr><td><span class="indent">solvent accessible surface:</span></td> <td>set surface solvent accessible surface</td></tr>
<tr><td><span class="indent">molecular surface:</span></td> <td>set surface molecular surface</td></tr>
<tr><td><span class="indent">solvent accessible surface:</span></td> <td>set surface solvent accessible surface</td></tr>
<tr><td><span class="indent">hide:</span></td> <td>set surface nothing</td></tr>

<tr><td colspan="2"><br>b) Surface -&gt; Opacity</td></tr>
Expand Down Expand Up @@ -753,15 +751,14 @@ <h2>Display Options<img src="https://www.ncbi.nlm.nih.gov/Structure/IMG/spacer.g
options['ligands'] = 'stick'; //line, stick, ball &amp; stick, sphere, nothing
options['water'] = 'nothing'; //sphere, dot, nothing
options['ions'] = 'sphere'; //sphere, dot, nothing
options['surface'] = 'nothing'; //Van der Waals surface, solvent excluded surface, solvent accessible surface, molecular surface, nothing
options['surface'] = 'nothing'; //Van der Waals surface, molecular surface, solvent accessible surface, nothing
options['opacity'] = '0.8'; //1.0, 0.9, 0.8, 0.7, 0.6, 0.5
options['wireframe'] = 'no'; //yes, no
options['hbonds'] = 'no'; //yes, no
options['labels'] = 'no'; //yes, no
options['lines'] = 'no'; //yes, no
options['axis'] = 'no'; //yes, no
options['picking'] = 'atom'; //no, atom, residue, strand
options['surfaceregion'] = 'nothing'; //nothing, all, sphere
</pre>
</li>
</ul>
Expand Down Expand Up @@ -860,7 +857,7 @@ <h2>API Documents of the core library iCn3D<img src="https://www.ncbi.nlm.nih.go
Create the style of ribbon or strand for "atoms". "num" means how many lines define the curve. "num" is 2 for ribbon and 6 for strand. "div" means how many points are used to smooth the curve. It's typically 5. "coilWidth" is the width of curve for coil. "helixSheetWidth" is the width of curve for helix or sheet. "doNotSmoothen" is a flag to smooth the curve or not. "thickness" is the thickness of the curve. "bHighlight" is an option to draw the highlight for these atoms. The highlight could be outlines with bHighlight=1 and 3D objects with bHighlight=2 as mentioned <a href="#bHighlight">above</a>.<br>
<br>
<a name="createSurfaceRepresentation"></a><b>createSurfaceRepresentation(atoms, type, wireframe, opacity)</b> <a href="#Top"><span class="top">&nbsp;&nbsp;&nbsp;</span></a><br>
Create surface for "atoms". "type" can be 1 (Van der Waals surface), 2 (solvent excluded surface), 3 (solvent accessible surface), and 4 (molecular surface). "wireframe" is a boolean to determine whether to show the surface as a mesh. "opacity" is a value between 0 and 1. "1" means not transparent at all. "0" means 100% transparent.<br>
Create surface for "atoms". "type" can be 1 (Van der Waals surface), 2 (molecular surface), and 3 (solvent accessible surface). "wireframe" is a boolean to determine whether to show the surface as a mesh. "opacity" is a value between 0 and 1. "1" means not transparent at all. "0" means 100% transparent.<br>
<br>
<a name="createTube"></a><b>createTube(atoms, atomName, radius, bHighlight)</b> <a href="#Top"><span class="top">&nbsp;&nbsp;&nbsp;</span></a><br>
Create tubes for "atoms" with certain "atomName". "radius" is the radius of the tubes. "bHighlight" is an option to draw the highlight for these atoms. The highlight could be outlines with bHighlight=1 and 3D objects with bHighlight=2 as mentioned <a href="#bHighlight">above</a>.<br>
Expand Down Expand Up @@ -931,10 +928,6 @@ <h2>API Documents of the core library iCn3D<img src="https://www.ncbi.nlm.nih.go
Set atom color according to the definition in options (options.color).<br>
<br>

<a name="setStylesForAtoms"></a><b>setStylesForAtoms(options, atoms)</b> <a href="#Top"><span class="top">&nbsp;&nbsp;&nbsp;</span></a><br>
Set the display styles for "atoms" according to the input "options" for sidechains, secondary, nucleotides, ligands, water, and ions as shown <a href="#rebuildScene">above</a>.<br>
<br>

<a name="setOutlineColor"></a><b>setOutlineColor(colorStr)</b> <a href="#Top"><span class="top">&nbsp;&nbsp;&nbsp;</span></a><br>
Set the outline color when highlighting atoms. The available options are "yellow", "green", and "red". <br>
<br>
Expand Down
11 changes: 8 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>iCn3D Structure Viewer</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="iCn3D Structure Viewer">
<meta name="ncbi_db" content="structure">
<meta name="keywords" content="NCBI, Structure, iCn3D, 3D, Viewer, WebGL, three.js, sequence, chemical">
<meta name="robots" content="index,follow,noarchive">
<title>iCn3D Structure Viewer</title>
</head>
<body>
<div id="div0"></div>
Expand Down Expand Up @@ -38,9 +43,9 @@

// for mmdb structures, pass the parameters after the first "&" sign
var inpara = "";
var ampPos = document.URL.indexOf("&");
var ampPos = document.URL.indexOf("?");
if(ampPos !== -1) {
inpara = document.URL.substr(ampPos);
inpara = "&" + document.URL.substr(ampPos + 1);
}

var gi = params.gi;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "icn3d",
"version": "0.9.2-dev",
"version": "0.9.3-dev",
"description": "iCn3D Structure Viewer",
"main": "index.html",
"scripts": {
Expand Down
Loading

0 comments on commit e91c0f7

Please sign in to comment.