molstar 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +202 -197
  3. package/build/viewer/embedded.html +43 -43
  4. package/build/viewer/index.html +106 -106
  5. package/build/viewer/molstar.js +1 -1
  6. package/lib/apps/docking-viewer/index.html +36 -36
  7. package/lib/apps/viewer/embedded.html +43 -43
  8. package/lib/apps/viewer/index.html +106 -106
  9. package/lib/cli/cif2bcif/converter.js +1 -1
  10. package/lib/cli/cif2bcif/index.js +4 -4
  11. package/lib/commonjs/cli/cif2bcif/converter.js +1 -1
  12. package/lib/commonjs/cli/cif2bcif/index.js +4 -4
  13. package/lib/commonjs/extensions/dnatco/confal-pyramids/color.d.ts +397 -2
  14. package/lib/commonjs/extensions/dnatco/confal-pyramids/color.js +223 -131
  15. package/lib/commonjs/extensions/dnatco/confal-pyramids/property.js +1 -3
  16. package/lib/commonjs/extensions/dnatco/confal-pyramids/util.js +18 -19
  17. package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
  18. package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
  19. package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.d.ts +1 -1
  20. package/lib/commonjs/mol-geo/geometry/mesh/color-smoothing.js +5 -3
  21. package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
  22. package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +1 -1
  23. package/lib/commonjs/mol-geo/geometry/texture-mesh/color-smoothing.js +6 -4
  24. package/lib/commonjs/mol-gl/webgl/context.d.ts +1 -1
  25. package/lib/commonjs/mol-gl/webgl/context.js +2 -2
  26. package/lib/commonjs/mol-math/geometry/common.d.ts +2 -1
  27. package/lib/commonjs/mol-math/geometry/common.js +1 -1
  28. package/lib/commonjs/mol-math/geometry/gaussian-density/cpu.d.ts +1 -1
  29. package/lib/commonjs/mol-math/geometry/gaussian-density/cpu.js +2 -2
  30. package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.d.ts +1 -1
  31. package/lib/commonjs/mol-math/geometry/gaussian-density/gpu.js +7 -7
  32. package/lib/commonjs/mol-math/geometry/gaussian-density.d.ts +2 -2
  33. package/lib/commonjs/mol-math/geometry/gaussian-density.js +1 -1
  34. package/lib/commonjs/mol-math/geometry/molecular-surface.d.ts +2 -1
  35. package/lib/commonjs/mol-math/geometry/molecular-surface.js +2 -2
  36. package/lib/commonjs/mol-math/geometry/primitives/box3d.js +2 -1
  37. package/lib/commonjs/mol-math/geometry/primitives/sphere3d.js +12 -6
  38. package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  39. package/lib/commonjs/mol-repr/structure/visual/gaussian-density-volume.js +2 -3
  40. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +1 -1
  41. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-mesh.js +9 -9
  42. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -1
  43. package/lib/commonjs/mol-repr/structure/visual/gaussian-surface-wireframe.js +4 -5
  44. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-mesh.js +3 -3
  45. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -1
  46. package/lib/commonjs/mol-repr/structure/visual/molecular-surface-wireframe.js +4 -4
  47. package/lib/commonjs/mol-repr/structure/visual/util/common.d.ts +1 -3
  48. package/lib/commonjs/mol-repr/structure/visual/util/common.js +2 -27
  49. package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
  50. package/lib/examples/alpha-orbitals/index.html +61 -61
  51. package/lib/examples/basic-wrapper/index.html +137 -137
  52. package/lib/examples/lighting/index.html +88 -88
  53. package/lib/examples/proteopedia-wrapper/index.html +236 -236
  54. package/lib/extensions/dnatco/confal-pyramids/color.d.ts +397 -2
  55. package/lib/extensions/dnatco/confal-pyramids/color.js +224 -132
  56. package/lib/extensions/dnatco/confal-pyramids/property.js +1 -3
  57. package/lib/extensions/dnatco/confal-pyramids/util.js +19 -20
  58. package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
  59. package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
  60. package/lib/mol-geo/geometry/mesh/color-smoothing.d.ts +1 -1
  61. package/lib/mol-geo/geometry/mesh/color-smoothing.js +5 -3
  62. package/lib/mol-geo/geometry/points/points.d.ts +1 -1
  63. package/lib/mol-geo/geometry/texture-mesh/color-smoothing.d.ts +1 -1
  64. package/lib/mol-geo/geometry/texture-mesh/color-smoothing.js +6 -4
  65. package/lib/mol-gl/webgl/context.d.ts +1 -1
  66. package/lib/mol-gl/webgl/context.js +2 -2
  67. package/lib/mol-math/geometry/common.d.ts +2 -1
  68. package/lib/mol-math/geometry/common.js +1 -1
  69. package/lib/mol-math/geometry/gaussian-density/cpu.d.ts +1 -1
  70. package/lib/mol-math/geometry/gaussian-density/cpu.js +2 -2
  71. package/lib/mol-math/geometry/gaussian-density/gpu.d.ts +1 -1
  72. package/lib/mol-math/geometry/gaussian-density/gpu.js +7 -7
  73. package/lib/mol-math/geometry/gaussian-density.d.ts +2 -2
  74. package/lib/mol-math/geometry/gaussian-density.js +1 -1
  75. package/lib/mol-math/geometry/molecular-surface.d.ts +2 -1
  76. package/lib/mol-math/geometry/molecular-surface.js +2 -2
  77. package/lib/mol-math/geometry/primitives/box3d.js +2 -1
  78. package/lib/mol-math/geometry/primitives/sphere3d.js +12 -6
  79. package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
  80. package/lib/mol-plugin/version.js +2 -2
  81. package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
  82. package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
  83. package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
  84. package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
  85. package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
  86. package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
  87. package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
  88. package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
  89. package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
  90. package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
  91. package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
  92. package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
  93. package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
  94. package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
  95. package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
  96. package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
  97. package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
  98. package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
  99. package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
  100. package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
  101. package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
  102. package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
  103. package/lib/mol-plugin-ui/skin/blue.scss +1 -1
  104. package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
  105. package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
  106. package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
  107. package/lib/mol-plugin-ui/skin/dark.scss +1 -1
  108. package/lib/mol-plugin-ui/skin/light.scss +1 -1
  109. package/lib/mol-repr/structure/visual/gaussian-density-volume.js +2 -3
  110. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.d.ts +1 -1
  111. package/lib/mol-repr/structure/visual/gaussian-surface-mesh.js +10 -10
  112. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.d.ts +1 -1
  113. package/lib/mol-repr/structure/visual/gaussian-surface-wireframe.js +4 -5
  114. package/lib/mol-repr/structure/visual/molecular-surface-mesh.js +4 -4
  115. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.d.ts +1 -1
  116. package/lib/mol-repr/structure/visual/molecular-surface-wireframe.js +5 -5
  117. package/lib/mol-repr/structure/visual/util/common.d.ts +1 -3
  118. package/lib/mol-repr/structure/visual/util/common.js +1 -24
  119. package/lib/mol-script/language/builder.d.ts +1 -0
  120. package/package.json +160 -160
@@ -6,141 +6,239 @@
6
6
  */
7
7
  import { ConfalPyramids, ConfalPyramidsProvider } from './property';
8
8
  import { ConfalPyramidsTypes as CPT } from './types';
9
- import { Color } from '../../../mol-util/color';
9
+ import { Color, ColorMap } from '../../../mol-util/color';
10
+ import { getColorMapParams } from '../../../mol-util/color/params';
10
11
  import { ParamDefinition as PD } from '../../../mol-util/param-definition';
11
12
  import { TableLegend } from '../../../mol-util/legend';
12
- import { iterableToArray } from '../../../mol-data/util';
13
- var DefaultColor = Color(0xCCCCCC);
13
+ import { ObjectKeys } from '../../../mol-util/type-helpers';
14
14
  var Description = 'Assigns colors to confal pyramids';
15
+ var DefaultClassColors = {
16
+ A: 0xFFC1C1,
17
+ B: 0xC8CFFF,
18
+ BII: 0x0059DA,
19
+ miB: 0x3BE8FB,
20
+ Z: 0x01F60E,
21
+ IC: 0xFA5CFB,
22
+ OPN: 0xE90000,
23
+ SYN: 0xFFFF01,
24
+ N: 0xF2F2F2,
25
+ };
15
26
  var ErrorColor = Color(0xFFA10A);
16
- var ColorMapping = new Map([
17
- ['A', Color(0xFFC1C1)],
18
- ['B', Color(0xC8CFFF)],
19
- ['BII', Color(0x0059DA)],
20
- ['miB', Color(0x3BE8FB)],
21
- ['Z', Color(0x01F60E)],
22
- ['IC', Color(0xFA5CFB)],
23
- ['OPN', Color(0xE90000)],
24
- ['SYN', Color(0xFFFF01)],
25
- ['N', Color(0xF2F2F2)],
26
- ]);
27
- var NtCToClasses = new Map([
28
- ['NANT', ['N', 'N']],
29
- ['AA00', ['A', 'A']],
30
- ['AA02', ['A', 'A']],
31
- ['AA03', ['A', 'A']],
32
- ['AA04', ['A', 'A']],
33
- ['AA08', ['A', 'A']],
34
- ['AA09', ['A', 'A']],
35
- ['AA01', ['A', 'A']],
36
- ['AA05', ['A', 'A']],
37
- ['AA06', ['A', 'A']],
38
- ['AA10', ['A', 'A']],
39
- ['AA11', ['A', 'A']],
40
- ['AA07', ['A', 'A']],
41
- ['AA12', ['A', 'A']],
42
- ['AA13', ['A', 'A']],
43
- ['AB01', ['A', 'B']],
44
- ['AB02', ['A', 'B']],
45
- ['AB03', ['A', 'B']],
46
- ['AB04', ['A', 'B']],
47
- ['AB05', ['A', 'B']],
48
- ['BA01', ['B', 'A']],
49
- ['BA05', ['B', 'A']],
50
- ['BA09', ['B', 'A']],
51
- ['BA08', ['BII', 'A']],
52
- ['BA10', ['B', 'A']],
53
- ['BA13', ['BII', 'A']],
54
- ['BA16', ['BII', 'A']],
55
- ['BA17', ['BII', 'A']],
56
- ['BB00', ['B', 'B']],
57
- ['BB01', ['B', 'B']],
58
- ['BB17', ['B', 'B']],
59
- ['BB02', ['B', 'B']],
60
- ['BB03', ['B', 'B']],
61
- ['BB11', ['B', 'B']],
62
- ['BB16', ['B', 'B']],
63
- ['BB04', ['B', 'BII']],
64
- ['BB05', ['B', 'BII']],
65
- ['BB07', ['BII', 'BII']],
66
- ['BB08', ['BII', 'BII']],
67
- ['BB10', ['miB', 'miB']],
68
- ['BB12', ['miB', 'miB']],
69
- ['BB13', ['miB', 'miB']],
70
- ['BB14', ['miB', 'miB']],
71
- ['BB15', ['miB', 'miB']],
72
- ['BB20', ['miB', 'miB']],
73
- ['IC01', ['IC', 'IC']],
74
- ['IC02', ['IC', 'IC']],
75
- ['IC03', ['IC', 'IC']],
76
- ['IC04', ['IC', 'IC']],
77
- ['IC05', ['IC', 'IC']],
78
- ['IC06', ['IC', 'IC']],
79
- ['IC07', ['IC', 'IC']],
80
- ['OP01', ['OPN', 'OPN']],
81
- ['OP02', ['OPN', 'OPN']],
82
- ['OP03', ['OPN', 'OPN']],
83
- ['OP04', ['OPN', 'OPN']],
84
- ['OP05', ['OPN', 'OPN']],
85
- ['OP06', ['OPN', 'OPN']],
86
- ['OP07', ['OPN', 'OPN']],
87
- ['OP08', ['OPN', 'OPN']],
88
- ['OP09', ['OPN', 'OPN']],
89
- ['OP10', ['OPN', 'OPN']],
90
- ['OP11', ['OPN', 'OPN']],
91
- ['OP12', ['OPN', 'OPN']],
92
- ['OP13', ['OPN', 'OPN']],
93
- ['OP14', ['OPN', 'OPN']],
94
- ['OP15', ['OPN', 'OPN']],
95
- ['OP16', ['OPN', 'OPN']],
96
- ['OP17', ['OPN', 'OPN']],
97
- ['OP18', ['OPN', 'OPN']],
98
- ['OP19', ['OPN', 'OPN']],
99
- ['OP20', ['OPN', 'OPN']],
100
- ['OP21', ['OPN', 'OPN']],
101
- ['OP22', ['OPN', 'OPN']],
102
- ['OP23', ['OPN', 'OPN']],
103
- ['OP24', ['OPN', 'OPN']],
104
- ['OP25', ['OPN', 'OPN']],
105
- ['OP26', ['OPN', 'OPN']],
106
- ['OP27', ['OPN', 'OPN']],
107
- ['OP28', ['OPN', 'OPN']],
108
- ['OP29', ['OPN', 'OPN']],
109
- ['OP30', ['OPN', 'OPN']],
110
- ['OP31', ['OPN', 'OPN']],
111
- ['OPS1', ['OPN', 'OPN']],
112
- ['OP1S', ['OPN', 'SYN']],
113
- ['AAS1', ['SYN', 'A']],
114
- ['AB1S', ['A', 'SYN']],
115
- ['AB2S', ['A', 'SYN']],
116
- ['BB1S', ['B', 'SYN']],
117
- ['BB2S', ['B', 'SYN']],
118
- ['BBS1', ['SYN', 'B']],
119
- ['ZZ01', ['Z', 'Z']],
120
- ['ZZ02', ['Z', 'Z']],
121
- ['ZZ1S', ['Z', 'SYN']],
122
- ['ZZ2S', ['Z', 'SYN']],
123
- ['ZZS1', ['SYN', 'Z']],
124
- ['ZZS2', ['SYN', 'Z']],
125
- ]);
126
- function getConformerColor(ntc, useLower) {
127
- var _a;
128
- var item = NtCToClasses.get(ntc);
129
- if (!item)
130
- return ErrorColor;
131
- return (_a = ColorMapping.get(useLower ? item[1] : item[0])) !== null && _a !== void 0 ? _a : ErrorColor;
132
- }
133
- export var ConfalPyramidsColorThemeParams = {};
27
+ var PyramidsColors = ColorMap({
28
+ NANT_Upr: DefaultClassColors.N,
29
+ NANT_Lwr: DefaultClassColors.N,
30
+ AA00_Upr: DefaultClassColors.A,
31
+ AA00_Lwr: DefaultClassColors.A,
32
+ AA02_Upr: DefaultClassColors.A,
33
+ AA02_Lwr: DefaultClassColors.A,
34
+ AA03_Upr: DefaultClassColors.A,
35
+ AA03_Lwr: DefaultClassColors.A,
36
+ AA04_Upr: DefaultClassColors.A,
37
+ AA04_Lwr: DefaultClassColors.A,
38
+ AA08_Upr: DefaultClassColors.A,
39
+ AA08_Lwr: DefaultClassColors.A,
40
+ AA09_Upr: DefaultClassColors.A,
41
+ AA09_Lwr: DefaultClassColors.A,
42
+ AA01_Upr: DefaultClassColors.A,
43
+ AA01_Lwr: DefaultClassColors.A,
44
+ AA05_Upr: DefaultClassColors.A,
45
+ AA05_Lwr: DefaultClassColors.A,
46
+ AA06_Upr: DefaultClassColors.A,
47
+ AA06_Lwr: DefaultClassColors.A,
48
+ AA10_Upr: DefaultClassColors.A,
49
+ AA10_Lwr: DefaultClassColors.A,
50
+ AA11_Upr: DefaultClassColors.A,
51
+ AA11_Lwr: DefaultClassColors.A,
52
+ AA07_Upr: DefaultClassColors.A,
53
+ AA07_Lwr: DefaultClassColors.A,
54
+ AA12_Upr: DefaultClassColors.A,
55
+ AA12_Lwr: DefaultClassColors.A,
56
+ AA13_Upr: DefaultClassColors.A,
57
+ AA13_Lwr: DefaultClassColors.A,
58
+ AB01_Upr: DefaultClassColors.A,
59
+ AB01_Lwr: DefaultClassColors.B,
60
+ AB02_Upr: DefaultClassColors.A,
61
+ AB02_Lwr: DefaultClassColors.B,
62
+ AB03_Upr: DefaultClassColors.A,
63
+ AB03_Lwr: DefaultClassColors.B,
64
+ AB04_Upr: DefaultClassColors.A,
65
+ AB04_Lwr: DefaultClassColors.B,
66
+ AB05_Upr: DefaultClassColors.A,
67
+ AB05_Lwr: DefaultClassColors.B,
68
+ BA01_Upr: DefaultClassColors.B,
69
+ BA01_Lwr: DefaultClassColors.A,
70
+ BA05_Upr: DefaultClassColors.B,
71
+ BA05_Lwr: DefaultClassColors.A,
72
+ BA09_Upr: DefaultClassColors.B,
73
+ BA09_Lwr: DefaultClassColors.A,
74
+ BA08_Upr: DefaultClassColors.BII,
75
+ BA08_Lwr: DefaultClassColors.A,
76
+ BA10_Upr: DefaultClassColors.B,
77
+ BA10_Lwr: DefaultClassColors.A,
78
+ BA13_Upr: DefaultClassColors.BII,
79
+ BA13_Lwr: DefaultClassColors.A,
80
+ BA16_Upr: DefaultClassColors.BII,
81
+ BA16_Lwr: DefaultClassColors.A,
82
+ BA17_Upr: DefaultClassColors.BII,
83
+ BA17_Lwr: DefaultClassColors.A,
84
+ BB00_Upr: DefaultClassColors.B,
85
+ BB00_Lwr: DefaultClassColors.B,
86
+ BB01_Upr: DefaultClassColors.B,
87
+ BB01_Lwr: DefaultClassColors.B,
88
+ BB17_Upr: DefaultClassColors.B,
89
+ BB17_Lwr: DefaultClassColors.B,
90
+ BB02_Upr: DefaultClassColors.B,
91
+ BB02_Lwr: DefaultClassColors.B,
92
+ BB03_Upr: DefaultClassColors.B,
93
+ BB03_Lwr: DefaultClassColors.B,
94
+ BB11_Upr: DefaultClassColors.B,
95
+ BB11_Lwr: DefaultClassColors.B,
96
+ BB16_Upr: DefaultClassColors.B,
97
+ BB16_Lwr: DefaultClassColors.B,
98
+ BB04_Upr: DefaultClassColors.B,
99
+ BB04_Lwr: DefaultClassColors.BII,
100
+ BB05_Upr: DefaultClassColors.B,
101
+ BB05_Lwr: DefaultClassColors.BII,
102
+ BB07_Upr: DefaultClassColors.BII,
103
+ BB07_Lwr: DefaultClassColors.BII,
104
+ BB08_Upr: DefaultClassColors.BII,
105
+ BB08_Lwr: DefaultClassColors.BII,
106
+ BB10_Upr: DefaultClassColors.miB,
107
+ BB10_Lwr: DefaultClassColors.miB,
108
+ BB12_Upr: DefaultClassColors.miB,
109
+ BB12_Lwr: DefaultClassColors.miB,
110
+ BB13_Upr: DefaultClassColors.miB,
111
+ BB13_Lwr: DefaultClassColors.miB,
112
+ BB14_Upr: DefaultClassColors.miB,
113
+ BB14_Lwr: DefaultClassColors.miB,
114
+ BB15_Upr: DefaultClassColors.miB,
115
+ BB15_Lwr: DefaultClassColors.miB,
116
+ BB20_Upr: DefaultClassColors.miB,
117
+ BB20_Lwr: DefaultClassColors.miB,
118
+ IC01_Upr: DefaultClassColors.IC,
119
+ IC01_Lwr: DefaultClassColors.IC,
120
+ IC02_Upr: DefaultClassColors.IC,
121
+ IC02_Lwr: DefaultClassColors.IC,
122
+ IC03_Upr: DefaultClassColors.IC,
123
+ IC03_Lwr: DefaultClassColors.IC,
124
+ IC04_Upr: DefaultClassColors.IC,
125
+ IC04_Lwr: DefaultClassColors.IC,
126
+ IC05_Upr: DefaultClassColors.IC,
127
+ IC05_Lwr: DefaultClassColors.IC,
128
+ IC06_Upr: DefaultClassColors.IC,
129
+ IC06_Lwr: DefaultClassColors.IC,
130
+ IC07_Upr: DefaultClassColors.IC,
131
+ IC07_Lwr: DefaultClassColors.IC,
132
+ OP01_Upr: DefaultClassColors.OPN,
133
+ OP01_Lwr: DefaultClassColors.OPN,
134
+ OP02_Upr: DefaultClassColors.OPN,
135
+ OP02_Lwr: DefaultClassColors.OPN,
136
+ OP03_Upr: DefaultClassColors.OPN,
137
+ OP03_Lwr: DefaultClassColors.OPN,
138
+ OP04_Upr: DefaultClassColors.OPN,
139
+ OP04_Lwr: DefaultClassColors.OPN,
140
+ OP05_Upr: DefaultClassColors.OPN,
141
+ OP05_Lwr: DefaultClassColors.OPN,
142
+ OP06_Upr: DefaultClassColors.OPN,
143
+ OP06_Lwr: DefaultClassColors.OPN,
144
+ OP07_Upr: DefaultClassColors.OPN,
145
+ OP07_Lwr: DefaultClassColors.OPN,
146
+ OP08_Upr: DefaultClassColors.OPN,
147
+ OP08_Lwr: DefaultClassColors.OPN,
148
+ OP09_Upr: DefaultClassColors.OPN,
149
+ OP09_Lwr: DefaultClassColors.OPN,
150
+ OP10_Upr: DefaultClassColors.OPN,
151
+ OP10_Lwr: DefaultClassColors.OPN,
152
+ OP11_Upr: DefaultClassColors.OPN,
153
+ OP11_Lwr: DefaultClassColors.OPN,
154
+ OP12_Upr: DefaultClassColors.OPN,
155
+ OP12_Lwr: DefaultClassColors.OPN,
156
+ OP13_Upr: DefaultClassColors.OPN,
157
+ OP13_Lwr: DefaultClassColors.OPN,
158
+ OP14_Upr: DefaultClassColors.OPN,
159
+ OP14_Lwr: DefaultClassColors.OPN,
160
+ OP15_Upr: DefaultClassColors.OPN,
161
+ OP15_Lwr: DefaultClassColors.OPN,
162
+ OP16_Upr: DefaultClassColors.OPN,
163
+ OP16_Lwr: DefaultClassColors.OPN,
164
+ OP17_Upr: DefaultClassColors.OPN,
165
+ OP17_Lwr: DefaultClassColors.OPN,
166
+ OP18_Upr: DefaultClassColors.OPN,
167
+ OP18_Lwr: DefaultClassColors.OPN,
168
+ OP19_Upr: DefaultClassColors.OPN,
169
+ OP19_Lwr: DefaultClassColors.OPN,
170
+ OP20_Upr: DefaultClassColors.OPN,
171
+ OP20_Lwr: DefaultClassColors.OPN,
172
+ OP21_Upr: DefaultClassColors.OPN,
173
+ OP21_Lwr: DefaultClassColors.OPN,
174
+ OP22_Upr: DefaultClassColors.OPN,
175
+ OP22_Lwr: DefaultClassColors.OPN,
176
+ OP23_Upr: DefaultClassColors.OPN,
177
+ OP23_Lwr: DefaultClassColors.OPN,
178
+ OP24_Upr: DefaultClassColors.OPN,
179
+ OP24_Lwr: DefaultClassColors.OPN,
180
+ OP25_Upr: DefaultClassColors.OPN,
181
+ OP25_Lwr: DefaultClassColors.OPN,
182
+ OP26_Upr: DefaultClassColors.OPN,
183
+ OP26_Lwr: DefaultClassColors.OPN,
184
+ OP27_Upr: DefaultClassColors.OPN,
185
+ OP27_Lwr: DefaultClassColors.OPN,
186
+ OP28_Upr: DefaultClassColors.OPN,
187
+ OP28_Lwr: DefaultClassColors.OPN,
188
+ OP29_Upr: DefaultClassColors.OPN,
189
+ OP29_Lwr: DefaultClassColors.OPN,
190
+ OP30_Upr: DefaultClassColors.OPN,
191
+ OP30_Lwr: DefaultClassColors.OPN,
192
+ OP31_Upr: DefaultClassColors.OPN,
193
+ OP31_Lwr: DefaultClassColors.OPN,
194
+ OPS1_Upr: DefaultClassColors.OPN,
195
+ OPS1_Lwr: DefaultClassColors.OPN,
196
+ OP1S_Upr: DefaultClassColors.OPN,
197
+ OP1S_Lwr: DefaultClassColors.SYN,
198
+ AAS1_Upr: DefaultClassColors.SYN,
199
+ AAS1_Lwr: DefaultClassColors.A,
200
+ AB1S_Upr: DefaultClassColors.A,
201
+ AB1S_Lwr: DefaultClassColors.SYN,
202
+ AB2S_Upr: DefaultClassColors.A,
203
+ AB2S_Lwr: DefaultClassColors.SYN,
204
+ BB1S_Upr: DefaultClassColors.B,
205
+ BB1S_Lwr: DefaultClassColors.SYN,
206
+ BB2S_Upr: DefaultClassColors.B,
207
+ BB2S_Lwr: DefaultClassColors.SYN,
208
+ BBS1_Upr: DefaultClassColors.SYN,
209
+ BBS1_Lwr: DefaultClassColors.B,
210
+ ZZ01_Upr: DefaultClassColors.Z,
211
+ ZZ01_Lwr: DefaultClassColors.Z,
212
+ ZZ02_Upr: DefaultClassColors.Z,
213
+ ZZ02_Lwr: DefaultClassColors.Z,
214
+ ZZ1S_Upr: DefaultClassColors.Z,
215
+ ZZ1S_Lwr: DefaultClassColors.SYN,
216
+ ZZ2S_Upr: DefaultClassColors.Z,
217
+ ZZ2S_Lwr: DefaultClassColors.SYN,
218
+ ZZS1_Upr: DefaultClassColors.SYN,
219
+ ZZS1_Lwr: DefaultClassColors.Z,
220
+ ZZS2_Upr: DefaultClassColors.SYN,
221
+ ZZS2_Lwr: DefaultClassColors.Z,
222
+ });
223
+ export var ConfalPyramidsColorThemeParams = {
224
+ colors: PD.MappedStatic('default', {
225
+ 'default': PD.EmptyGroup(),
226
+ 'custom': PD.Group(getColorMapParams(PyramidsColors))
227
+ }),
228
+ };
134
229
  export function getConfalPyramidsColorThemeParams(ctx) {
135
- return ConfalPyramidsColorThemeParams; // TODO return copy
230
+ return PD.clone(ConfalPyramidsColorThemeParams);
136
231
  }
137
232
  export function ConfalPyramidsColorTheme(ctx, props) {
233
+ var colorMap = props.colors.name === 'default' ? PyramidsColors : props.colors.params;
138
234
  function color(location, isSecondary) {
235
+ var _a;
139
236
  if (CPT.isLocation(location)) {
140
- var _a = location.data, pyramid = _a.pyramid, isLower = _a.isLower;
141
- return getConformerColor(pyramid.NtC, isLower);
237
+ var _b = location.data, pyramid = _b.pyramid, isLower = _b.isLower;
238
+ var key = pyramid.NtC + "_".concat(isLower ? 'Lwr' : 'Upr');
239
+ return (_a = colorMap[key]) !== null && _a !== void 0 ? _a : ErrorColor;
142
240
  }
143
- return DefaultColor;
241
+ return ErrorColor;
144
242
  }
145
243
  return {
146
244
  factory: ConfalPyramidsColorTheme,
@@ -148,13 +246,7 @@ export function ConfalPyramidsColorTheme(ctx, props) {
148
246
  color: color,
149
247
  props: props,
150
248
  description: Description,
151
- legend: TableLegend(iterableToArray(ColorMapping.entries()).map(function (_a) {
152
- var conformer = _a[0], color = _a[1];
153
- return [conformer, color];
154
- }).concat([
155
- ['Error', ErrorColor],
156
- ['Unknown', DefaultColor]
157
- ]))
249
+ legend: TableLegend(ObjectKeys(colorMap).map(function (k) { return [k.replace('_', ' '), colorMap[k]]; }).concat([['Error', ErrorColor]])),
158
250
  };
159
251
  }
160
252
  export var ConfalPyramidsColorThemeProvider = {
@@ -112,10 +112,8 @@ function createPyramidsFromCif(model, steps, stepsSummary) {
112
112
  throw new Error('Inconsistent mmCIF data');
113
113
  for (var i = 0; i < _rowCount; i++) {
114
114
  var model_num = PDB_model_number.value(i);
115
- if (model_num !== model.modelNum) {
115
+ if (model_num !== model.modelNum)
116
116
  hasMultipleModels = true;
117
- continue; // We are only interested in data for the current model
118
- }
119
117
  var _a = getNtCAndConfalScore(id.value(i), i, stepsSummary), _NtC = _a._NtC, _confal_score = _a._confal_score;
120
118
  var pyramid = {
121
119
  PDB_model_number: model_num,
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { __extends } from "tslib";
8
8
  import { ConfalPyramidsProvider } from './property';
9
- import { OrderedSet, Segmentation } from '../../../mol-data/int';
9
+ import { Segmentation } from '../../../mol-data/int';
10
10
  import { Vec3 } from '../../../mol-math/linear-algebra';
11
11
  import { StructureElement, StructureProperties } from '../../../mol-model/structure';
12
12
  export var ConfalPyramidsUtil;
@@ -30,22 +30,17 @@ export var ConfalPyramidsUtil;
30
30
  return prop.data.hasMultipleModels;
31
31
  }
32
32
  ConfalPyramidsUtil.hasMultipleModels = hasMultipleModels;
33
- function getPossibleAltIdsIndices(eIFirst, eILast, structure, unit) {
34
- var loc = StructureElement.Location.create(structure, unit, -1);
35
- var uIFirst = OrderedSet.indexOf(unit.elements, eIFirst);
36
- var uILast = OrderedSet.indexOf(unit.elements, eILast);
33
+ function getPossibleAltIds(residue, structure, unit) {
37
34
  var possibleAltIds = [];
38
- for (var uI = uIFirst; uI <= uILast; uI++) {
39
- loc.element = unit.elements[uI];
35
+ var loc = StructureElement.Location.create(structure, unit, -1);
36
+ for (var rI = residue.start; rI <= residue.end - 1; rI++) {
37
+ loc.element = unit.elements[rI];
40
38
  var altId = StructureProperties.atom.label_alt_id(loc);
41
39
  if (altId !== '' && !possibleAltIds.includes(altId))
42
40
  possibleAltIds.push(altId);
43
41
  }
44
42
  return possibleAltIds;
45
43
  }
46
- function getPossibleAltIdsResidue(residue, structure, unit) {
47
- return getPossibleAltIdsIndices(unit.elements[residue.start], unit.elements[residue.end - 1], structure, unit);
48
- }
49
44
  var Utility = /** @class */ (function () {
50
45
  function Utility(unit) {
51
46
  var prop = ConfalPyramidsProvider.get(unit.model).value;
@@ -86,18 +81,22 @@ export var ConfalPyramidsUtil;
86
81
  return _this;
87
82
  }
88
83
  UnitWalker.prototype.getAtomIndices = function (names, residue) {
89
- var rI = residue.start;
90
- var rILast = residue.end - 1;
91
84
  var indices = [];
92
- for (; rI !== rILast; rI++) {
93
- var eI = this.unit.elements[rI];
94
- var loc = StructureElement.Location.create(this.structure, this.unit, eI);
85
+ var loc = StructureElement.Location.create(this.structure, this.unit, -1);
86
+ for (var rI = residue.start; rI <= residue.end - 1; rI++) {
87
+ loc.element = this.unit.elements[rI];
95
88
  var thisName = StructureProperties.atom.label_atom_id(loc);
96
89
  if (names.includes(thisName))
97
- indices.push(eI);
90
+ indices.push(loc.element);
91
+ }
92
+ if (indices.length === 0) {
93
+ var namesStr = '';
94
+ for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
95
+ var n = names_1[_i];
96
+ namesStr += "".concat(n, " ");
97
+ }
98
+ throw new Error("Element [".concat(namesStr, "] not found on residue ").concat(residue.index));
98
99
  }
99
- if (indices.length === 0)
100
- throw new Error("Element ".concat(name, " not found on residue ").concat(residue.index));
101
100
  return indices;
102
101
  };
103
102
  UnitWalker.prototype.getAtomPositions = function (indices) {
@@ -201,10 +200,10 @@ export var ConfalPyramidsUtil;
201
200
  return altPos;
202
201
  };
203
202
  UnitWalker.prototype.step = function (residue) {
204
- var firstPossibleAltIds = getPossibleAltIdsResidue(residue, this.structure, this.unit);
203
+ var firstPossibleAltIds = getPossibleAltIds(residue, this.structure, this.unit);
205
204
  var firstAtoms = this.processFirstResidue(residue, firstPossibleAltIds);
206
205
  residue = this.residueIt.move();
207
- var secondPossibleAltIds = getPossibleAltIdsResidue(residue, this.structure, this.unit);
206
+ var secondPossibleAltIds = getPossibleAltIds(residue, this.structure, this.unit);
208
207
  var secondAtoms = this.processSecondResidue(residue, secondPossibleAltIds);
209
208
  return { firstAtoms: firstAtoms, secondAtoms: secondAtoms };
210
209
  };
@@ -48,8 +48,8 @@ export declare namespace Cylinders {
48
48
  alpha: PD.Numeric;
49
49
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
50
50
  material: PD.Group<PD.Normalize<{
51
- metalness: number; /** Number of cylinders */
52
- roughness: number;
51
+ metalness: number;
52
+ roughness: number; /** Number of cylinders */
53
53
  bumpiness: number;
54
54
  }>>;
55
55
  clip: PD.Group<PD.Normalize<{
@@ -44,7 +44,6 @@ export declare namespace Lines {
44
44
  material: PD.Group<PD.Normalize<{
45
45
  metalness: number;
46
46
  roughness: number;
47
- /** Number of lines */
48
47
  bumpiness: number;
49
48
  }>>;
50
49
  clip: PD.Group<PD.Normalize<{
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -13,12 +13,14 @@ export function calcMeshColorSmoothing(input, resolution, stride, webgl, texture
13
13
  var colorType = input.colorType, vertexCount = input.vertexCount, groupCount = input.groupCount, positionBuffer = input.positionBuffer, transformBuffer = input.transformBuffer, groupBuffer = input.groupBuffer, itemSize = input.itemSize;
14
14
  var isInstanceType = colorType.endsWith('Instance');
15
15
  var box = Box3D.fromSphere3D(Box3D(), isInstanceType ? input.boundingSphere : input.invariantBoundingSphere);
16
+ var pad = 1 + resolution;
17
+ var expandedBox = Box3D.expand(Box3D(), box, Vec3.create(pad, pad, pad));
16
18
  var scaleFactor = 1 / resolution;
17
- var scaledBox = Box3D.scale(Box3D(), box, scaleFactor);
19
+ var scaledBox = Box3D.scale(Box3D(), expandedBox, scaleFactor);
18
20
  var gridDim = Box3D.size(Vec3(), scaledBox);
19
21
  Vec3.ceil(gridDim, gridDim);
20
22
  Vec3.add(gridDim, gridDim, Vec3.create(2, 2, 2));
21
- var min = box.min;
23
+ var min = expandedBox.min;
22
24
  var xn = gridDim[0], yn = gridDim[1];
23
25
  var _a = getVolumeTexture2dLayout(gridDim), width = _a.width, height = _a.height;
24
26
  // console.log({ width, height, dim });
@@ -43,7 +43,7 @@ export declare namespace Points {
43
43
  quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
44
44
  material: PD.Group<PD.Normalize<{
45
45
  metalness: number;
46
- roughness: number;
46
+ roughness: number; /** Number of vertices in the point cloud */
47
47
  bumpiness: number;
48
48
  }>>;
49
49
  clip: PD.Group<PD.Normalize<{
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -188,12 +188,14 @@ export function calcTextureMeshColorSmoothing(input, resolution, stride, webgl,
188
188
  var gl = webgl.gl, resources = webgl.resources, state = webgl.state, _a = webgl.extensions, colorBufferHalfFloat = _a.colorBufferHalfFloat, textureHalfFloat = _a.textureHalfFloat;
189
189
  var isInstanceType = input.colorType.endsWith('Instance');
190
190
  var box = Box3D.fromSphere3D(Box3D(), isInstanceType ? input.boundingSphere : input.invariantBoundingSphere);
191
+ var pad = 1 + resolution;
192
+ var expandedBox = Box3D.expand(Box3D(), box, Vec3.create(pad, pad, pad));
191
193
  var scaleFactor = 1 / resolution;
192
- var scaledBox = Box3D.scale(Box3D(), box, scaleFactor);
194
+ var scaledBox = Box3D.scale(Box3D(), expandedBox, scaleFactor);
193
195
  var gridDim = Box3D.size(Vec3(), scaledBox);
194
196
  Vec3.ceil(gridDim, gridDim);
195
197
  Vec3.add(gridDim, gridDim, Vec3.create(2, 2, 2));
196
- var min = box.min;
198
+ var min = expandedBox.min;
197
199
  var dx = gridDim[0], dy = gridDim[1], dz = gridDim[2];
198
200
  var _b = getTexture2dSize(gridDim), width = _b.texDimX, height = _b.texDimY, texCols = _b.texCols;
199
201
  // console.log({ width, height, texCols, dim, resolution });
@@ -227,7 +229,7 @@ export function calcTextureMeshColorSmoothing(input, resolution, stride, webgl,
227
229
  countTexture.define(width, height);
228
230
  accumulateTexture.attachFramebuffer(framebuffer, 0);
229
231
  countTexture.attachFramebuffer(framebuffer, 1);
230
- var accumulateRenderable = getAccumulateRenderable(webgl, input, box, resolution, stride);
232
+ var accumulateRenderable = getAccumulateRenderable(webgl, input, expandedBox, resolution, stride);
231
233
  state.currentRenderItemId = -1;
232
234
  framebuffer.bind();
233
235
  drawBuffers.drawBuffers([
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */
@@ -226,7 +226,7 @@ export function createContext(gl, props) {
226
226
  gl: gl,
227
227
  isWebGL2: isWebGL2(gl),
228
228
  get pixelRatio() {
229
- var dpr = (typeof window !== 'undefined') ? window.devicePixelRatio : 1;
229
+ var dpr = (typeof window !== 'undefined') ? (window.devicePixelRatio || 1) : 1;
230
230
  return dpr * (props.pixelScale || 1);
231
231
  },
232
232
  extensions: extensions,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -24,6 +24,7 @@ export declare type DensityData = {
24
24
  field: Tensor;
25
25
  idField: Tensor;
26
26
  resolution: number;
27
+ maxRadius: number;
27
28
  };
28
29
  export declare type DensityTextureData = {
29
30
  transform: Mat4;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author David Sehnal <david.sehnal@gmail.com>
5
5
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
2
+ * Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
3
3
  *
4
4
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
5
5
  */