moorhen 0.0.1 → 0.6.2
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/README.md +142 -0
- package/baby-gru/CootWorker.js +1 -1071
- package/baby-gru/CootWorker.ts +1064 -0
- package/baby-gru/monomers/h/HIS.cif +5 -5
- package/baby-gru/moorhen.css +280 -0
- package/baby-gru/pixmaps/{map.svg → map-grey.svg} +38 -28
- package/baby-gru/pixmaps/moorhen-ligand.svg +213 -0
- package/baby-gru/pixmaps/secondary-structure-grey.svg +158 -0
- package/baby-gru/wasm/RDKit_minimal.js +1 -21
- package/baby-gru/wasm/RDKit_minimal.wasm +0 -0
- package/baby-gru/wasm/cif_pdb_worker.js +1 -33
- package/baby-gru/wasm/coot_env_web.js +1 -5
- package/baby-gru/wasm/crystallography_worker.js +1 -610
- package/baby-gru/wasm/mini_rsr_worker.js +1 -72
- package/baby-gru/wasm/monid_to_pdb_worker.js +1 -253
- package/baby-gru/wasm/moorhen.data +2580 -739
- package/baby-gru/wasm/moorhen.js +1 -21
- package/baby-gru/wasm/moorhen.wasm +0 -0
- package/baby-gru/wasm/moorhen.worker.js +1 -1
- package/baby-gru/wasm/mtz_arraybuffer_worker.js +1 -59
- package/baby-gru/wasm/mtz_worker.js +1 -45
- package/baby-gru/wasm/nma_worker.js +1 -103
- package/baby-gru/wasm/papaparse.min.js +2 -7
- package/baby-gru/wasm/papaparse.min.js.LICENSE.txt +6 -0
- package/baby-gru/wasm/pdb_worker.js +1 -282
- package/baby-gru/wasm/smiles_to_pdb_worker.js +1 -252
- package/baby-gru/wasm/superpose_worker.js +1 -144
- package/baby-gru/wasm/web_example.js +1 -21
- package/baby-gru/wasm/web_example.wasm +0 -0
- package/moorhen.css +1 -276
- package/moorhen.js +86 -0
- package/moorhen.js.LICENSE.txt +101 -0
- package/package.json +72 -51
- package/types/emscriptem.d.ts +25 -0
- package/types/gemmi.d.ts +115 -0
- package/types/index.d.ts +18 -0
- package/types/libcoot.d.ts +450 -0
- package/types/main.d.ts +428 -0
- package/types/mgWebGL.d.ts +398 -0
- package/types/moorhen.d.ts +815 -0
- package/baby-gru/pixmaps/diff-map.png +0 -0
- package/baby-gru/tutorials/legend.html +0 -3
- /package/baby-gru/{keyboard-blank.svg → pixmaps/keyboard-blank.svg} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* @license
|
|
2
|
+
* pixi.js - v1.5.1
|
|
3
|
+
* Copyright (c) 2012-2014, Mat Groves
|
|
4
|
+
* http://goodboydigital.com/
|
|
5
|
+
*
|
|
6
|
+
* pixi.js is licensed under the MIT License.
|
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
|
8
|
+
*
|
|
9
|
+
* http://stackoverflow.com/users/34441/ellisbben
|
|
10
|
+
* great solution to the problem!
|
|
11
|
+
* returns the height of the given font
|
|
12
|
+
*
|
|
13
|
+
* @method determineFontHeight
|
|
14
|
+
* @param fontStyle {Object}
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/*!
|
|
19
|
+
Copyright (c) 2018 Jed Watson.
|
|
20
|
+
Licensed under the MIT License (MIT), see
|
|
21
|
+
http://jedwatson.github.io/classnames
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/*!
|
|
25
|
+
localForage -- Offline Storage, Improved
|
|
26
|
+
Version 1.10.0
|
|
27
|
+
https://localforage.github.io/localForage
|
|
28
|
+
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/*!
|
|
32
|
+
* @kurkle/color v0.2.1
|
|
33
|
+
* https://github.com/kurkle/color#readme
|
|
34
|
+
* (c) 2022 Jukka Kurkela
|
|
35
|
+
* Released under the MIT License
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/*!
|
|
39
|
+
* Chart.js v3.9.1
|
|
40
|
+
* https://www.chartjs.org
|
|
41
|
+
* (c) 2022 Chart.js Contributors
|
|
42
|
+
* Released under the MIT License
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @license React
|
|
47
|
+
* react-is.production.min.js
|
|
48
|
+
*
|
|
49
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the MIT license found in the
|
|
52
|
+
* LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @license React
|
|
57
|
+
* react-jsx-runtime.production.min.js
|
|
58
|
+
*
|
|
59
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the MIT license found in the
|
|
62
|
+
* LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @license React
|
|
67
|
+
* use-sync-external-store-shim.production.min.js
|
|
68
|
+
*
|
|
69
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the MIT license found in the
|
|
72
|
+
* LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @license React
|
|
77
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
78
|
+
*
|
|
79
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the MIT license found in the
|
|
82
|
+
* LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
87
|
+
*
|
|
88
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
89
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
90
|
+
* @namespace
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/** @license React v16.13.1
|
|
95
|
+
* react-is.production.min.js
|
|
96
|
+
*
|
|
97
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the MIT license found in the
|
|
100
|
+
* LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moorhen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "moorhen.js",
|
|
6
|
+
"types": "./types/main.d.ts",
|
|
7
|
+
"homepage": "./",
|
|
6
8
|
"author": "Paul Emsley, Filomeno Sanchez Rodriguez, Martin Noble, Stuart McNicholas",
|
|
7
9
|
"description": "Moorhen molecular graphics",
|
|
10
|
+
"license": "BSD-3-Clause",
|
|
8
11
|
"repository": {
|
|
9
12
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
13
|
+
"url": "git+https://github.com/moorhen-coot/Moorhen.git"
|
|
11
14
|
},
|
|
12
15
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/
|
|
16
|
+
"url": "https://github.com/moorhen-coot/Moorhen/issues"
|
|
14
17
|
},
|
|
15
|
-
"homepage": "https://github.com/stuartjamesmcnicholas/Moorhen#readme",
|
|
16
|
-
"types": "src/types/index.d.ts",
|
|
17
18
|
"keywords": [
|
|
18
19
|
"molecular graphics",
|
|
19
20
|
"moorhen",
|
|
@@ -61,22 +62,24 @@
|
|
|
61
62
|
]
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
|
-
"dependencies": {},
|
|
65
|
+
"dependencies": { },
|
|
65
66
|
"scripts": {
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
67
|
+
"create-version": "npx genversion -e -p ./package.json -d -s ./src/version.js",
|
|
68
|
+
"transpile-ts-worker": "npx tsc --module es2015 --lib webworker --skipLibCheck public/baby-gru/CootWorker.ts && sed -i.bak '/export {}/d' public/baby-gru/CootWorker.js && rm public/baby-gru/CootWorker.js.bak",
|
|
69
|
+
"transpile-ts-worker-jest": "npx tsc --module es2015 --lib webworker --skipLibCheck public/baby-gru/CootWorker.ts && sed -i.bak 's/export {}/export { doCootCommand, setModules }/g' public/baby-gru/CootWorker.js && sed -i.bak '/importScripts.*;/d' public/baby-gru/CootWorker.js && sed -i.bak 's/onmessage/function setModules(arg0, arg1) { molecules_container = arg0; cootModule = arg1 }; let postMessage = () => {}; let onmessage/g' public/baby-gru/CootWorker.js && rm public/baby-gru/CootWorker.js.bak",
|
|
70
|
+
"prestart": "npm run create-version && npm run transpile-ts-worker",
|
|
71
|
+
"start": "vite",
|
|
72
|
+
"prebuild": "npm run create-version && npm run transpile-ts-worker",
|
|
73
|
+
"build": "vite build",
|
|
74
|
+
"build-release": "npm run prebuild && webpack --mode production --devtool inline-source-map",
|
|
74
75
|
"dev": "concurrently -k \"BROWSER=none npm start\" \"npm:electron\"",
|
|
75
76
|
"electron": "wait-on tcp:3000 && electron-forge start",
|
|
76
|
-
"package": "
|
|
77
|
-
"make-mac": "
|
|
78
|
-
"make-linux": "
|
|
79
|
-
"make-win32": "
|
|
77
|
+
"package": "npm run build && electron-forge package",
|
|
78
|
+
"make-mac": "npm run build && electron-forge make --platform darwin",
|
|
79
|
+
"make-linux": "npm run build && electron-forge make --platform linux",
|
|
80
|
+
"make-win32": "npm run build && electron-forge make --platform win32",
|
|
81
|
+
"create-docs": "npm run create-version && npx jsdoc -c jsdoc.json",
|
|
82
|
+
"test": "npm run create-version && npx tsc && npm run transpile-ts-worker-jest && ln -s ./public/baby-gru/wasm/moorhen.data ./moorhen.data && node --trace-warnings --experimental-vm-modules --experimental-wasm-threads node_modules/jest/bin/jest.js --forceExit"
|
|
80
83
|
},
|
|
81
84
|
"eslintConfig": {
|
|
82
85
|
"extends": [
|
|
@@ -97,13 +100,6 @@
|
|
|
97
100
|
]
|
|
98
101
|
},
|
|
99
102
|
"devDependencies": {
|
|
100
|
-
"@emotion/styled": "^11.10.4",
|
|
101
|
-
"@mui/icons-material": "^5.10.9",
|
|
102
|
-
"@mui/material": "^5.10.10",
|
|
103
|
-
"@emotion/react": "^11.10.4",
|
|
104
|
-
"@testing-library/jest-dom": "^5.16.4",
|
|
105
|
-
"@testing-library/user-event": "^13.5.0",
|
|
106
|
-
"@testing-library/react": "^13.2.0",
|
|
107
103
|
"@babel/preset-env": "^7.20.2",
|
|
108
104
|
"@babel/preset-react": "^7.18.6",
|
|
109
105
|
"@electron-forge/cli": "^6.0.5",
|
|
@@ -111,41 +107,50 @@
|
|
|
111
107
|
"@electron-forge/maker-rpm": "^6.0.5",
|
|
112
108
|
"@electron-forge/maker-squirrel": "^6.0.5",
|
|
113
109
|
"@electron-forge/maker-zip": "^6.0.5",
|
|
110
|
+
"@emotion/react": "^11.10.4",
|
|
111
|
+
"@emotion/styled": "^11.10.4",
|
|
112
|
+
"@mui/icons-material": "^5.10.9",
|
|
113
|
+
"@mui/lab": "^5.0.0-alpha.140",
|
|
114
|
+
"@mui/material": "^5.10.10",
|
|
115
|
+
"@reduxjs/toolkit": "^1.9.7",
|
|
116
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
117
|
+
"@testing-library/react": "^13.2.0",
|
|
118
|
+
"@testing-library/user-event": "^13.5.0",
|
|
114
119
|
"@types/node": "^18.16.14",
|
|
115
120
|
"@types/react": "^18.2.6",
|
|
116
|
-
"
|
|
121
|
+
"@vitejs/plugin-react-swc": "^3.4.1",
|
|
122
|
+
"acorn": "^8.10.0",
|
|
123
|
+
"babel-cli": "^6.26.0",
|
|
117
124
|
"babel-core": "^6.26.3",
|
|
118
125
|
"babel-loader": "^9.1.0",
|
|
119
126
|
"babel-preset-env": "^1.7.0",
|
|
127
|
+
"babel-preset-react-app": "^3.1.2",
|
|
128
|
+
"bootstrap": "^5.1.3",
|
|
129
|
+
"chart.js": "^3.7.1",
|
|
130
|
+
"chartjs-plugin-annotation": "^2.1.2",
|
|
120
131
|
"concurrently": "^7.6.0",
|
|
121
132
|
"copy-webpack-plugin": "^11.0.0",
|
|
122
133
|
"css-loader": "^6.7.2",
|
|
134
|
+
"d3": "^5.15.0",
|
|
123
135
|
"electron": "^23.1.3",
|
|
124
136
|
"electron-devtools-installer": "^3.2.0",
|
|
125
|
-
"html-webpack-plugin": "^5.5.0",
|
|
126
|
-
"nodemon": "^2.0.22",
|
|
127
|
-
"style-loader": "^3.3.1",
|
|
128
|
-
"ts-loader": "^9.4.3",
|
|
129
|
-
"ts-node": "^10.9.1",
|
|
130
|
-
"webpack": "^5.75.0",
|
|
131
|
-
"webpack-cli": "^5.0.1",
|
|
132
|
-
"webpack-dev-server": "^4.11.1",
|
|
133
|
-
"webpack-node-externals": "^3.0.0",
|
|
134
|
-
"worker-loader": "^3.0.8",
|
|
135
|
-
"html-react-parser": "^1.4.14",
|
|
136
|
-
"babel-cli": "^6.26.0",
|
|
137
|
-
"bootstrap": "^5.1.3",
|
|
138
|
-
"chart.js": "^3.7.1",
|
|
139
|
-
"chartjs-plugin-annotation": "^2.1.2",
|
|
140
|
-
"d3": "^5.15.0",
|
|
141
137
|
"electron-is-dev": "^2.0.0",
|
|
142
138
|
"electron-squirrel-startup": "^1.0.0",
|
|
143
139
|
"express": "^4.18.2",
|
|
140
|
+
"genversion": "^3.1.1",
|
|
144
141
|
"gl-matrix": "^3.4.3",
|
|
142
|
+
"html-react-parser": "^1.4.14",
|
|
143
|
+
"html-webpack-plugin": "^5.5.0",
|
|
144
|
+
"jest": "^27.5.1",
|
|
145
|
+
"jsdoc": "^4.0.2",
|
|
145
146
|
"localforage": "^1.10.0",
|
|
147
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
146
148
|
"nested-worker": "git+https://github.com/johanholmerin/nested-worker.git#semver:^1.0.0",
|
|
147
149
|
"nightingale-linegraph-track": "^3.8.10",
|
|
150
|
+
"node-fetch": "^2.7.0",
|
|
151
|
+
"nodemon": "^2.0.22",
|
|
148
152
|
"pako": "^2.0.4",
|
|
153
|
+
"parcel-bundler": "^1.12.5",
|
|
149
154
|
"pca-js": "^1.0.2",
|
|
150
155
|
"plotly.js": "^2.12.1",
|
|
151
156
|
"prismjs": "^1.29.0",
|
|
@@ -155,22 +160,38 @@
|
|
|
155
160
|
"protvista-sequence": "^3.5.1",
|
|
156
161
|
"protvista-track": "^3.4.0",
|
|
157
162
|
"rc-tree": "4.2.2",
|
|
158
|
-
"
|
|
159
|
-
"typescript": "^4.0.0",
|
|
160
|
-
"util": "^0.12.5",
|
|
161
|
-
"uuid": "^9.0.0",
|
|
162
|
-
"wait-on": "^7.0.1",
|
|
163
|
-
"web-vitals": "^2.1.4",
|
|
163
|
+
"re-resizable": "^6.9.11",
|
|
164
164
|
"react": "^18.1.0",
|
|
165
|
-
"react-dom": "^18.1.0",
|
|
166
165
|
"react-bootstrap": "^2.3.1",
|
|
167
166
|
"react-bootstrap-typeahead": "^6.0.0-alpha.11",
|
|
168
167
|
"react-chartjs-2": "^4.1.0",
|
|
169
168
|
"react-color": "^2.19.3",
|
|
169
|
+
"react-colorful": "^5.6.1",
|
|
170
|
+
"react-dom": "^18.1.0",
|
|
170
171
|
"react-draggable": "^4.4.5",
|
|
171
172
|
"react-plotly.js": "^2.5.1",
|
|
172
|
-
"react-
|
|
173
|
+
"react-redux": "^8.1.3",
|
|
173
174
|
"react-simple-code-editor": "^0.13.1",
|
|
174
|
-
"reactcss": "^1.2.3"
|
|
175
|
+
"reactcss": "^1.2.3",
|
|
176
|
+
"style-loader": "^3.3.1",
|
|
177
|
+
"styled-components": "^5.3.9",
|
|
178
|
+
"taffydb": "^2.7.3",
|
|
179
|
+
"ts-loader": "^9.4.3",
|
|
180
|
+
"ts-node": "^10.9.1",
|
|
181
|
+
"typescript": "^4.0.0",
|
|
182
|
+
"util": "^0.12.5",
|
|
183
|
+
"uuid": "^9.0.0",
|
|
184
|
+
"vite": "^4.5.0",
|
|
185
|
+
"vite-plugin-checker": "^0.6.2",
|
|
186
|
+
"vite-plugin-cross-origin-isolation": "^0.1.6",
|
|
187
|
+
"vite-plugin-top-level-await": "^1.3.1",
|
|
188
|
+
"vite-plugin-wasm": "^3.2.2",
|
|
189
|
+
"wait-on": "^7.0.1",
|
|
190
|
+
"web-vitals": "^2.1.4",
|
|
191
|
+
"webpack": "^5.86.0",
|
|
192
|
+
"webpack-cli": "^5.0.1",
|
|
193
|
+
"webpack-dev-server": "^4.11.1",
|
|
194
|
+
"webpack-node-externals": "^3.0.0",
|
|
195
|
+
"worker-loader": "^3.0.8"
|
|
175
196
|
}
|
|
176
197
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export namespace emscriptem {
|
|
2
|
+
|
|
3
|
+
type instance<T> = {
|
|
4
|
+
clone: () => T;
|
|
5
|
+
delete: () => void;
|
|
6
|
+
isDeleted: () => boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface vector<T> extends instance<T> {
|
|
10
|
+
size: () => number;
|
|
11
|
+
get: (idx: number) => T;
|
|
12
|
+
at: (idx: number) => T;
|
|
13
|
+
length: () => number;
|
|
14
|
+
push_back: (arg0: T) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface map<T1, T2> extends instance<T1> {
|
|
18
|
+
set(idx: T2, value: T1): void;
|
|
19
|
+
size: () => number;
|
|
20
|
+
get: (idx: T2) => T1;
|
|
21
|
+
length: () => number;
|
|
22
|
+
keys: () => vector<T2>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
package/types/gemmi.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { emscriptem } from "./emscriptem"
|
|
2
|
+
|
|
3
|
+
export namespace gemmi {
|
|
4
|
+
interface NeighborSearch extends emscriptem.instance<NeighborSearch> {
|
|
5
|
+
populate: (arg0: boolean) => void;
|
|
6
|
+
find_atoms: (arg0: Position, arg1: string, arg2: number) => emscriptem.vector<Mark>;
|
|
7
|
+
find_neighbors: (arg0: Atom, arg1: number, ag2: number) => emscriptem.vector<Mark>;
|
|
8
|
+
}
|
|
9
|
+
interface Mark extends emscriptem.instance<Mark> {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
z: number;
|
|
13
|
+
altloc: number;
|
|
14
|
+
element: emscriptem.instance<string>;
|
|
15
|
+
chain_idx: number;
|
|
16
|
+
residue_idx: number;
|
|
17
|
+
atom_idx: number;
|
|
18
|
+
image_idx: number;
|
|
19
|
+
pos: () => Position;
|
|
20
|
+
}
|
|
21
|
+
interface Position extends emscriptem.instance<Position> {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
z: number;
|
|
25
|
+
}
|
|
26
|
+
interface Fractional extends emscriptem.instance<Fractional> {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
z: number;
|
|
30
|
+
}
|
|
31
|
+
interface cifDocument extends emscriptem.instance<Fractional> {
|
|
32
|
+
blocks: emscriptem.vector<cifBlock>;
|
|
33
|
+
}
|
|
34
|
+
interface cifBlock extends emscriptem.instance<cifBlock> {
|
|
35
|
+
name: string;
|
|
36
|
+
find_loop: (arg0: string) => cifLoop;
|
|
37
|
+
}
|
|
38
|
+
interface cifLoop extends emscriptem.instance<cifLoop> {
|
|
39
|
+
length: () => number;
|
|
40
|
+
str: (arg0: number) => string;
|
|
41
|
+
}
|
|
42
|
+
interface Selection extends emscriptem.instance<Selection> {
|
|
43
|
+
residue_names: any;
|
|
44
|
+
matches_model: (model: Model) => boolean;
|
|
45
|
+
matches_chain: (chain: Chain) => boolean;
|
|
46
|
+
matches_residue: (residue: Residue) => boolean;
|
|
47
|
+
matches_atom: (atom: Atom) => boolean;
|
|
48
|
+
models: (struct: Structure) => emscriptem.vector<Model>;
|
|
49
|
+
chains: (model: Model) => emscriptem.vector<Chain>;
|
|
50
|
+
residues: (chain: Chain) => emscriptem.vector<Residue>;
|
|
51
|
+
atoms: (res: Residue) => emscriptem.vector<Atom>;
|
|
52
|
+
chain_ids: SelectionChainList;
|
|
53
|
+
to_seqid: SelectionSeqId;
|
|
54
|
+
from_seqid: SelectionSeqId;
|
|
55
|
+
}
|
|
56
|
+
interface SelectionResidueNamesList extends emscriptem.instance<SelectionResidueNamesList> {
|
|
57
|
+
str: () => string;
|
|
58
|
+
all: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface SelectionChainList extends emscriptem.instance<SelectionChainList> {
|
|
61
|
+
str: () => string;
|
|
62
|
+
all: boolean;
|
|
63
|
+
}
|
|
64
|
+
interface SelectionSeqId extends emscriptem.instance<SelectionSeqId> {
|
|
65
|
+
str: () => string;
|
|
66
|
+
empty: () => boolean;
|
|
67
|
+
seqnum: number;
|
|
68
|
+
}
|
|
69
|
+
interface Atom extends emscriptem.instance<Atom> {
|
|
70
|
+
name: string;
|
|
71
|
+
element: emscriptem.instance<string>;
|
|
72
|
+
pos: { x: number, y: number, z: number, delete: () => void };
|
|
73
|
+
altloc: number;
|
|
74
|
+
charge: number;
|
|
75
|
+
b_iso: number;
|
|
76
|
+
serial: number;
|
|
77
|
+
has_altloc: () => boolean;
|
|
78
|
+
}
|
|
79
|
+
interface ResidueSeqId extends emscriptem.instance<ResidueSeqId> {
|
|
80
|
+
str: () => string;
|
|
81
|
+
num: { value: number };
|
|
82
|
+
}
|
|
83
|
+
interface Residue extends emscriptem.instance<Residue> {
|
|
84
|
+
name: string;
|
|
85
|
+
seqid: ResidueSeqId;
|
|
86
|
+
atoms: emscriptem.vector<Atom>;
|
|
87
|
+
}
|
|
88
|
+
interface Chain extends emscriptem.instance<Chain> {
|
|
89
|
+
residues: emscriptem.vector<Residue>;
|
|
90
|
+
name: string;
|
|
91
|
+
get_ligands: () => emscriptem.vector<Residue>;
|
|
92
|
+
get_polymer_const: () => emscriptem.instance<number>;
|
|
93
|
+
get_ligands_const: () => emscriptem.vector<Residue>;
|
|
94
|
+
}
|
|
95
|
+
interface Model extends emscriptem.instance<Model> {
|
|
96
|
+
name: string;
|
|
97
|
+
chains: emscriptem.vector<Chain>;
|
|
98
|
+
}
|
|
99
|
+
interface UnitCell extends emscriptem.instance<UnitCell> {
|
|
100
|
+
a: number;
|
|
101
|
+
b: number;
|
|
102
|
+
c: number;
|
|
103
|
+
alpha: number;
|
|
104
|
+
beta: number;
|
|
105
|
+
gamma: number;
|
|
106
|
+
orthogonalize: (arg0: emscriptem.instance<Fractional>) => Position;
|
|
107
|
+
set: (a: number, b: number, c: number, alpha: number, beta: number, gamma: number) => void
|
|
108
|
+
}
|
|
109
|
+
interface Structure extends emscriptem.instance<Structure> {
|
|
110
|
+
models: emscriptem.vector<Model>;
|
|
111
|
+
cell: UnitCell;
|
|
112
|
+
first_model: () => Model;
|
|
113
|
+
remove_empty_chains: () => void;
|
|
114
|
+
}
|
|
115
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { libcootApi } from "./libcoot";
|
|
2
|
+
|
|
3
|
+
export {};
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace JSX {
|
|
7
|
+
interface IntrinsicElements {
|
|
8
|
+
"protvista-manager": ProtvistaManager;
|
|
9
|
+
"protvista-sequence": ProtvistaSequence;
|
|
10
|
+
"protvista-navigation": ProtvistaNavigation;
|
|
11
|
+
"protvista-track": ProtvistaTrack;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
interface Window {
|
|
15
|
+
CCP4Module: libcootApi.CCP4ModuleType;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|