-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·1171 lines (1052 loc) · 43.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html class="ng-scope" ng-app="pclDemo">
<head>
<meta charset="utf-8" />
<title>Mesoscope@TSRI</title>
<style>
#molstar {
position: relative;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 1px solid #ccc;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
}
#gui-container {
position: absolute;
top: 0px;
right: 0px;
z-index: 10;
}
.meso_collapsible {
background-color: #777;
color: white;
cursor: pointer;
/*padding: 18px;*/
width: 100%;
border: none;
text-align: left;
outline: none;
/*font-size: 15px;*/
}
.meso_active, .meso_collapsible:hover {
background-color: #555;
}
.meso_collapsible:after {
content: '\002B';
color: white;
font-weight: bold;
float: right;
margin-left: 5px;
}
.meso_active:after {
content: "\2212";
}
.meso_content {
padding: 0 18px;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
background-color: #f1f1f1;
}
</style>
<link type="text/css" rel="stylesheet" href="style_dev.css">
<link rel="stylesheet" href="menu_style.css">
<link rel="stylesheet" href="extras/molstar/molstar.css">
<link rel="stylesheet" href="extras/SlickGrid/plugins/slick.rowdetailview.css" type="text/css" />
<link rel="stylesheet" href="extras/SlickGrid/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="extras/SlickGrid/controls/slick.pager.css" type="text/css" />
<link rel="stylesheet" href="extras/SlickGrid/css/smoothness/jquery-ui-1.11.3.custom.css" type="text/css" />
<link rel="stylesheet" href="extras/SlickGrid/examples/examples.css" type="text/css" />
<link rel="stylesheet" href="extras/SlickGrid/controls/slick.columnpicker.css" type="text/css" />
<!--/*PFV*/-->
<!-- jquery svg -->
<link rel="stylesheet" type="text/css" href="extras/pfv/js/vendor/svg/jquery.svg.css" />
<link rel="stylesheet" href="extras/pfv/js/vendor/bootstrap-3.3.5/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="extras/pfv/css/bootstrap-slider.css">
<!--link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"-->
<!-- font awesome icons -->
<link rel="stylesheet" href="extras/pfv/css/font-awesome.min.css">
<!-- NGL -->
<!-- <script src="js/vendor/ngl.embedded.min.js"></script> -->
<!-- and finally our own code ... !-->
<link href="extras/pfv/css/pfv.css" rel="stylesheet">
<!--script data-main='demo' src='extras/pfv/js/vendor/require.js'></script-->
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style type="text/css">
.gridster li header {
background: #999;
display: block;
font-size: 20px;
line-height: normal;
padding: 4px 0 6px;
margin-bottom: 20px;
cursor: move;
}
.detail {
padding: 5px
}
.preload {
font-size: 18px;
}
.dynamic-cell-detail> :first-child {
vertical-align: middle;
line-height: 13px;
padding: 10px;
margin-left: 20px;
}
</style>
<style>
#wrapper {
height: 100%;
position: relative;
width: 100%;
overflow: hidden;
}
#menuContainer {
width: 20%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: #222;
}
#menuContainer li {
border-bottom: 1px solid #000;
border-top: 1px solid #333;
cursor: pointer;
padding: 10px 5px;
color: #BBB;
background: #1a1a1a;
font: 12px Arial, sans-serif;
}
#menuContainer li:hover {
background: #111;
color: #CCC;
}
#layoutContainer {
width: 100%;
height: 95%;
padding: 5px 5px; //box-shadow: -3px 0px 9px 0px rgba( 0, 0, 0, 0.4 );
}
</style>
<link type="text/css" rel="stylesheet" href="extras/goldenlayout-base.css" />
<link type="text/css" rel="stylesheet" href="extras/goldenlayout-light-theme.css" />
<!--link type="text/css" rel="stylesheet" href="//golden-layout.com/assets/css/goldenlayout-dark-theme.css" /-->
<script type="text/javascript" src="extras/FileSaver.min.js"></script>
<!-- GPU STUFF -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r113/three.min.js"></script>
<!--script src="https://cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script-->
<!--script src="extras/gpuphysics/lib/three.min.js"></script-->
<script type="text/javascript" src="extras/gpuphysics/lib/stats.min.js"></script>
<script src="extras/gpuphysics/lib/dat.gui.min.js"></script>
<script src="extras/gpuphysics/lib/three.orbitcontrols.js"></script>
<script src="extras/gpuphysics/lib/three.transformcontrols.js"></script>
<script src="extras/shaderToon.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/postprocessing/EffectComposer.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/postprocessing/RenderPass.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/postprocessing/ShaderPass.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/postprocessing/SAOPass.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/shaders/CopyShader.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/shaders/SAOShader.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/shaders/DepthLimitedBlurShader.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/shaders/UnpackDepthRGBAShader.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/effects/OutlineEffect.js"></script>
<!--PDB component library-->
<!-- Complied & minified library css -->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<link rel="stylesheet" href="extras/pdb.component.library.min-1.0.0.css" />
<!-- Dependencey scripts (these can be skipped if already included in page) -->
<script src="https://www.ebi.ac.uk/pdbe/pdb-component-library/libs/d3.min.js"></script>
<script src="extras/angular.1.4.7.min.js"></script>
<!-- Complied & minified library JS -->
<script src="extras/pdb.component.library.min-1.0.0.js"></script>
<script type="text/javascript" src="extras/goldenlayout.min.js"></script>
<!--script type="text/javascript" src="js/layout_mg.js"></script-->
<script src="extras/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-zoom.v1.min.js"></script>
<!--script src="https://d3js.org/d3-contour.v1.min.js"></script>
<script src="https://d3js.org/d3-geo.v1.min.js"></script-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-tip/0.7.1/d3-tip.min.js"></script>
<!--d3 to html easy -->
<!--script src="http://cdn.rawgit.com/jamesleesaunders/d3-ez/master/build/d3-ez.js"></script-->
<link rel="stylesheet" type="text/css" href="extras/d3-ez.css" />
<!-- GZIP and 7Z support -->
<script src="https://cdn.rawgit.com/imaya/zlib.js/develop/bin/zlib_and_gzip.dev.min.js"></script>
<script type="text/javascript" src="extras/zip/jszip.min.js"></script>
<!-- NGL -->
<script src="https://cdn.rawgit.com/arose/ngl/v2.0.0-dev.23/dist/ngl.js"></script>
<!--three.js marching Cube-->
<script src="extras/MarchingCubes.js"></script>
<script src="extras/SlickGrid/lib/firebugx.js"></script>
<!--script src="extras/SlickGrid/lib/jquery-1.11.2.min.js"></script-->
<script src="extras/SlickGrid/lib/jquery-ui-1.11.3.js"></script>
<script src="extras/SlickGrid/lib/jquery.event.drag-2.3.0.js"></script>
<script src="extras/SlickGrid/lib/jquery.tmpl.min.js"></script>
<!--script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script-->
<!--script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script-->
<script src="https://cdn.rawgit.com/scottjehl/jQuery-Tree-Control/master/js/jQuery.tree.js" type="text/javascript"></script>
<!--XLSX-->
<script type="text/javascript" src="extras/sheetjs-0.15.5/xlsx.core.min.js"></script>
<script type="text/javascript" src="extras/sheetjs-0.15.5/xlsx.full.min.js"></script>
<!--script src="https://unpkg.com/canvas-datagrid/dist/canvas-datagrid.js"></script-->
<!--GRid ??-->
<!--script src="https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.3/jquery.jqgrid.min.js"></script-->
<!--slickGrid-->
<script src="extras/SlickGrid/slick.core.js"></script>
<script src="extras/SlickGrid/plugins/slick.cellrangedecorator.js"></script>
<script src="extras/SlickGrid/plugins/slick.cellrangeselector.js"></script>
<script src="extras/SlickGrid/plugins/slick.cellselectionmodel.js"></script>
<script src="extras/SlickGrid/plugins/slick.rowselectionmodel.js"></script>
<script src="extras/SlickGrid/slick.formatters.js"></script>
<script src="extras/SlickGrid/slick.editors.js"></script>
<script src="extras/SlickGrid/slick.grid.js"></script>
<script src="extras/SlickGrid/slick.groupitemmetadataprovider.js"></script>
<script src="extras/SlickGrid/slick.dataview.js"></script>
<script src="extras/SlickGrid/controls/slick.pager.js"></script>
<script src="extras/SlickGrid/controls/slick.columnpicker.js"></script>
<script src="extras/SlickGrid/examples/slick.compositeeditor.js"></script>
<script src="extras/SlickGrid/plugins/slick.checkboxselectcolumn.js"></script>
<script src="extras/SlickGrid/plugins/slick.rowdetailview.js"></script>
<script src="extras/SlickGrid/plugins/slick.autotooltips.js"></script>
<script src="https://ebi-uniprot.github.io/CDN/protvista/protvista.js"></script>
<link href="https://ebi-uniprot.github.io/CDN/protvista/css/main.css" rel="stylesheet"/>
<!--COLLADA-->
<script src="extras/collada/gl-matrix-min.js"></script>
<script src="extras/collada/tinyxml.js"></script>
<script src="extras/collada/collada.js"></script>
<!--script type='application/javascript' src='extras/canvas-resizer-1.0.js'></script-->
<script src="extras/localforage.min.js"></script>
<!--MOLSTAR-->
<script src="extras/molstar/index.js"></script>
<script src="js/molstar_wrapper.js"></script>
<style>
.dropdown {
a {
text-decoration: none;
}
float: left;
[data-toggle="dropdown"] {
position: relative;
display: block;
color: white;
background: $blue;
@include double-shadow($blue);
@include hover-style($blue);
@include text-shadow(0 -1px 0 rgba(0, 0, 0, 0.3));
padding: 10px;
}
.icon-arrow {
position: absolute;
display: block;
font-size: 0.7em;
color: #fff;
top: 14px;
right: 10px;
&.open {
@include transform(rotate(-180deg));
@include transition(transform .6s);
}
&.close {
@include transform(rotate(0deg));
@include transition(transform .6s);
}
&:before {
content: '\25BC';
}
}
.dropdown-menu {
max-height: 0;
overflow: hidden;
@include ul-nostyle;
li {
padding: 0;
a {
display: block;
color: darken($gray, 50%);
background: $gray;
@include double-shadow($gray);
@include hover-style($gray);
@include text-shadow(0 -1px 0 rgba(255, 255, 255, 0.3));
padding: 10px 10px;
}
}
}
.show,
.hide {
@include transform-origin(50%, 0%);
}
.show {
display: block;
max-height: 9999px;
@include transform(scaleY(1));
@include animation(showAnimation .5s ease-in-out);
@include transition(max-height 1s ease-in-out);
}
.hide {
display: none;
max-height: 0;
@include transform(scaleY(0));
@include animation(hideAnimation .4s ease-out);
@include transition(max-height .6s ease-out);
}
}
@include keyframes(showAnimation) {
0% {
@include transform(scaleY(0.1));
}
40% {
@include transform(scaleY(1.04));
}
60% {
@include transform(scaleY(0.98));
}
80% {
@include transform(scaleY(1.04));
}
100% {
@include transform(scaleY(0.98));
}
80% {
@include transform(scaleY(1.02));
}
100% {
@include transform(scaleY(1));
}
}
@include keyframes(hideAnimation) {
0% {
@include transform(scaleY(1));
}
60% {
@include transform(scaleY(0.98));
}
80% {
@include transform(scaleY(1.02));
}
100% {
@include transform(scaleY(0));
}
}
.chooseColor {
width: 10px;
height: 10px;
background: #fff;
float: left;
margin: 5px 5px 0 0;
cursor: pointer;
}
.chooseColor .selectedColor {
width: 10px;
height: 10px;
}
.chooseColor ul {
display: none;
box-shadow: 2px 2px 3px rgba( 0, 0, 0, 0.7);
}
.chooseColor:hover ul {
display: block;
}
.chooseColor ul,
.chooseColor ul li {
margin: 0;
padding: 0;
list-style-type: none;
}
.chooseColor ul li {
width: 10px;
height: 10px;
cursor: pointer;
}
.chooseColor ul li:hover {
border: 1px solid orange;
select {
width: 10px;
height: 10px;
background: #fff;
float: center;
cursor: pointer;
}
</style>
<script>
// Code goes here
var app = angular.module('pclDemo',['pdb.component.library']);
app.config(function($locationProvider) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
});
app.directive('pdbeComp',function($compile){
return {
restrict: 'C',
link: function(scope, element, attrs){
var compMainDiv = document.getElementById(attrs.displayIn);
var template = element.text();
var compContent = $compile(template)(scope);
angular.element(compMainDiv).prepend(compContent);
element.bind('blur', function() {
console.log("blur");
template = element.text();
compContent = $compile(template)(scope);
angular.element(compMainDiv).html('');
angular.element(compMainDiv).prepend(compContent);
scope.flag = 1;
});
element.bind('DOMSubtreeModified', function() {
console.log("DOMSubtreeModified");
template = element.text();
compContent = $compile(template)(scope);
angular.element(compMainDiv).html('');
angular.element(compMainDiv).prepend(compContent);
scope.flag = 1;
});
}
}
});
</script>
</head>
<body>
<ul id="grid_contextMenu" style="display:none;position:absolute">
<b>Search PDB using:</b>
<li data="name">name</li>
<li data="label">label</li>
<li data="uniprot">uniprot</li>
<li data="alphafold">alphafold</li>
</ul>
<div hidden>
<div id="pdbeComp_topov" class="pdbeComp" display-in="topov"><pdb-topology-viewer entry-id="1aqd" entity-id="1" height="370"></pdb-topology-viewer></div>
</div>
<div hidden>
<pre style="clear:both"><code id="pdbeComp_seqv" class="pdbeComp" display-in="seqv" contenteditable="true"><pdb-seq-viewer entry-id="1aqd" entity-id="1" height="370"></pdb-seq-viewer></code></pre>
</div>
<div hidden>
<pre style="clear:both"><code id="pdbeComp_puv" class="pdbeComp" display-in="puv" contenteditable="true"><pdb-uniprot-viewer entry-id="P07550" entity-id="1" height="370"></pdb-uniprot-viewer></code></pre>
</div>
<!--div class="TopBar"> </div-->
<!--div class="SearchBar"></div-->
<!--div class="Logo"></div-->
<!--div class"aheader">
<div class="logo_head"">
<img id="logo_image" src="images/[email protected]" height="90%">
<img id="logo_image" src="images/customLogo2.png" height="90%"alt="logo" />
<h1 id="logo_image" > Mesoscope @ TSRI  </h1>
</div-->
<div id='cssmenu'>
<ul>
<li class='has-sub'><a href='#'><span>Load</span></a>
<ul>
<li class='has-sub'><a href="#">New Recipe</span></a>
<ul>
<li>
<li><a href='#' onclick="CreateNew();"><span>Empty Recipe</span></a></li>
<li><a href="#" for="jsfile_input" onclick="$('#jsfile_input').trigger('click');">From File (.json, _serialized.json,.xlsx,.csv,.zip)</a></li>
<li class='has-sub'><a href="#">From Examples</a>
<ul>
<li><a href="#" onclick="LoadExampleHIV()">HIV mature</a></li>
<li><a href="#" onclick="LoadExampleHIVimmature()">HIV immature</a></li>
<li><a href="#" onclick="LoadExampleBloodHIV()">HIV mature and Blood plasma</a></li>
<li><a href="#" onclick="LoadExampleHIVimmatureBlood()">HIV immature and Blood plasma</a></li>
<li><a href="#" onclick="LoadExampleInfluenza_envelope()">Influenza envelope</a></li>
<li><a href="#" onclick="LoadExampleInfluenza_complete()">Influenza complete</a></li>
<li><a href="#" onclick="LoadExampleExosome()">Exosome</a></li>
<li><a href="#" onclick="LoadExampleMycoplasmaGenitaliumAuto()">Mycoplasma Genitalium auto</a></li>
<li><a href="#" onclick="LoadExampleMycoplasmaGenitaliumCurated()">Mycoplasma Genitalium curated</a></li>
<!--li><a href="#" onclick="LoadExampleBlood()">Blood Plasma</a></li>
<li><a href="#" onclick="LoadExampleMpn()">Mycoplasma Pneumonia</a></li-->
</ul>
</li>
<li class='has-sub'><a href="#">From YASARA Petworld</a>
<ul>
<li><a href="#" onclick="LoadExampleYasaraSARSCOV2()">Sars-cov-2 mature</a></li>
<li><a href="#" onclick="LoadExampleYasaraHIV()">HIV</a></li>
<li><a href="#" onclick="LoadExampleYasaraSynapse()">Synapse vesicle</a></li>
<li><a href="#" onclick="LoadExampleYasaraPreSynapse()">PreSynapse</a></li>
</ul>
</li>
</ul>
</li>
<li class='has-sub'><a href="#">Append From</span></a>
<ul>
<li class='has-sub'><a href="#">Examples</a>
<ul>
<li><a href="#" onclick="MergeExampleBloodHIV()">HIV and Blood Plasma</a></li>
<li><a href="#" onclick="MergeExampleBlood()">Blood Plasma</a></li>
<!--li><a href="#" onclick="LoadExampleHIV()">HIV</a-->
<li><a href="#" onclick="MergeExampleMpn()">Mycoplasma Pneumonia</a></li>
<li><a href="#" onclick="LoadExampleExosome()">Exosome</a></li>
</ul>
</li>
<li><a href="#" for="jsfile_input_merge" onclick="$('#jsfile_input_merge').trigger('click');">File (.json, _serialized.json,.xlsx,.csv,.zip)</a></li>
</ul>
</li>
<li class='has-sub'><a href="#">Colors</span></a>
<ul>
<li><a href="#" for="colorpalette_input" onclick="$('#colorpalette_input').trigger('click');">Load Color palette (Ingredient-Colors)</a></li>
<li><a href="#" for="colormap_input" onclick="$('#colormap_input').trigger('click');">Load Color Mapping (Properties-Colors)</a></li>
</ul>
</li>
<li class='last'><a href="#" for="molarity_input" onclick="$('#molarity_input').trigger('click');">Load Molarity/Count</a></li>
<li class='last'><a href="#" for="file_input" onclick="$('#file_input').trigger('click');">Setup Data Directory (PDB,geoms)</a></li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Save</span></a>
<ul>
<li><a href="#" onclick="SaveRecipeCellPACK()">cellPACK/cellPAINT recipe</a></li>
<li><a href="#" onclick="SaveRecipeCellPACK_serialized()">cellPACK-gpu recipe</a></li>
<li><a href="#" onclick="SaveAllSprites()">cellPAINT recipe and sprites (.zip)</a></li>
<li><a href="#" onclick="saveCurrentCSV()">Spreadsheet CSV</a></li>
<li><a href="#" onclick="cp_SerializedColorSchem()">Color palette</a></li>
<li><a href="#" onclick="cp_SerializedColorMap()">Color mapping</a></li>
<li><a href="#" onclick="cp_SerializedMolarity()">Molarity/Count</a></li>
<!--li><a href="#" >Spreadsheet XL</a></li-->
</ul>
</li>
<li class='last has-sub'><a href='#'><span>Layout Options</span></a>
<ul>
<li id ="sequence"><a href="#" onclick="layout_toggleSequenceFeatures()">Show Sequence Feature</a></li>
<li id ="object"><a href="#" onclick="layout_toggleObjectProperties()">Show Objects Properties</a></li>
<li id ="interaction"><a href="#" onclick="layout_toggleInteractionTable()">Show Interaction Table</a></li>
<li id ="search"><a href="#" onclick="layout_toggleSearchTable()">Show Search Table</a></li>
<!--li><a href="#" onclick="on('Settings')">Settings</a></li>
<li><a href="#" onclick="on('Help')">Help</a></li>
<li><a href="#" onclick="on('About')">About Us</a></li>
<li><a href="#" onclick="on('FAQ')">FAQ</a></li>
<li><a href="#" onclick="on('Contact')">Contact</a></li-->
</ul>
</li>
</ul>
<font color="white"><h5>Mesoscope @ TSRI  </h5></font>
<div width="5%" height="5%"><img id="logo_image" src="images/[email protected]" height="90%"></div>
<div width="2%" id="version_layout"></div>
</div>
<!--all input files-->
<input class="hidden" type="file" id="jsfile_input" accept=".csv,.json,.xlsx,.zip" type="file" onclick="forceSelect(this)" onchange="selectFile(event)" />
<input class="hidden" type="file" id="jsfile_input_merge" accept=".csv,.json,.xlsx,.zip" type="file" onclick="forceSelect(this)" onchange="selectMergeFile(event)" />
<input class="hidden" type="file" id="file_input" onchange="Util_selectFolder(event)" webkitdirectory mozdirectory msdirectory odirectory directory multiple />
<input class="hidden" type="file" id="img_file_input" onclick="forceSelect(this)" onchange="grid_selectImgFile(event)"/>
<input class="hidden" type="file" id="colorpalette_input" onclick="forceSelect(this)" onchange="cp_DeserializedColorSchem_cb(event)"/>
<input class="hidden" type="file" id="colormap_input" onclick="forceSelect(this)" onchange="cp_DeserializedColorMap_cb(event)"/>
<input class="hidden" type="file" id="molarity_input" onclick="forceSelect(this)" onchange="cp_DeserializedMolarity_cb(event)"/>
<input class="hidden" type="file" id="modelfile_input" accept=".bin" type="file" onclick="forceSelect(this)" onchange="load_binary_model1(event)" />
<input class="hidden" type="file" id="modelfile_input2" accept=".bin" type="file" onclick="forceSelect(this)" onchange="load_binary_model(event)" />
<div id="overlay" onclick="off()">
<div id="overlay_text">Overlay Text</div>
</div>
<div id="layoutContainer"></div>
<div class='slickform modal' id="slickdetail">
<div class="modal-content">
<div class="modal-header">
<span class="close" id="closeslickdetail">×</span>
<h2>Column Mapping</h2>
</div>
<div class="modal-body" id="slickitems">
<div class="modal-form" id="modalform"></div>
<canvas class="modal-canvas" id="modalcanvas" width="400" height="400"></canvas>
<div id="listholder" class="modal-list"></div>
</div>
<hr/>
<div class="modal-footer">
<div style="display: flex;">
<button id="saveDetail" style="color:black;">Save</button>
<button id="cancelDetail" style="color:black;">Cancel</button>
</div>
</div>
</div>
</div>
<div class='slickform modal' id="mergemodal">
<div class="modal-content">
<div class="modal-header">
<span class="close" id="closemergemodal">×</span>
<h2>Column Merging</h2>
</div>
<div class="modal-body" id="mergemodalitems">
<div class="modal-form" id="mergemodalform"></div>
<div id="mergemodallistholder" class="modal-list"></div>
</div>
<hr/>
<div class="modal-footer">
<div>
<button id="mergemodal_save" style="color:black;">Merge</button>
<button id="mergemodal_cancel" style="color:black;">Cancel</button>
</div>
</div>
</div>
</div>
<div id="dialog" class="modal" title="Leave Page"></div>
<div id="svgexport"></div>
<ul class='custom-menu-node'>
<li "><input type="color" id="node_color" onchange="ChangeColorNodeOver()" name="color" value="#e66465" /></li>
<li onclick="RenameNodeOver()">rename</li>
<li onclick="DeleteNodeOver()">delete</li>
<li onclick="ResizeNodeOver()">resize</li>
</ul>
<div hidden>
<div id="topov" class="topov" height="100%" width="100%"></div>
<div id="seqv" class="seqv" height="100%" width="100%"></div>
<div id="puv" class="puv" height="100%" width="100%"></div>
</div>
<script id="itemDetailsTemplate" type="text/x-jquery-tmpl">
<div class='item-details-form'>
{{each columns}}
<div class='item-details-label'>
${name}
</div>
<div class='item-details-editor-container' data-editorid='${id}'></div>
{{/each}}
<hr/>
<div class='item-details-form-buttons'>
<button data-action='save'>Save</button>
<button data-action='cancel'>Cancel</button>
</div>
</div>
</script>
<script type="x-shader/x-vertex" id="tri_vertexShader">
varying vec3 vNormal;
varying vec4 vPosition;
varying vec4 vOPosition;
varying vec3 vONormal;
varying vec3 vU;
varying vec3 vEye;
void main() {
vOPosition = modelViewMatrix * vec4( position, 1.0 );
gl_Position = projectionMatrix * vOPosition;
vU = normalize( vec3( modelViewMatrix * vec4( position, 1.0 ) ) );
vPosition = vec4( position, 1.0 );
vNormal = normalMatrix * normal;
vONormal = normal;
}
</script>
<script type="x-shader/x-vertex" id="tri_fragmentShader">
uniform sampler2D textureMap;
uniform sampler2D normalMap;
uniform vec3 color;
uniform float normalScale;
uniform float texScale;
uniform float useSSS;
uniform float useScreen;
uniform float opacity;
varying vec3 vNormal;
varying vec4 vPosition;
varying vec4 vOPosition;
varying vec3 vONormal;
varying vec3 vU;
varying vec3 vEye;
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
float random(vec3 scale,float seed){return fract(sin(dot(gl_FragCoord.xyz+seed,scale))*43758.5453+seed);}
void main() {
vec3 vViewPosition = -vOPosition.xyz;
#include <clipping_planes_fragment>
vec3 n = normalize( vONormal.xyz );
vec3 blend_weights = abs( n );
blend_weights = ( blend_weights - 0.2 ) * 7.;
blend_weights = max( blend_weights, 0. );
blend_weights /= ( blend_weights.x + blend_weights.y + blend_weights.z );
vec2 coord1 = vPosition.yz * texScale;
vec2 coord2 = vPosition.zx * texScale;
vec2 coord3 = vPosition.xy * texScale;
vec3 bump1 = texture2D( normalMap, coord1 ).rgb;
vec3 bump2 = texture2D( normalMap, coord2 ).rgb;
vec3 bump3 = texture2D( normalMap, coord3 ).rgb;
vec3 blended_bump = bump1 * blend_weights.xxx +
bump2 * blend_weights.yyy +
bump3 * blend_weights.zzz;
vec3 tanX = vec3( vNormal.x, -vNormal.z, vNormal.y);
vec3 tanY = vec3( vNormal.z, vNormal.y, -vNormal.x);
vec3 tanZ = vec3(-vNormal.y, vNormal.x, vNormal.z);
vec3 blended_tangent = tanX * blend_weights.xxx +
tanY * blend_weights.yyy +
tanZ * blend_weights.zzz;
vec3 normalTex = blended_bump * 2.0 - 1.0;
normalTex.xy *= normalScale;
normalTex.y *= -1.;
normalTex = normalize( normalTex );
mat3 tsb = mat3( normalize( blended_tangent ), normalize( cross( vNormal, blended_tangent ) ), normalize( vNormal ) );
vec3 finalNormal = tsb * normalTex;
vec3 r = reflect( normalize( vU ), normalize( finalNormal ) );
float m = 2.0 * sqrt( r.x * r.x + r.y * r.y + ( r.z + 1.0 ) * ( r.z + 1.0 ) );
vec2 calculatedNormal = vec2( r.x / m + 0.5, r.y / m + 0.5 );
vec3 base = texture2D( textureMap, calculatedNormal ).rgb;
float rim = 1.75 * max( 0., abs( dot( normalize( vNormal ), normalize( -vOPosition.xyz ) ) ) );
base += useSSS * color * ( 1. - .75 * rim );
base += ( 1. - useSSS ) * 10. * base * color * clamp( 1. - rim, 0., .15 );
if( useScreen == 1. ) {
base = vec3( 1. ) - ( vec3( 1. ) - base ) * ( vec3( 1. ) - base );
}
float nn = .05 * random( vec3( 1. ), length( gl_FragCoord ) );
base += vec3( nn );
gl_FragColor = vec4( base.rgb, opacity );
}
</script>
<script type="x-shader/x-vertex" id="gvs">
uniform mat4 viewMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
attribute float uindex;
varying vec3 vColor;
uniform float size;
void main() {
//index to ijk
float sliceNum = size*size;
float k = index / (sliceNum);
float temp = index % (sliceNum);
float j = temp / size;
float i = temp % size;
vec3 ijk = vec3(round(i),floor(j),floor(k));
float x = ijk[0]/size;//r[0];//-boxSize.x +-boxSize.x +
float y = ijk[1]/size;//;//-boxSize.y +-boxSize.y +-boxSize.y +
float z = ijk[2]/size;//;//-boxSize.z +-boxSize.z +
vec3 p = vec3(x,y,z);
//ijk to xyz
vec4 mvPosition = modelViewMatrix * vec4( p, 1.0 );
gl_PointSize = 2.0;//(1.0 / 64.0) / 2.0 ;
gl_Position = projectionMatrix * mvPosition;
}
</script>
<script type="x-shader/x-fragment" id="gfs">
varying vec3 vColor;
void main() {
gl_FragColor = vec4( 1.0,0.0,0.0, 1.0 );
//gl_FragColor = gl_FragColor * texture2D( texture, gl_PointCoord );
}
</script>
<script id="sharedShaderCode" type="x-shader/x-fragment">
// Convert an index to an UV-coordinate
vec2 indexToUV(float index, vec2 res){
vec2 uv = vec2(mod(index/res.x,1.0), floor( index/res.y ) / res.x);
return uv;
}
// Rotate a vector by a quaternion
vec3 vec3_applyQuat(vec3 v, vec4 q){
float ix = q.w * v.x + q.y * v.z - q.z * v.y;
float iy = q.w * v.y + q.z * v.x - q.x * v.z;
float iz = q.w * v.z + q.x * v.y - q.y * v.x;
float iw = -q.x * v.x - q.y * v.y - q.z * v.z;
return vec3(
ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y,
iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z,
iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x
);
}
</script>
<!--
Render body instances vertex shader
Copy of THREE.ShaderLib.phong + modifications to render instances
//debug the bodyType there !
-->
<script id="renderBodiesVertex" type="x-shader/x-vertex">
uniform sampler2D bodyInfosTex;
uniform sampler2D bodyPosTex;
uniform sampler2D bodyQuatTex;
attribute float bodyIndex;
attribute vec3 bodyColor;
uniform sampler2D gridIdTex;
uniform sampler2D gridValueTex;
uniform vec3 cellSize;
uniform vec3 gridPos;
#define PHONG
varying vec3 vViewPosition;
//varying vec3 vColor;
varying vec3 vNormal;
//varying vec3 vRefract;
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <uv2_vertex>
#include <color_vertex>
vec2 bodyUV = indexToUV(bodyIndex,bodyTextureResolution);
#ifdef USE_COLOR
//vColor = vec3((floor(bodyUV*3.0)+1.0)/3.0,0);
vColor = vec3(bodyColor);
#endif
//vColor = vec3(1,0,0);
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
vec4 posTexData = texture2D(bodyPosTex, bodyUV);
float bodyTypeIndex = posTexData.w;
vec2 bodyType_uv = indexToUV( bodyTypeIndex, bodyInfosTextureResolution );
vec4 bodyType_infos1 = texture2D(bodyInfosTex, bodyType_uv);
//bodyType_uv = indexToUV( bodyTypeIndex*2.0+1.0, bodyInfosTextureResolution );
//vec4 bodyType_infos2 = texture2D(bodyInfosTex, bodyType_uv);
//if (bodyType_infos1.w == 1.0) {
// vColor = vec3(1,0,0);
//}
//else {
// vColor = vec3(0,0,1);
//}
vec3 bodyPos = posTexData.xyz;
vec4 bodyQuat = texture2D(bodyQuatTex,bodyUV).xyzw;
objectNormal.xyz = vec3_applyQuat(objectNormal.xyz, bodyQuat);
#include <defaultnormal_vertex>
#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#endif
#include <begin_vertex>
transformed.xyz = vec3_applyQuat(transformed.xyz, bodyQuat);
transformed.xyz += bodyPos;
#include <displacementmap_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
//vRefract = - mvPosition.xyz;
#include <worldpos_vertex>
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}
</script>
<!--
Render body instances vertex shader
Copy of THREE.ShaderLib.phong + modifications to render body instances with correct transform
-->
<script id="renderParticlesVertex" type="x-shader/x-vertex">
uniform sampler2D particleWorldPosTex;
uniform sampler2D quatTex;
attribute float particleIndex;
#define PHONG
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <uv2_vertex>
#include <color_vertex>
vec2 particleUV = indexToUV(particleIndex,resolution);
#ifdef USE_COLOR
vColor = vec3((floor(particleUV*3.0)+1.0)/3.0,0);
#endif
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
vec4 particlePosAndBodyId = texture2D(particleWorldPosTex,particleUV);
vec2 bodyUV = indexToUV(particlePosAndBodyId.w,bodyTextureResolution);
vec4 bodyQuat = texture2D(quatTex,bodyUV).xyzw;
objectNormal.xyz = vec3_applyQuat(objectNormal.xyz, bodyQuat);
#include <defaultnormal_vertex>
#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#endif
#include <begin_vertex>
vec3 particlePos = particlePosAndBodyId.xyz;
transformed.xyz = vec3_applyQuat(transformed.xyz, bodyQuat);
transformed.xyz += particlePos;
#include <displacementmap_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}
</script>
<!--
Render depth. This is for rendering shadows.
-->
<script id="renderBodiesDepth" type="x-shader/x-vertex">
uniform sampler2D bodyPosTex;
uniform sampler2D bodyQuatTex;
attribute float bodyIndex;
#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>