molstar 3.1.0 → 3.2.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.
- package/LICENSE +20 -20
- package/README.md +194 -194
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +106 -106
- package/build/viewer/molstar.js +1 -1
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.html +106 -106
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +22 -0
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +22 -0
- package/lib/commonjs/mol-model/structure/export/categories/atom_site.js +68 -1
- package/lib/commonjs/mol-model/structure/structure/util/superposition-sifts-mapping.d.ts +21 -0
- package/lib/commonjs/mol-model/structure/structure/util/{superposition-db-mapping.js → superposition-sifts-mapping.js} +40 -20
- package/lib/commonjs/mol-model-formats/structure/basic/schema.d.ts +5 -0
- package/lib/commonjs/mol-model-formats/structure/common/property.d.ts +5 -2
- package/lib/commonjs/mol-model-formats/structure/common/property.js +20 -8
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.d.ts +1 -0
- package/lib/commonjs/mol-model-formats/structure/property/bonds/index-pair.js +2 -1
- package/lib/commonjs/mol-model-props/sequence/{best-database-mapping.d.ts → sifts-mapping.d.ts} +7 -5
- package/lib/commonjs/mol-model-props/sequence/{best-database-mapping.js → sifts-mapping.js} +29 -26
- package/lib/{mol-model-props/sequence/themes/best-database-mapping.d.ts → commonjs/mol-model-props/sequence/themes/sifts-mapping.d.ts} +5 -5
- package/lib/commonjs/mol-model-props/sequence/themes/{best-database-mapping.js → sifts-mapping.js} +22 -22
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/sequence/{best-database-mapping.d.ts → sifts-mapping.d.ts} +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props/sequence/{best-database-mapping.js → sifts-mapping.js} +11 -11
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props.d.ts +1 -1
- package/lib/commonjs/mol-plugin/behavior/dynamic/custom-props.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/commonjs/mol-plugin-ui/structure/superposition.d.ts +4 -1
- package/lib/commonjs/mol-plugin-ui/structure/superposition.js +66 -30
- package/lib/commonjs/mol-script/language/builder.d.ts +1 -0
- package/lib/examples/alpha-orbitals/index.html +61 -61
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +2 -2
- package/lib/mol-geo/geometry/lines/lines.d.ts +0 -1
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +22 -0
- package/lib/mol-io/reader/cif/schema/mmcif.js +22 -0
- package/lib/mol-model/structure/export/categories/atom_site.js +68 -1
- package/lib/mol-model/structure/structure/util/superposition-sifts-mapping.d.ts +21 -0
- package/lib/mol-model/structure/structure/util/{superposition-db-mapping.js → superposition-sifts-mapping.js} +38 -18
- package/lib/mol-model-formats/structure/basic/schema.d.ts +5 -0
- package/lib/mol-model-formats/structure/common/property.d.ts +5 -2
- package/lib/mol-model-formats/structure/common/property.js +20 -8
- package/lib/mol-model-formats/structure/property/bonds/index-pair.d.ts +1 -0
- package/lib/mol-model-formats/structure/property/bonds/index-pair.js +2 -1
- package/lib/mol-model-props/sequence/{best-database-mapping.d.ts → sifts-mapping.d.ts} +7 -5
- package/lib/mol-model-props/sequence/{best-database-mapping.js → sifts-mapping.js} +28 -25
- package/lib/{commonjs/mol-model-props/sequence/themes/best-database-mapping.d.ts → mol-model-props/sequence/themes/sifts-mapping.d.ts} +5 -5
- package/lib/mol-model-props/sequence/themes/{best-database-mapping.js → sifts-mapping.js} +19 -19
- package/lib/mol-plugin/behavior/dynamic/custom-props/sequence/{best-database-mapping.d.ts → sifts-mapping.d.ts} +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props/sequence/{best-database-mapping.js → sifts-mapping.js} +8 -8
- package/lib/mol-plugin/behavior/dynamic/custom-props.d.ts +1 -1
- package/lib/mol-plugin/behavior/dynamic/custom-props.js +1 -1
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +2 -3
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
- package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
- package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
- package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +127 -127
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-plugin-ui/structure/superposition.d.ts +4 -1
- package/lib/mol-plugin-ui/structure/superposition.js +66 -30
- package/lib/mol-script/language/builder.d.ts +1 -0
- package/package.json +160 -160
- package/lib/commonjs/mol-model/structure/structure/util/superposition-db-mapping.d.ts +0 -13
- package/lib/mol-model/structure/structure/util/superposition-db-mapping.d.ts +0 -13
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
6
|
-
<title>Mol* Docking Viewer</title>
|
|
7
|
-
<style>
|
|
8
|
-
#app {
|
|
9
|
-
position: absolute;
|
|
10
|
-
left: 100px;
|
|
11
|
-
top: 100px;
|
|
12
|
-
width: 800px;
|
|
13
|
-
height: 600px;
|
|
14
|
-
}
|
|
15
|
-
</style>
|
|
16
|
-
<link rel="stylesheet" type="text/css" href="molstar.css" />
|
|
17
|
-
</head>
|
|
18
|
-
<body>
|
|
19
|
-
<div id="app"></div>
|
|
20
|
-
<script type="text/javascript" src="./molstar.js"></script>
|
|
21
|
-
<script type="text/javascript">
|
|
22
|
-
function getParam(name, regex) {
|
|
23
|
-
var r = new RegExp(name + '=' + '(' + regex + ')[&]?', 'i');
|
|
24
|
-
return decodeURIComponent(((window.location.search || '').match(r) || [])[1] || '');
|
|
25
|
-
}
|
|
26
|
-
var pdbqt = getParam('pdbqt', '[^&]+').trim() || '../../examples/ace2.pdbqt';
|
|
27
|
-
var mol2 = getParam('mol2', '[^&]+').trim() || '../../examples/ace2-hit.mol2';
|
|
28
|
-
|
|
29
|
-
DockingViewer.create('app', [0x33DD22, 0x1133EE], true).then(viewer => {
|
|
30
|
-
viewer.loadStructuresFromUrlsAndMerge([
|
|
31
|
-
{ url: pdbqt, format: 'pdbqt' },
|
|
32
|
-
{ url: mol2, format: 'mol2' }
|
|
33
|
-
]);
|
|
34
|
-
});
|
|
35
|
-
</script>
|
|
36
|
-
</body>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
6
|
+
<title>Mol* Docking Viewer</title>
|
|
7
|
+
<style>
|
|
8
|
+
#app {
|
|
9
|
+
position: absolute;
|
|
10
|
+
left: 100px;
|
|
11
|
+
top: 100px;
|
|
12
|
+
width: 800px;
|
|
13
|
+
height: 600px;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
<link rel="stylesheet" type="text/css" href="molstar.css" />
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<div id="app"></div>
|
|
20
|
+
<script type="text/javascript" src="./molstar.js"></script>
|
|
21
|
+
<script type="text/javascript">
|
|
22
|
+
function getParam(name, regex) {
|
|
23
|
+
var r = new RegExp(name + '=' + '(' + regex + ')[&]?', 'i');
|
|
24
|
+
return decodeURIComponent(((window.location.search || '').match(r) || [])[1] || '');
|
|
25
|
+
}
|
|
26
|
+
var pdbqt = getParam('pdbqt', '[^&]+').trim() || '../../examples/ace2.pdbqt';
|
|
27
|
+
var mol2 = getParam('mol2', '[^&]+').trim() || '../../examples/ace2-hit.mol2';
|
|
28
|
+
|
|
29
|
+
DockingViewer.create('app', [0x33DD22, 0x1133EE], true).then(viewer => {
|
|
30
|
+
viewer.loadStructuresFromUrlsAndMerge([
|
|
31
|
+
{ url: pdbqt, format: 'pdbqt' },
|
|
32
|
+
{ url: mol2, format: 'mol2' }
|
|
33
|
+
]);
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
36
|
+
</body>
|
|
37
37
|
</html>
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
6
|
-
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
|
7
|
-
<title>Embedded Mol* Viewer</title>
|
|
8
|
-
<style>
|
|
9
|
-
#app {
|
|
10
|
-
position: absolute;
|
|
11
|
-
left: 100px;
|
|
12
|
-
top: 100px;
|
|
13
|
-
width: 800px;
|
|
14
|
-
height: 600px;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
<link rel="stylesheet" type="text/css" href="molstar.css" />
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<div id="app"></div>
|
|
21
|
-
<script type="text/javascript" src="./molstar.js"></script>
|
|
22
|
-
<script type="text/javascript">
|
|
23
|
-
molstar.Viewer.create('app', {
|
|
24
|
-
layoutIsExpanded: true,
|
|
25
|
-
layoutShowControls: false,
|
|
26
|
-
layoutShowRemoteState: false,
|
|
27
|
-
layoutShowSequence: true,
|
|
28
|
-
layoutShowLog: false,
|
|
29
|
-
layoutShowLeftPanel: true,
|
|
30
|
-
|
|
31
|
-
viewportShowExpand: true,
|
|
32
|
-
viewportShowSelectionMode: false,
|
|
33
|
-
viewportShowAnimation: false,
|
|
34
|
-
|
|
35
|
-
pdbProvider: 'rcsb',
|
|
36
|
-
emdbProvider: 'rcsb',
|
|
37
|
-
}).then(viewer => {
|
|
38
|
-
viewer.loadPdb('7bv2');
|
|
39
|
-
viewer.loadEmdb('EMD-30210', { detail: 6 });
|
|
40
|
-
// viewer.loadAllModelsOrAssemblyFromUrl('https://cs.litemol.org/5ire/full', 'mmcif', false, { representationParams: { theme: { globalName: 'operator-name' } } })
|
|
41
|
-
});
|
|
42
|
-
</script>
|
|
43
|
-
</body>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
6
|
+
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
|
7
|
+
<title>Embedded Mol* Viewer</title>
|
|
8
|
+
<style>
|
|
9
|
+
#app {
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: 100px;
|
|
12
|
+
top: 100px;
|
|
13
|
+
width: 800px;
|
|
14
|
+
height: 600px;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
<link rel="stylesheet" type="text/css" href="molstar.css" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="app"></div>
|
|
21
|
+
<script type="text/javascript" src="./molstar.js"></script>
|
|
22
|
+
<script type="text/javascript">
|
|
23
|
+
molstar.Viewer.create('app', {
|
|
24
|
+
layoutIsExpanded: true,
|
|
25
|
+
layoutShowControls: false,
|
|
26
|
+
layoutShowRemoteState: false,
|
|
27
|
+
layoutShowSequence: true,
|
|
28
|
+
layoutShowLog: false,
|
|
29
|
+
layoutShowLeftPanel: true,
|
|
30
|
+
|
|
31
|
+
viewportShowExpand: true,
|
|
32
|
+
viewportShowSelectionMode: false,
|
|
33
|
+
viewportShowAnimation: false,
|
|
34
|
+
|
|
35
|
+
pdbProvider: 'rcsb',
|
|
36
|
+
emdbProvider: 'rcsb',
|
|
37
|
+
}).then(viewer => {
|
|
38
|
+
viewer.loadPdb('7bv2');
|
|
39
|
+
viewer.loadEmdb('EMD-30210', { detail: 6 });
|
|
40
|
+
// viewer.loadAllModelsOrAssemblyFromUrl('https://cs.litemol.org/5ire/full', 'mmcif', false, { representationParams: { theme: { globalName: 'operator-name' } } })
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
43
|
+
</body>
|
|
44
44
|
</html>
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
6
|
-
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
|
7
|
-
<title>Mol* Viewer</title>
|
|
8
|
-
<style>
|
|
9
|
-
* {
|
|
10
|
-
margin: 0;
|
|
11
|
-
padding: 0;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
}
|
|
14
|
-
html, body {
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 100%;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
}
|
|
19
|
-
hr {
|
|
20
|
-
margin: 10px;
|
|
21
|
-
}
|
|
22
|
-
h1, h2, h3, h4, h5 {
|
|
23
|
-
margin-top: 5px;
|
|
24
|
-
margin-bottom: 3px;
|
|
25
|
-
}
|
|
26
|
-
button {
|
|
27
|
-
padding: 2px;
|
|
28
|
-
}
|
|
29
|
-
#app {
|
|
30
|
-
position: absolute;
|
|
31
|
-
left: 100px;
|
|
32
|
-
top: 100px;
|
|
33
|
-
width: 800px;
|
|
34
|
-
height: 600px;
|
|
35
|
-
}
|
|
36
|
-
</style>
|
|
37
|
-
<link rel="stylesheet" type="text/css" href="molstar.css" />
|
|
38
|
-
</head>
|
|
39
|
-
<body>
|
|
40
|
-
<div id="app"></div>
|
|
41
|
-
<script type="text/javascript" src="./molstar.js"></script>
|
|
42
|
-
<script type="text/javascript">
|
|
43
|
-
function getParam(name, regex) {
|
|
44
|
-
var r = new RegExp(name + '=' + '(' + regex + ')[&]?', 'i');
|
|
45
|
-
return decodeURIComponent(((window.location.search || '').match(r) || [])[1] || '');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var debugMode = getParam('debug-mode', '[^&]+').trim() === '1';
|
|
49
|
-
if (debugMode) molstar.setDebugMode(debugMode, debugMode);
|
|
50
|
-
|
|
51
|
-
var hideControls = getParam('hide-controls', '[^&]+').trim() === '1';
|
|
52
|
-
var collapseLeftPanel = getParam('collapse-left-panel', '[^&]+').trim() === '1';
|
|
53
|
-
var pdbProvider = getParam('pdb-provider', '[^&]+').trim().toLowerCase();
|
|
54
|
-
var emdbProvider = getParam('emdb-provider', '[^&]+').trim().toLowerCase();
|
|
55
|
-
var mapProvider = getParam('map-provider', '[^&]+').trim().toLowerCase();
|
|
56
|
-
var pixelScale = getParam('pixel-scale', '[^&]+').trim();
|
|
57
|
-
var pickScale = getParam('pick-scale', '[^&]+').trim();
|
|
58
|
-
var pickPadding = getParam('pick-padding', '[^&]+').trim();
|
|
59
|
-
var disableWboit = getParam('disable-wboit', '[^&]+').trim() === '1';
|
|
60
|
-
var preferWebgl1 = getParam('prefer-webgl1', '[^&]+').trim() === '1' || void 0;
|
|
61
|
-
|
|
62
|
-
molstar.Viewer.create('app', {
|
|
63
|
-
layoutShowControls: !hideControls,
|
|
64
|
-
viewportShowExpand: false,
|
|
65
|
-
collapseLeftPanel: collapseLeftPanel,
|
|
66
|
-
pdbProvider: pdbProvider || 'pdbe',
|
|
67
|
-
emdbProvider: emdbProvider || 'pdbe',
|
|
68
|
-
volumeStreamingServer: (mapProvider || 'pdbe') === 'rcsb'
|
|
69
|
-
? 'https://maps.rcsb.org'
|
|
70
|
-
: 'https://www.ebi.ac.uk/pdbe/densities',
|
|
71
|
-
pixelScale: parseFloat(pixelScale) || 1,
|
|
72
|
-
pickScale: parseFloat(pickScale) || 0.25,
|
|
73
|
-
pickPadding: isNaN(parseFloat(pickPadding)) ? 1 : parseFloat(pickPadding),
|
|
74
|
-
enableWboit: disableWboit ? true : void 0, // use default value if disable-wboit is not set
|
|
75
|
-
preferWebgl1: preferWebgl1,
|
|
76
|
-
}).then(viewer => {
|
|
77
|
-
var snapshotId = getParam('snapshot-id', '[^&]+').trim();
|
|
78
|
-
if (snapshotId) viewer.setRemoteSnapshot(snapshotId);
|
|
79
|
-
|
|
80
|
-
var snapshotUrl = getParam('snapshot-url', '[^&]+').trim();
|
|
81
|
-
var snapshotUrlType = getParam('snapshot-url-type', '[^&]+').toLowerCase().trim() || 'molj';
|
|
82
|
-
if (snapshotUrl && snapshotUrlType) viewer.loadSnapshotFromUrl(snapshotUrl, snapshotUrlType);
|
|
83
|
-
|
|
84
|
-
var structureUrl = getParam('structure-url', '[^&]+').trim();
|
|
85
|
-
var structureUrlFormat = getParam('structure-url-format', '[a-z]+').toLowerCase().trim();
|
|
86
|
-
var structureUrlIsBinary = getParam('structure-url-is-binary', '[^&]+').trim() === '1';
|
|
87
|
-
if (structureUrl) viewer.loadStructureFromUrl(structureUrl, structureUrlFormat, structureUrlIsBinary);
|
|
88
|
-
|
|
89
|
-
var pdb = getParam('pdb', '[^&]+').trim();
|
|
90
|
-
if (pdb) viewer.loadPdb(pdb);
|
|
91
|
-
|
|
92
|
-
var pdbDev = getParam('pdb-dev', '[^&]+').trim();
|
|
93
|
-
if (pdbDev) viewer.loadPdbDev(pdbDev);
|
|
94
|
-
|
|
95
|
-
var emdb = getParam('emdb', '[^&]+').trim();
|
|
96
|
-
if (emdb) viewer.loadEmdb(emdb);
|
|
97
|
-
|
|
98
|
-
var afdb = getParam('afdb', '[^&]+').trim();
|
|
99
|
-
if (afdb) viewer.loadAlphaFoldDb(afdb);
|
|
100
|
-
|
|
101
|
-
var modelArchive = getParam('model-archive', '[^&]+').trim();
|
|
102
|
-
if (modelArchive) viewer.loadModelArchive(modelArchive);
|
|
103
|
-
});
|
|
104
|
-
</script>
|
|
105
|
-
<!-- __MOLSTAR_ANALYTICS__ -->
|
|
106
|
-
</body>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
6
|
+
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
|
7
|
+
<title>Mol* Viewer</title>
|
|
8
|
+
<style>
|
|
9
|
+
* {
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
html, body {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
hr {
|
|
20
|
+
margin: 10px;
|
|
21
|
+
}
|
|
22
|
+
h1, h2, h3, h4, h5 {
|
|
23
|
+
margin-top: 5px;
|
|
24
|
+
margin-bottom: 3px;
|
|
25
|
+
}
|
|
26
|
+
button {
|
|
27
|
+
padding: 2px;
|
|
28
|
+
}
|
|
29
|
+
#app {
|
|
30
|
+
position: absolute;
|
|
31
|
+
left: 100px;
|
|
32
|
+
top: 100px;
|
|
33
|
+
width: 800px;
|
|
34
|
+
height: 600px;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
<link rel="stylesheet" type="text/css" href="molstar.css" />
|
|
38
|
+
</head>
|
|
39
|
+
<body>
|
|
40
|
+
<div id="app"></div>
|
|
41
|
+
<script type="text/javascript" src="./molstar.js"></script>
|
|
42
|
+
<script type="text/javascript">
|
|
43
|
+
function getParam(name, regex) {
|
|
44
|
+
var r = new RegExp(name + '=' + '(' + regex + ')[&]?', 'i');
|
|
45
|
+
return decodeURIComponent(((window.location.search || '').match(r) || [])[1] || '');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var debugMode = getParam('debug-mode', '[^&]+').trim() === '1';
|
|
49
|
+
if (debugMode) molstar.setDebugMode(debugMode, debugMode);
|
|
50
|
+
|
|
51
|
+
var hideControls = getParam('hide-controls', '[^&]+').trim() === '1';
|
|
52
|
+
var collapseLeftPanel = getParam('collapse-left-panel', '[^&]+').trim() === '1';
|
|
53
|
+
var pdbProvider = getParam('pdb-provider', '[^&]+').trim().toLowerCase();
|
|
54
|
+
var emdbProvider = getParam('emdb-provider', '[^&]+').trim().toLowerCase();
|
|
55
|
+
var mapProvider = getParam('map-provider', '[^&]+').trim().toLowerCase();
|
|
56
|
+
var pixelScale = getParam('pixel-scale', '[^&]+').trim();
|
|
57
|
+
var pickScale = getParam('pick-scale', '[^&]+').trim();
|
|
58
|
+
var pickPadding = getParam('pick-padding', '[^&]+').trim();
|
|
59
|
+
var disableWboit = getParam('disable-wboit', '[^&]+').trim() === '1';
|
|
60
|
+
var preferWebgl1 = getParam('prefer-webgl1', '[^&]+').trim() === '1' || void 0;
|
|
61
|
+
|
|
62
|
+
molstar.Viewer.create('app', {
|
|
63
|
+
layoutShowControls: !hideControls,
|
|
64
|
+
viewportShowExpand: false,
|
|
65
|
+
collapseLeftPanel: collapseLeftPanel,
|
|
66
|
+
pdbProvider: pdbProvider || 'pdbe',
|
|
67
|
+
emdbProvider: emdbProvider || 'pdbe',
|
|
68
|
+
volumeStreamingServer: (mapProvider || 'pdbe') === 'rcsb'
|
|
69
|
+
? 'https://maps.rcsb.org'
|
|
70
|
+
: 'https://www.ebi.ac.uk/pdbe/densities',
|
|
71
|
+
pixelScale: parseFloat(pixelScale) || 1,
|
|
72
|
+
pickScale: parseFloat(pickScale) || 0.25,
|
|
73
|
+
pickPadding: isNaN(parseFloat(pickPadding)) ? 1 : parseFloat(pickPadding),
|
|
74
|
+
enableWboit: disableWboit ? true : void 0, // use default value if disable-wboit is not set
|
|
75
|
+
preferWebgl1: preferWebgl1,
|
|
76
|
+
}).then(viewer => {
|
|
77
|
+
var snapshotId = getParam('snapshot-id', '[^&]+').trim();
|
|
78
|
+
if (snapshotId) viewer.setRemoteSnapshot(snapshotId);
|
|
79
|
+
|
|
80
|
+
var snapshotUrl = getParam('snapshot-url', '[^&]+').trim();
|
|
81
|
+
var snapshotUrlType = getParam('snapshot-url-type', '[^&]+').toLowerCase().trim() || 'molj';
|
|
82
|
+
if (snapshotUrl && snapshotUrlType) viewer.loadSnapshotFromUrl(snapshotUrl, snapshotUrlType);
|
|
83
|
+
|
|
84
|
+
var structureUrl = getParam('structure-url', '[^&]+').trim();
|
|
85
|
+
var structureUrlFormat = getParam('structure-url-format', '[a-z]+').toLowerCase().trim();
|
|
86
|
+
var structureUrlIsBinary = getParam('structure-url-is-binary', '[^&]+').trim() === '1';
|
|
87
|
+
if (structureUrl) viewer.loadStructureFromUrl(structureUrl, structureUrlFormat, structureUrlIsBinary);
|
|
88
|
+
|
|
89
|
+
var pdb = getParam('pdb', '[^&]+').trim();
|
|
90
|
+
if (pdb) viewer.loadPdb(pdb);
|
|
91
|
+
|
|
92
|
+
var pdbDev = getParam('pdb-dev', '[^&]+').trim();
|
|
93
|
+
if (pdbDev) viewer.loadPdbDev(pdbDev);
|
|
94
|
+
|
|
95
|
+
var emdb = getParam('emdb', '[^&]+').trim();
|
|
96
|
+
if (emdb) viewer.loadEmdb(emdb);
|
|
97
|
+
|
|
98
|
+
var afdb = getParam('afdb', '[^&]+').trim();
|
|
99
|
+
if (afdb) viewer.loadAlphaFoldDb(afdb);
|
|
100
|
+
|
|
101
|
+
var modelArchive = getParam('model-archive', '[^&]+').trim();
|
|
102
|
+
if (modelArchive) viewer.loadModelArchive(modelArchive);
|
|
103
|
+
});
|
|
104
|
+
</script>
|
|
105
|
+
<!-- __MOLSTAR_ANALYTICS__ -->
|
|
106
|
+
</body>
|
|
107
107
|
</html>
|
|
@@ -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;
|
|
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<{
|
|
@@ -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<{
|
|
@@ -203,6 +203,28 @@ export declare const mmCIF_Schema: {
|
|
|
203
203
|
* formal charge assignment normally found in chemical diagrams.
|
|
204
204
|
*/
|
|
205
205
|
pdbx_formal_charge: Schema.Int;
|
|
206
|
+
/**
|
|
207
|
+
* This data item is an ordinal which identifies distinct chemical components in the atom_site category, both
|
|
208
|
+
* polymeric and non-polymeric.
|
|
209
|
+
*/
|
|
210
|
+
pdbx_label_index: Schema.Int;
|
|
211
|
+
/**
|
|
212
|
+
* The name of additional external databases with residue level mapping.
|
|
213
|
+
*/
|
|
214
|
+
pdbx_sifts_xref_db_name: Schema.Str;
|
|
215
|
+
/**
|
|
216
|
+
* The accession code related to the additional external database entry.
|
|
217
|
+
*/
|
|
218
|
+
pdbx_sifts_xref_db_acc: Schema.Str;
|
|
219
|
+
/**
|
|
220
|
+
* The sequence position of the external database entry that corresponds
|
|
221
|
+
* to the residue mapping defined by the SIFTS process.
|
|
222
|
+
*/
|
|
223
|
+
pdbx_sifts_xref_db_num: Schema.Str;
|
|
224
|
+
/**
|
|
225
|
+
* Describes the residue type of the given UniProt match
|
|
226
|
+
*/
|
|
227
|
+
pdbx_sifts_xref_db_res: Schema.Str;
|
|
206
228
|
/**
|
|
207
229
|
* The model id corresponding to the atom site.
|
|
208
230
|
* This data item is a pointer to _ihm_model_list.model_id
|
|
@@ -214,6 +214,28 @@ exports.mmCIF_Schema = {
|
|
|
214
214
|
* formal charge assignment normally found in chemical diagrams.
|
|
215
215
|
*/
|
|
216
216
|
pdbx_formal_charge: int,
|
|
217
|
+
/**
|
|
218
|
+
* This data item is an ordinal which identifies distinct chemical components in the atom_site category, both
|
|
219
|
+
* polymeric and non-polymeric.
|
|
220
|
+
*/
|
|
221
|
+
pdbx_label_index: int,
|
|
222
|
+
/**
|
|
223
|
+
* The name of additional external databases with residue level mapping.
|
|
224
|
+
*/
|
|
225
|
+
pdbx_sifts_xref_db_name: str,
|
|
226
|
+
/**
|
|
227
|
+
* The accession code related to the additional external database entry.
|
|
228
|
+
*/
|
|
229
|
+
pdbx_sifts_xref_db_acc: str,
|
|
230
|
+
/**
|
|
231
|
+
* The sequence position of the external database entry that corresponds
|
|
232
|
+
* to the residue mapping defined by the SIFTS process.
|
|
233
|
+
*/
|
|
234
|
+
pdbx_sifts_xref_db_num: str,
|
|
235
|
+
/**
|
|
236
|
+
* Describes the residue type of the given UniProt match
|
|
237
|
+
*/
|
|
238
|
+
pdbx_sifts_xref_db_res: str,
|
|
217
239
|
/**
|
|
218
240
|
* The model id corresponding to the atom site.
|
|
219
241
|
* This data item is a pointer to _ihm_model_list.model_id
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.atomIdFields = exports.entityIdFields = exports.chainIdFields = exports.residueIdFields = exports._atom_site = void 0;
|
|
10
10
|
var cif_1 = require("../../../../mol-io/writer/cif");
|
|
11
|
+
var mmcif_1 = require("../../../../mol-model-formats/structure/mmcif");
|
|
12
|
+
var sifts_mapping_1 = require("../../../../mol-model-props/sequence/sifts-mapping");
|
|
11
13
|
var structure_1 = require("../../structure");
|
|
12
14
|
var CifField = cif_1.CifWriter.Field;
|
|
13
15
|
var E = cif_1.CifWriter.Encodings;
|
|
@@ -25,6 +27,61 @@ function atom_site_auth_asym_id(e) {
|
|
|
25
27
|
return l;
|
|
26
28
|
return l + suffix;
|
|
27
29
|
}
|
|
30
|
+
var atom_site_pdbx_label_index = {
|
|
31
|
+
shouldInclude: function (s) {
|
|
32
|
+
var _a;
|
|
33
|
+
return !!((_a = s.atom_site) === null || _a === void 0 ? void 0 : _a.pdbx_label_index.isDefined);
|
|
34
|
+
},
|
|
35
|
+
value: function (e, d) {
|
|
36
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
37
|
+
return d.atom_site.pdbx_label_index.value(srcIndex);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
var SIFTS = {
|
|
41
|
+
shouldInclude: function (s) {
|
|
42
|
+
return sifts_mapping_1.SIFTSMapping.isAvailable(s.structure.models[0]);
|
|
43
|
+
},
|
|
44
|
+
pdbx_sifts_xref_db_name: {
|
|
45
|
+
value: function (e, d) {
|
|
46
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
47
|
+
return d.atom_site.pdbx_sifts_xref_db_name.value(srcIndex);
|
|
48
|
+
},
|
|
49
|
+
valueKind: function (e, d) {
|
|
50
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
51
|
+
return d.atom_site.pdbx_sifts_xref_db_name.valueKind(srcIndex);
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
pdbx_sifts_xref_db_acc: {
|
|
55
|
+
value: function (e, d) {
|
|
56
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
57
|
+
return d.atom_site.pdbx_sifts_xref_db_acc.value(srcIndex);
|
|
58
|
+
},
|
|
59
|
+
valueKind: function (e, d) {
|
|
60
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
61
|
+
return d.atom_site.pdbx_sifts_xref_db_acc.valueKind(srcIndex);
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
pdbx_sifts_xref_db_num: {
|
|
65
|
+
value: function (e, d) {
|
|
66
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
67
|
+
return d.atom_site.pdbx_sifts_xref_db_num.value(srcIndex);
|
|
68
|
+
},
|
|
69
|
+
valueKind: function (e, d) {
|
|
70
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
71
|
+
return d.atom_site.pdbx_sifts_xref_db_num.valueKind(srcIndex);
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
pdbx_sifts_xref_db_res: {
|
|
75
|
+
value: function (e, d) {
|
|
76
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
77
|
+
return d.atom_site.pdbx_sifts_xref_db_res.value(srcIndex);
|
|
78
|
+
},
|
|
79
|
+
valueKind: function (e, d) {
|
|
80
|
+
var srcIndex = d.sourceIndex.value(e.element);
|
|
81
|
+
return d.atom_site.pdbx_sifts_xref_db_res.valueKind(srcIndex);
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
};
|
|
28
85
|
var atom_site_fields = function () { return cif_1.CifWriter.fields()
|
|
29
86
|
.str('group_PDB', structure_1.StructureProperties.residue.group_PDB)
|
|
30
87
|
.index('id')
|
|
@@ -56,6 +113,12 @@ var atom_site_fields = function () { return cif_1.CifWriter.fields()
|
|
|
56
113
|
.int('auth_seq_id', structure_1.StructureProperties.residue.auth_seq_id, { encoder: E.deltaRLE })
|
|
57
114
|
.str('auth_asym_id', atom_site_auth_asym_id)
|
|
58
115
|
.int('pdbx_PDB_model_num', structure_1.StructureProperties.unit.model_num, { encoder: E.deltaRLE })
|
|
116
|
+
.int('pdbx_label_index', atom_site_pdbx_label_index.value, { shouldInclude: atom_site_pdbx_label_index.shouldInclude })
|
|
117
|
+
// SIFTS
|
|
118
|
+
.str('pdbx_sifts_xref_db_name', SIFTS.pdbx_sifts_xref_db_name.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_name.valueKind })
|
|
119
|
+
.str('pdbx_sifts_xref_db_acc', SIFTS.pdbx_sifts_xref_db_acc.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_acc.valueKind })
|
|
120
|
+
.str('pdbx_sifts_xref_db_num', SIFTS.pdbx_sifts_xref_db_num.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_num.valueKind })
|
|
121
|
+
.str('pdbx_sifts_xref_db_res', SIFTS.pdbx_sifts_xref_db_res.value, { shouldInclude: SIFTS.shouldInclude, valueKind: SIFTS.pdbx_sifts_xref_db_res.valueKind })
|
|
59
122
|
// .str('operator_name', P.unit.operator_name, {
|
|
60
123
|
// shouldInclude: structure => structure.units.some(u => !u.conformation.operator.isIdentity)
|
|
61
124
|
// })
|
|
@@ -67,7 +130,11 @@ exports._atom_site = {
|
|
|
67
130
|
return {
|
|
68
131
|
fields: atom_site_fields(),
|
|
69
132
|
source: structures.map(function (s) { return ({
|
|
70
|
-
data:
|
|
133
|
+
data: {
|
|
134
|
+
structure: s,
|
|
135
|
+
sourceIndex: s.model.atomicHierarchy.atomSourceIndex,
|
|
136
|
+
atom_site: mmcif_1.MmcifFormat.is(s.model.sourceData) ? s.model.sourceData.data.db.atom_site : void 0
|
|
137
|
+
},
|
|
71
138
|
rowCount: s.elementCount,
|
|
72
139
|
keys: function () { return s.elementLocations(); }
|
|
73
140
|
}); })
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
|
+
*
|
|
4
|
+
* @author David Sehnal <david.sehnal@gmail.com>
|
|
5
|
+
* @author Sebastian Bittrich <sebastian.bittrich@rcsb.org>
|
|
6
|
+
*/
|
|
7
|
+
import { MinimizeRmsd } from '../../../../mol-math/linear-algebra/3d/minimize-rmsd';
|
|
8
|
+
import { Structure } from '../structure';
|
|
9
|
+
export interface AlignmentResultEntry {
|
|
10
|
+
transform: MinimizeRmsd.Result;
|
|
11
|
+
pivot: number;
|
|
12
|
+
other: number;
|
|
13
|
+
}
|
|
14
|
+
export interface AlignmentResult {
|
|
15
|
+
entries: AlignmentResultEntry[];
|
|
16
|
+
zeroOverlapPairs: [number, number][];
|
|
17
|
+
failedPairs: [number, number][];
|
|
18
|
+
}
|
|
19
|
+
export declare function alignAndSuperposeWithSIFTSMapping(structures: Structure[], options?: {
|
|
20
|
+
traceOnly?: boolean;
|
|
21
|
+
}): AlignmentResult;
|