forked from ncbi/icn3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabled to show interactions using force-directed graph in the menu '…
…View > H-Bonds & Interactions > Force-Directed Graph'. Enabled to calculate Solvent Accessible Surface Area (SASA) in the menu 'View > Surface Area', or color by SASA in the menu 'Color > Solvent Accessibility'. Fixed ClinVar and SNP annotations.
- Loading branch information
Showing
28 changed files
with
3,371 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,307 @@ | ||
<!DOCTYPE html><html lang="en"><head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | ||
<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="ncbi_app" content="iCn3D"><meta name="ncbi_pdid" content="advanced"> | ||
<meta name="keywords" content="NCBI, Structure, JavaScript, iCn3D, 3D, Viewer, WebGL, three.js, sequence, chemical"> | ||
<meta name="robots" content="index,follow,noarchive"> | ||
<title>iCn3D: Web-based 3D Structure Viewer</title> | ||
</head> | ||
<body> | ||
<div id="div0" style="float:left; padding-right:5px;"></div> | ||
<div id="div1" style="float:left;"></div> | ||
|
||
<link rel="stylesheet" href="lib/jquery-ui-1.12.1.min.css"> | ||
<link rel="stylesheet" href="icn3d_full_ui.css"> | ||
<script src="lib/jquery-3.5.0.min.js"></script> | ||
<script src="lib/jquery-ui-1.12.1.min.js"></script> | ||
<script src="lib/three_0.103.0.min.js"></script> | ||
<script src="icn3d_full_ui.min.js"></script> | ||
|
||
<script type="text/javascript"> | ||
// separating the GET parameters from the current URL | ||
// repalce "color #" with "color " in the url | ||
var url = document.URL.replace(/\#/g, ''); | ||
|
||
var bNopara = false; | ||
var ampPos = url.indexOf("?"); | ||
if(ampPos === -1) { | ||
// alert("Please include '?pdbid=1GPK,2POR,...' in your url"); | ||
bNopara = true; | ||
} | ||
|
||
var getParams = url.split("?"); | ||
// transforming the GET parameters into a dictionnary | ||
var search = getParams[getParams.length - 1]; | ||
var params = {}; | ||
var inpara = ""; | ||
|
||
if(!bNopara) { | ||
//params = JSON.parse('{"' + decodeURIComponent(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g,'":"') + '"}'); | ||
|
||
var decodeSearch = decodeURIComponent(search); | ||
|
||
var hashes = decodeSearch.split('&'); | ||
for (var i = 0; i < hashes.length; i++) { | ||
hash = hashes[i].split('='); | ||
params[hash[0].trim()] = (hash[1] !== undefined) ? hash[1].trim() : undefined; | ||
} | ||
|
||
// for mmdb structures, pass the parameters after the first "&" sign | ||
inpara = "&" + url.substr(ampPos + 1); | ||
} | ||
|
||
var gi = params.gi; | ||
var blast_rep_id = params.blast_rep_id; | ||
var query_id = params.query_id; | ||
|
||
var mmdbid = params.mmdbid; | ||
var mmtfid = params.mmtfid; | ||
var pdbid = params.pdbid; | ||
var opmid = params.opmid; | ||
var cid = params.cid; | ||
var mmcifid = params.mmcifid; | ||
var urlname = params.url; | ||
var urltype = (params.type === undefined) ? 'pdb' : params.type; | ||
|
||
var align = params.align; | ||
var chainalign = params.chainalign; | ||
|
||
var width = params.width; | ||
var height = params.height; | ||
|
||
var command = params.command; // ";" separated commands | ||
|
||
var from = params.from; | ||
|
||
function getValue(input) { | ||
if(input == 'true' || input == '1') { | ||
input = true; | ||
} | ||
else if(input == 'false' || input == '0') { | ||
input = false; | ||
} | ||
|
||
return input; | ||
} | ||
|
||
var resize = getValue(params.resize); | ||
|
||
var showmenu = getValue(params.showmenu); | ||
|
||
var showtitle = getValue(params.showtitle); | ||
|
||
var showcommand = getValue(params.showcommand); | ||
|
||
var simplemenu = getValue(params.simplemenu); | ||
|
||
var mobilemenu = getValue(params.mobilemenu); | ||
|
||
var closepopup = getValue(params.closepopup); | ||
|
||
var showanno = getValue(params.showanno); | ||
|
||
var showseq = getValue(params.showseq); | ||
|
||
// backward compatible with showseq | ||
showanno = showanno || showseq; | ||
|
||
// for alignment | ||
var showalignseq = getValue(params.showalignseq); | ||
|
||
var show2d = getValue(params.show2d); | ||
|
||
var showsets = getValue(params.showsets); | ||
|
||
var rotate = params.rotate; | ||
|
||
var options = (params.options !== undefined) ? JSON.parse(params.options) : undefined; | ||
|
||
$( document ).ready(function() { | ||
// use the FIXED name "icn3duiHash", which is used in iCn3DUI | ||
window.icn3duiHash = {}; | ||
|
||
function setupViewer(idName, idValue) { | ||
var maxStructure = 5; // show max 5 structures | ||
|
||
var idArray = idValue.replace(/\s/g, '').split(','); | ||
|
||
if(idArray.length > 1) { | ||
resize = false; | ||
|
||
if(width.indexOf('%') != -1) { | ||
width = 400; | ||
height = 400; | ||
} | ||
} | ||
|
||
if(options === undefined || options === 'undefined') options = {}; | ||
|
||
//Options are available at: https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d.html#DisplayOptions | ||
//options['chemicalbinding'] = 'show'; | ||
|
||
//for(var i = 0, il = idArray.length; i < il && i < maxStructure; ++i) { | ||
var i = 0; | ||
var cfg = { | ||
divid: 'div' + i, | ||
inpara: inpara, | ||
width: '49%', //width, | ||
height: height, | ||
resize: resize, | ||
rotate: rotate, | ||
showmenu: showmenu, | ||
showtitle: showtitle, | ||
showcommand: showcommand, | ||
showanno: showanno, | ||
show2d: show2d, | ||
showsets: showsets, | ||
simplemenu: simplemenu, | ||
mobilemenu: true, //mobilemenu, | ||
closepopup: true, //closepopup, | ||
blast_rep_id: blast_rep_id, | ||
query_id: query_id, | ||
options: options, | ||
controlGl: true, | ||
command: command, | ||
bSidebyside: true | ||
}; | ||
if(idName !== '') cfg[idName] = idArray[i]; | ||
|
||
var icn3dui = new iCn3DUI(cfg); | ||
icn3dui.show3DStructure(); | ||
window.icn3duiHash['div0'] = icn3dui; | ||
if(idName === '') $("#div" + i + "_wait").hide(); | ||
|
||
|
||
i = 1; | ||
var cfg2 = cfg; | ||
cfg2.divid = 'div' + i; | ||
var icn3dui2 = new iCn3DUI(cfg2); | ||
icn3dui2.show3DStructure(); | ||
window.icn3duiHash['div1'] = icn3dui2; | ||
if(idName === '') $("#div" + i + "_wait").hide(); | ||
//} | ||
} | ||
|
||
if(mmtfid !== undefined) { | ||
setupViewer('mmtfid', mmtfid); | ||
} | ||
else if(pdbid !== undefined) { | ||
setupViewer('pdbid', pdbid); | ||
} | ||
else if(opmid !== undefined) { | ||
setupViewer('opmid', opmid); | ||
} | ||
else if(cid !== undefined) { | ||
setupViewer('cid', cid); | ||
} | ||
else if(mmcifid !== undefined) { | ||
setupViewer('mmcifid', mmcifid); | ||
} | ||
else if(mmdbid !== undefined) { | ||
setupViewer('mmdbid', mmdbid); | ||
} | ||
else if(gi !== undefined) { | ||
setupViewer('gi', gi); | ||
} | ||
else if(blast_rep_id !== undefined) { | ||
if( (from === 'blast' || from === 'icn3d') && command == '') { | ||
command = 'view+annotations;+set+annotation+cdd;+set+annotation+site;+set+view+detailed+view;+select+chain+' | ||
+ blast_rep_id + ';+show+selection'; | ||
} | ||
|
||
setupViewer('blast_rep_id', blast_rep_id); | ||
} | ||
else if(urlname !== undefined) { | ||
urlname = decodeURIComponent(urlname); | ||
setupViewer('url', urltype + '|' + urlname); | ||
} | ||
// e.g., align=103701,1,4,68563,1,167 [mmdbid1,biounit,molecule,mmdbid2,biounit,molecule] | ||
else if(align !== undefined) { | ||
var cfg = { | ||
divid: 'div0', | ||
inpara: inpara, | ||
width: '49%', //width, | ||
height: height, | ||
resize: resize, | ||
rotate: rotate, | ||
showmenu: showmenu, | ||
showtitle: showtitle, | ||
showcommand: showcommand, | ||
showanno: showanno, | ||
showalignseq: showalignseq, | ||
show2d: show2d, | ||
showsets: showsets, | ||
simplemenu: simplemenu, | ||
mobilemenu: true, //mobilemenu, | ||
closepopup: true, //closepopup, | ||
align: align, | ||
controlGl: true, | ||
command: command, | ||
bSidebyside: true | ||
}; | ||
|
||
var icn3dui = new iCn3DUI(cfg); | ||
icn3dui.show3DStructure(); | ||
window.icn3duiHash['div0'] = icn3dui; | ||
|
||
var cfg2 = cfg; | ||
cfg2.divid = 'div1'; | ||
var icn3dui2 = new iCn3DUI(cfg2); | ||
icn3dui2.show3DStructure(); | ||
window.icn3duiHash['div1'] = icn3dui2; | ||
} | ||
else if(chainalign !== undefined) { | ||
var cfg = { | ||
divid: 'div0', | ||
inpara: inpara, | ||
width: '49%', //width, | ||
height: height, | ||
resize: resize, | ||
rotate: rotate, | ||
showmenu: showmenu, | ||
showtitle: showtitle, | ||
showcommand: showcommand, | ||
showanno: showanno, | ||
showalignseq: showalignseq, | ||
show2d: show2d, | ||
showsets: showsets, | ||
simplemenu: simplemenu, | ||
mobilemenu: true, //mobilemenu, | ||
closepopup: true, //closepopup, | ||
chainalign: chainalign, | ||
controlGl: true, | ||
command: command, | ||
bSidebyside: true | ||
}; | ||
|
||
var icn3dui = new iCn3DUI(cfg); | ||
icn3dui.show3DStructure(); | ||
window.icn3duiHash['div0'] = icn3dui; | ||
|
||
var cfg2 = cfg; | ||
cfg2.divid = 'div1'; | ||
var icn3dui2 = new iCn3DUI(cfg2); | ||
icn3dui2.show3DStructure(); | ||
window.icn3duiHash['div1'] = icn3dui2; | ||
} | ||
else { | ||
setupViewer('', ''); | ||
} | ||
|
||
}); // document ready | ||
|
||
</script> | ||
|
||
<!-- Google Analytics --> | ||
<script type="text/javascript"> | ||
var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-68648221-3']); | ||
_gaq.push(['_setDomainName', '.ncbi.nlm.nih.gov']); | ||
_gaq.push(['_trackPageview']); | ||
setTimeout("_gaq.push(['_trackEvent', '10_seconds', 'read'])",10000); | ||
(function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); | ||
</script> | ||
</body></html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.