Skip to content

Commit c900cb0

Browse files
committed
Pull request #645: Release Ig templates for assigning reference numbers.
Merge in STRUC/icn3d from release3314 to master * commit '98e134138fb26cd7117a89092a0b18fc61f94711': Release Ig templates for assigning reference numbers.
2 parents 3aafc5d + 98e1341 commit c900cb0

134 files changed

Lines changed: 83372 additions & 400 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## Change Log
2+
[icn3d-3.31.4](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.31.4.zip) was release on May 11, 2024. Release Ig templates for assigning reference numbers.
3+
24
[icn3d-3.31.3](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.31.3.zip) was release on April 15, 2024. Jack Lin fixed some issues in loading a collection file.
35

46
[icn3d-3.31.2](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.31.2.zip) was release on April 9, 2024. Fixed the secondary structure ranges in CIF files.
@@ -147,7 +149,7 @@
147149

148150
[icn3d-3.11.5](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.11.5.zip) was release on May 3, 2022. Added VAST+ and VAST Search interface in the menu "File > Search Similar". Enabled to assign rainbow/spectrum colors for a list of sets in the menu "Color > Rainbow/Spectrum > for Sets".
149151

150-
[icn3d-3.11.4](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.11.4.zip) was release on April 26, 2022. Added two examples in https://ww.ncbi.nlm.nih.gov/Structure/icn3d/example.html to show the predefined alignment of two PDB files, or the predefined alignment of one PDB file to other chains.
152+
[icn3d-3.11.4](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.11.4.zip) was release on April 26, 2022. Added two examples in https://www.ncbi.nlm.nih.gov/Structure/icn3d/example.html to show the predefined alignment of two PDB files, or the predefined alignment of one PDB file to other chains.
151153

152154
[icn3d-3.11.3](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.11.3.zip) was release on April 22, 2022. Added the menu "Style > Nucl. Bases" to display the bases of nucleotides.
153155

build/icn3d.js

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17857,7 +17857,7 @@ var icn3d = (function (exports) {
1785717857
//ic.initUI();
1785817858
ic.init();
1785917859
ic.bInputfile = true;
17860-
ic.InputfileData = (ic.InputfileData) ? ic.InputfileData + '\nENDMDL\n' + data : data;
17860+
ic.InputfileData = (ic.InputfileData) ? ic.InputfileData + '\nENDMDL\n' + data : dataStr;
1786117861
ic.InputfileType = 'mmcif';
1786217862
// await ic.mmcifParserCls.loadMmcifData(data);
1786317863
await ic.opmParserCls.loadOpmData(dataStr, undefined, undefined, 'mmcif', undefined, bText);
@@ -18512,11 +18512,13 @@ var icn3d = (function (exports) {
1851218512
let command;
1851318513
if(shape == 'Sphere') {
1851418514
ic.sphereCls.createSphereBase(pos1, color, radius, undefined, undefined, undefined, opacity);
18515-
command = 'add sphere | x1 ' + pos1.x.toPrecision(4) + ' y1 ' + pos1.y.toPrecision(4) + ' z1 ' + pos1.z.toPrecision(4) + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
18515+
// command = 'add sphere | x1 ' + pos1.x.toPrecision(4) + ' y1 ' + pos1.y.toPrecision(4) + ' z1 ' + pos1.z.toPrecision(4) + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
18516+
command = 'add sphere | ' + nameArray + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
1851618517
}
1851718518
else {
1851818519
ic.boxCls.createBox_base(pos1, radius, color, undefined, undefined, undefined, opacity);
18519-
command = 'add cube | x1 ' + pos1.x.toPrecision(4) + ' y1 ' + pos1.y.toPrecision(4) + ' z1 ' + pos1.z.toPrecision(4) + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
18520+
// command = 'add cube | x1 ' + pos1.x.toPrecision(4) + ' y1 ' + pos1.y.toPrecision(4) + ' z1 ' + pos1.z.toPrecision(4) + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
18521+
command = 'add cube | ' + nameArray + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
1852018522
}
1852118523

1852218524
thisClass.setLogCmd(command, true);
@@ -66090,11 +66092,13 @@ var icn3d = (function (exports) {
6609066092
ic.drawCls.draw();
6609166093
}
6609266094
else if(command.indexOf('add sphere') == 0) {
66093-
this.addShape(command, 'sphere');
66095+
this.addShape(commandOri, 'sphere');
66096+
ic.shapeCmdHash[commandOri] = 1;
6609466097
//ic.drawCls.draw();
6609566098
}
6609666099
else if(command.indexOf('add cube') == 0) {
66097-
this.addShape(command, 'cube');
66100+
this.addShape(commandOri, 'cube');
66101+
ic.shapeCmdHash[commandOri] = 1;
6609866102
//ic.drawCls.draw();
6609966103
}
6610066104
else if(command.indexOf('clear shape') == 0) {
@@ -66837,7 +66841,7 @@ var icn3d = (function (exports) {
6683766841
}
6683866842

6683966843
addShape(command, shape) { let ic = this.icn3d, me = ic.icn3dui;
66840-
ic.shapeCmdHash[command] = 1;
66844+
// ic.shapeCmdHash[command] = 1;
6684166845

6684266846
let paraArray = command.split(' | ');
6684366847
let p1Array = paraArray[1].split(' ');
@@ -66848,7 +66852,17 @@ var icn3d = (function (exports) {
6684866852
colorStr = '#' + colorStr.replace(/\#/g, '');
6684966853
let color = me.parasCls.thr(colorStr);
6685066854

66851-
let pos1 = new THREE.Vector3(parseFloat(p1Array[1]), parseFloat(p1Array[3]), parseFloat(p1Array[5]));
66855+
let pos1;
66856+
66857+
if(p1Array[0] == 'x1') { // input position
66858+
pos1 = new THREE.Vector3(parseFloat(p1Array[1]), parseFloat(p1Array[3]), parseFloat(p1Array[5]));
66859+
}
66860+
else { // input sets
66861+
let nameArray = paraArray[1].split(',');
66862+
let atomSet1 = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
66863+
let posArray1 = ic.contactCls.getExtent(atomSet1);
66864+
pos1 = new THREE.Vector3(posArray1[2][0], posArray1[2][1], posArray1[2][2]);
66865+
}
6685266866

6685366867
if(shape == 'sphere') {
6685466868
ic.sphereCls.createSphereBase(pos1, color, parseFloat(radius), undefined, undefined, undefined, parseFloat(opacity));
@@ -72546,15 +72560,21 @@ var icn3d = (function (exports) {
7254672560

7254772561
let resi = refAA[i][j].trim();
7254872562
let refnum = refAA[refI][j].trim();
72563+
72564+
if(!ic.chainsMapping.hasOwnProperty(chainid)) {
72565+
ic.chainsMapping[chainid] = {};
72566+
}
72567+
72568+
let resid = chainid + '_' + resi;
72569+
7254972570
if(resi && refnum) {
72550-
let resid = chainid + '_' + resi;
7255172571
ic.resid2refnum[resid] = refnum;
7255272572

72553-
if(!ic.chainsMapping.hasOwnProperty(chainid)) {
72554-
ic.chainsMapping[chainid] = {};
72555-
}
7255672573
ic.chainsMapping[chainid][resid] = refnum;
7255772574
}
72575+
else {
72576+
ic.chainsMapping[chainid][resid] = resi;
72577+
}
7255872578
}
7255972579
}
7256072580

@@ -73258,7 +73278,7 @@ var icn3d = (function (exports) {
7325873278

7325973279
// remove the postfix when comparing interactions
7326073280
//ic.chainsMapping[chnid][residueid] = refnumLabel;
73261-
ic.chainsMapping[chnid][residueid] = refnumLabelNoPostfix;
73281+
ic.chainsMapping[chnid][residueid] = (refnumLabelNoPostfix) ? refnumLabelNoPostfix : currResi;
7326273282
}
7326373283
}
7326473284

@@ -81411,7 +81431,7 @@ var icn3d = (function (exports) {
8141181431
//even when multiple iCn3D viewers are shown together.
8141281432
this.pre = this.cfg.divid + "_";
8141381433

81414-
this.REVISION = '3.31.3';
81434+
this.REVISION = '3.31.4';
8141581435

8141681436
// In nodejs, iCn3D defines "window = {navigator: {}}"
8141781437
this.bNode = (Object.keys(window).length < 2) ? true : false;

build/icn3d.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/icn3d.module.js

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17854,7 +17854,7 @@ class Events {
1785417854
//ic.initUI();
1785517855
ic.init();
1785617856
ic.bInputfile = true;
17857-
ic.InputfileData = (ic.InputfileData) ? ic.InputfileData + '\nENDMDL\n' + data : data;
17857+
ic.InputfileData = (ic.InputfileData) ? ic.InputfileData + '\nENDMDL\n' + data : dataStr;
1785817858
ic.InputfileType = 'mmcif';
1785917859
// await ic.mmcifParserCls.loadMmcifData(data);
1786017860
await ic.opmParserCls.loadOpmData(dataStr, undefined, undefined, 'mmcif', undefined, bText);
@@ -18509,11 +18509,13 @@ class Events {
1850918509
let command;
1851018510
if(shape == 'Sphere') {
1851118511
ic.sphereCls.createSphereBase(pos1, color, radius, undefined, undefined, undefined, opacity);
18512-
command = 'add sphere | x1 ' + pos1.x.toPrecision(4) + ' y1 ' + pos1.y.toPrecision(4) + ' z1 ' + pos1.z.toPrecision(4) + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
18512+
// command = 'add sphere | x1 ' + pos1.x.toPrecision(4) + ' y1 ' + pos1.y.toPrecision(4) + ' z1 ' + pos1.z.toPrecision(4) + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
18513+
command = 'add sphere | ' + nameArray + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
1851318514
}
1851418515
else {
1851518516
ic.boxCls.createBox_base(pos1, radius, color, undefined, undefined, undefined, opacity);
18516-
command = 'add cube | x1 ' + pos1.x.toPrecision(4) + ' y1 ' + pos1.y.toPrecision(4) + ' z1 ' + pos1.z.toPrecision(4) + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
18517+
// command = 'add cube | x1 ' + pos1.x.toPrecision(4) + ' y1 ' + pos1.y.toPrecision(4) + ' z1 ' + pos1.z.toPrecision(4) + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
18518+
command = 'add cube | ' + nameArray + ' | color ' + colorStr + ' | opacity ' + opacity + ' | radius ' + radius;
1851718519
}
1851818520

1851918521
thisClass.setLogCmd(command, true);
@@ -66087,11 +66089,13 @@ class ApplyCommand {
6608766089
ic.drawCls.draw();
6608866090
}
6608966091
else if(command.indexOf('add sphere') == 0) {
66090-
this.addShape(command, 'sphere');
66092+
this.addShape(commandOri, 'sphere');
66093+
ic.shapeCmdHash[commandOri] = 1;
6609166094
//ic.drawCls.draw();
6609266095
}
6609366096
else if(command.indexOf('add cube') == 0) {
66094-
this.addShape(command, 'cube');
66097+
this.addShape(commandOri, 'cube');
66098+
ic.shapeCmdHash[commandOri] = 1;
6609566099
//ic.drawCls.draw();
6609666100
}
6609766101
else if(command.indexOf('clear shape') == 0) {
@@ -66834,7 +66838,7 @@ class ApplyCommand {
6683466838
}
6683566839

6683666840
addShape(command, shape) { let ic = this.icn3d, me = ic.icn3dui;
66837-
ic.shapeCmdHash[command] = 1;
66841+
// ic.shapeCmdHash[command] = 1;
6683866842

6683966843
let paraArray = command.split(' | ');
6684066844
let p1Array = paraArray[1].split(' ');
@@ -66845,7 +66849,17 @@ class ApplyCommand {
6684566849
colorStr = '#' + colorStr.replace(/\#/g, '');
6684666850
let color = me.parasCls.thr(colorStr);
6684766851

66848-
let pos1 = new THREE.Vector3(parseFloat(p1Array[1]), parseFloat(p1Array[3]), parseFloat(p1Array[5]));
66852+
let pos1;
66853+
66854+
if(p1Array[0] == 'x1') { // input position
66855+
pos1 = new THREE.Vector3(parseFloat(p1Array[1]), parseFloat(p1Array[3]), parseFloat(p1Array[5]));
66856+
}
66857+
else { // input sets
66858+
let nameArray = paraArray[1].split(',');
66859+
let atomSet1 = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
66860+
let posArray1 = ic.contactCls.getExtent(atomSet1);
66861+
pos1 = new THREE.Vector3(posArray1[2][0], posArray1[2][1], posArray1[2][2]);
66862+
}
6684966863

6685066864
if(shape == 'sphere') {
6685166865
ic.sphereCls.createSphereBase(pos1, color, parseFloat(radius), undefined, undefined, undefined, parseFloat(opacity));
@@ -72543,15 +72557,21 @@ class Dssp {
7254372557

7254472558
let resi = refAA[i][j].trim();
7254572559
let refnum = refAA[refI][j].trim();
72560+
72561+
if(!ic.chainsMapping.hasOwnProperty(chainid)) {
72562+
ic.chainsMapping[chainid] = {};
72563+
}
72564+
72565+
let resid = chainid + '_' + resi;
72566+
7254672567
if(resi && refnum) {
72547-
let resid = chainid + '_' + resi;
7254872568
ic.resid2refnum[resid] = refnum;
7254972569

72550-
if(!ic.chainsMapping.hasOwnProperty(chainid)) {
72551-
ic.chainsMapping[chainid] = {};
72552-
}
7255372570
ic.chainsMapping[chainid][resid] = refnum;
7255472571
}
72572+
else {
72573+
ic.chainsMapping[chainid][resid] = resi;
72574+
}
7255572575
}
7255672576
}
7255772577

@@ -73255,7 +73275,7 @@ class Dssp {
7325573275

7325673276
// remove the postfix when comparing interactions
7325773277
//ic.chainsMapping[chnid][residueid] = refnumLabel;
73258-
ic.chainsMapping[chnid][residueid] = refnumLabelNoPostfix;
73278+
ic.chainsMapping[chnid][residueid] = (refnumLabelNoPostfix) ? refnumLabelNoPostfix : currResi;
7325973279
}
7326073280
}
7326173281

@@ -81408,7 +81428,7 @@ class iCn3DUI {
8140881428
//even when multiple iCn3D viewers are shown together.
8140981429
this.pre = this.cfg.divid + "_";
8141081430

81411-
this.REVISION = '3.31.3';
81431+
this.REVISION = '3.31.4';
8141281432

8141381433
// In nodejs, iCn3D defines "window = {navigator: {}}"
8141481434
this.bNode = (Object.keys(window).length < 2) ? true : false;

dist/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## Change Log
2+
[icn3d-3.31.4](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.31.4.zip) was release on May 11, 2024. Release Ig templates for assigning reference numbers.
3+
24
[icn3d-3.31.3](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.31.3.zip) was release on April 15, 2024. Jack Lin fixed some issues in loading a collection file.
35

46
[icn3d-3.31.2](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.31.2.zip) was release on April 9, 2024. Fixed the secondary structure ranges in CIF files.
@@ -147,7 +149,7 @@
147149

148150
[icn3d-3.11.5](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.11.5.zip) was release on May 3, 2022. Added VAST+ and VAST Search interface in the menu "File > Search Similar". Enabled to assign rainbow/spectrum colors for a list of sets in the menu "Color > Rainbow/Spectrum > for Sets".
149151

150-
[icn3d-3.11.4](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.11.4.zip) was release on April 26, 2022. Added two examples in https://ww.ncbi.nlm.nih.gov/Structure/icn3d/example.html to show the predefined alignment of two PDB files, or the predefined alignment of one PDB file to other chains.
152+
[icn3d-3.11.4](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.11.4.zip) was release on April 26, 2022. Added two examples in https://www.ncbi.nlm.nih.gov/Structure/icn3d/example.html to show the predefined alignment of two PDB files, or the predefined alignment of one PDB file to other chains.
151153

152154
[icn3d-3.11.3](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.11.3.zip) was release on April 22, 2022. Added the menu "Style > Nucl. Bases" to display the bases of nucleotides.
153155

dist/full.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
<div id="div0"></div>
2020

2121
<link rel="stylesheet" href="lib/jquery-ui-1.13.2.min.css">
22-
<link rel="stylesheet" href="icn3d_3.31.3.css">
22+
<link rel="stylesheet" href="icn3d_3.31.4.css">
2323
<script src="lib/jquery-3.5.0.min.js"></script>
2424
<script src="lib/jquery-ui-1.13.2.min.js"></script>
2525
<script src="lib/three_0.151.0.min.js"></script>
26-
<script src="icn3d_3.31.3.min.js"></script>
26+
<script src="icn3d_3.31.4.min.js"></script>
2727

2828
<script type="text/javascript">
2929

@@ -41,7 +41,7 @@
4141
alert("IE does NOT work with the current iCn3D version 3. The old iCn3D version 2 is used instead.");
4242
}
4343
else {
44-
//$.getScript('icn3d_3.31.3.min.js', function() {
44+
//$.getScript('icn3d_3.31.4.min.js', function() {
4545
var version = 3;
4646
await launchIcn3d(version); //await
4747
//});

dist/full2.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
<div id="div1" style="float:left;"></div>
2121

2222
<link rel="stylesheet" href="lib/jquery-ui-1.13.2.min.css">
23-
<link rel="stylesheet" href="icn3d_3.31.3.css">
23+
<link rel="stylesheet" href="icn3d_3.31.4.css">
2424
<script src="lib/jquery-3.5.0.min.js"></script>
2525
<script src="lib/jquery-ui-1.13.2.min.js"></script>
2626
<script src="lib/three_0.151.0.min.js"></script>
27-
<script src="icn3d_3.31.3.min.js"></script>
27+
<script src="icn3d_3.31.4.min.js"></script>
2828

2929
<script type="text/javascript">
3030
$( document ).ready(async function() {
@@ -41,7 +41,7 @@
4141
alert("IE does NOT work with the current iCn3D version 3. The old iCn3D version 2 is used instead.");
4242
}
4343
else {
44-
//$.getScript('icn3d_3.31.3.min.js', function() {
44+
//$.getScript('icn3d_3.31.4.min.js', function() {
4545
var version = 3;
4646
await launchIcn3d(version);
4747
//});
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
<div id="div1" style="float:left;"></div>
2121

2222
<link rel="stylesheet" href="lib/jquery-ui-1.13.2.min.css">
23-
<link rel="stylesheet" href="icn3d_3.31.3.css">
23+
<link rel="stylesheet" href="icn3d_3.31.4.css">
2424
<script src="lib/jquery-3.5.0.min.js"></script>
2525
<script src="lib/jquery-ui-1.13.2.min.js"></script>
2626
<script src="lib/three_0.151.0.min.js"></script>
27-
<script src="icn3d_3.31.3.min.js"></script>
27+
<script src="icn3d_3.31.4.min.js"></script>
2828

2929
<script type="text/javascript">
3030
$( document ).ready(async function() {
@@ -41,7 +41,7 @@
4141
alert("IE does NOT work with the current iCn3D version 3. The old iCn3D version 2 is used instead.");
4242
}
4343
else {
44-
//$.getScript('icn3d_3.31.3.min.js', function() {
44+
//$.getScript('icn3d_3.31.4.min.js', function() {
4545
var version = 3;
4646
await launchIcn3d(version);
4747
//});
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
<div id="div0"></div>
2020

2121
<link rel="stylesheet" href="lib/jquery-ui-1.13.2.min.css">
22-
<link rel="stylesheet" href="icn3d_3.31.3.css">
22+
<link rel="stylesheet" href="icn3d_3.31.4.css">
2323
<script src="lib/jquery-3.5.0.min.js"></script>
2424
<script src="lib/jquery-ui-1.13.2.min.js"></script>
2525
<script src="lib/three_0.151.0.min.js"></script>
26-
<script src="icn3d_3.31.3.min.js"></script>
26+
<script src="icn3d_3.31.4.min.js"></script>
2727

2828
<script type="text/javascript">
2929

@@ -41,7 +41,7 @@
4141
alert("IE does NOT work with the current iCn3D version 3. The old iCn3D version 2 is used instead.");
4242
}
4343
else {
44-
//$.getScript('icn3d_3.31.3.min.js', function() {
44+
//$.getScript('icn3d_3.31.4.min.js', function() {
4545
var version = 3;
4646
await launchIcn3d(version); //await
4747
//});

0 commit comments

Comments
 (0)