@kent-tokyo/chematic 0.1.3 → 0.1.4
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/chematic_wasm.d.ts +41 -0
- package/chematic_wasm.js +1 -1
- package/chematic_wasm_bg.js +87 -0
- package/chematic_wasm_bg.wasm +0 -0
- package/package.json +4 -6
package/chematic_wasm.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export class MolHandle {
|
|
|
9
9
|
private constructor();
|
|
10
10
|
free(): void;
|
|
11
11
|
[Symbol.dispose](): void;
|
|
12
|
+
/**
|
|
13
|
+
* Number of aromatic rings (all ring atoms aromatic).
|
|
14
|
+
*/
|
|
15
|
+
aromatic_ring_count(): number;
|
|
12
16
|
/**
|
|
13
17
|
* Number of heavy atoms (explicit atoms in the graph; does not count implicit H).
|
|
14
18
|
*/
|
|
@@ -21,10 +25,18 @@ export class MolHandle {
|
|
|
21
25
|
* Canonical SMILES string.
|
|
22
26
|
*/
|
|
23
27
|
canonical_smiles(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Monoisotopic (exact) mass.
|
|
30
|
+
*/
|
|
31
|
+
exact_mass(): number;
|
|
24
32
|
/**
|
|
25
33
|
* Molecular formula string (Hill notation: C first, H second, then alphabetical).
|
|
26
34
|
*/
|
|
27
35
|
formula(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Fraction of sp3 carbons (Fsp3).
|
|
38
|
+
*/
|
|
39
|
+
fsp3(): number;
|
|
28
40
|
/**
|
|
29
41
|
* Number of hydrogen bond acceptors (Lipinski: all N and O atoms).
|
|
30
42
|
*/
|
|
@@ -41,16 +53,35 @@ export class MolHandle {
|
|
|
41
53
|
* Returns `true` if the molecule satisfies Lipinski's Rule of Five.
|
|
42
54
|
*/
|
|
43
55
|
lipinski_passes(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Crippen–Wildman octanol/water partition coefficient (LogP).
|
|
58
|
+
*/
|
|
59
|
+
logp_crippen(): number;
|
|
44
60
|
/**
|
|
45
61
|
* Average molecular weight (Da).
|
|
46
62
|
*/
|
|
47
63
|
molecular_weight(): number;
|
|
64
|
+
/**
|
|
65
|
+
* Quantitative Estimate of Drug-likeness (QED); range [0, 1].
|
|
66
|
+
*/
|
|
67
|
+
qed(): number;
|
|
68
|
+
/**
|
|
69
|
+
* Number of rotatable bonds.
|
|
70
|
+
*/
|
|
71
|
+
rotatable_bond_count(): number;
|
|
48
72
|
/**
|
|
49
73
|
* Topological polar surface area (Ų).
|
|
50
74
|
*/
|
|
51
75
|
tpsa(): number;
|
|
52
76
|
}
|
|
53
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Number of BRICS fragments produced by fragmenting the molecule.
|
|
80
|
+
*
|
|
81
|
+
* Returns 1 if no BRICS-breakable bonds exist (whole molecule is one fragment).
|
|
82
|
+
*/
|
|
83
|
+
export function brics_fragment_count(mol: MolHandle): number;
|
|
84
|
+
|
|
54
85
|
/**
|
|
55
86
|
* Compute the ECFP4 fingerprint as a bit-packed byte vector (256 bytes = 2048 bits).
|
|
56
87
|
*/
|
|
@@ -63,7 +94,17 @@ export function ecfp4_bitvec(mol: MolHandle): Uint8Array;
|
|
|
63
94
|
*/
|
|
64
95
|
export function parse_smiles(s: string): MolHandle;
|
|
65
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Tanimoto similarity between two molecules using AtomPair fingerprints.
|
|
99
|
+
*/
|
|
100
|
+
export function tanimoto_atom_pair(a: MolHandle, b: MolHandle): number;
|
|
101
|
+
|
|
66
102
|
/**
|
|
67
103
|
* Tanimoto similarity between two molecules using ECFP4 fingerprints.
|
|
68
104
|
*/
|
|
69
105
|
export function tanimoto_ecfp4(a: MolHandle, b: MolHandle): number;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Tanimoto similarity between two molecules using Topological Torsion fingerprints.
|
|
109
|
+
*/
|
|
110
|
+
export function tanimoto_torsion(a: MolHandle, b: MolHandle): number;
|
package/chematic_wasm.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./chematic_wasm_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
wasm.__wbindgen_start();
|
|
7
7
|
export {
|
|
8
|
-
MolHandle, ecfp4_bitvec, parse_smiles, tanimoto_ecfp4
|
|
8
|
+
MolHandle, brics_fragment_count, ecfp4_bitvec, parse_smiles, tanimoto_atom_pair, tanimoto_ecfp4, tanimoto_torsion
|
|
9
9
|
} from "./chematic_wasm_bg.js";
|
package/chematic_wasm_bg.js
CHANGED
|
@@ -19,6 +19,14 @@ export class MolHandle {
|
|
|
19
19
|
const ptr = this.__destroy_into_raw();
|
|
20
20
|
wasm.__wbg_molhandle_free(ptr, 0);
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Number of aromatic rings (all ring atoms aromatic).
|
|
24
|
+
* @returns {number}
|
|
25
|
+
*/
|
|
26
|
+
aromatic_ring_count() {
|
|
27
|
+
const ret = wasm.molhandle_aromatic_ring_count(this.__wbg_ptr);
|
|
28
|
+
return ret >>> 0;
|
|
29
|
+
}
|
|
22
30
|
/**
|
|
23
31
|
* Number of heavy atoms (explicit atoms in the graph; does not count implicit H).
|
|
24
32
|
* @returns {number}
|
|
@@ -51,6 +59,14 @@ export class MolHandle {
|
|
|
51
59
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
52
60
|
}
|
|
53
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Monoisotopic (exact) mass.
|
|
64
|
+
* @returns {number}
|
|
65
|
+
*/
|
|
66
|
+
exact_mass() {
|
|
67
|
+
const ret = wasm.molhandle_exact_mass(this.__wbg_ptr);
|
|
68
|
+
return ret;
|
|
69
|
+
}
|
|
54
70
|
/**
|
|
55
71
|
* Molecular formula string (Hill notation: C first, H second, then alphabetical).
|
|
56
72
|
* @returns {string}
|
|
@@ -67,6 +83,14 @@ export class MolHandle {
|
|
|
67
83
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
68
84
|
}
|
|
69
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Fraction of sp3 carbons (Fsp3).
|
|
88
|
+
* @returns {number}
|
|
89
|
+
*/
|
|
90
|
+
fsp3() {
|
|
91
|
+
const ret = wasm.molhandle_fsp3(this.__wbg_ptr);
|
|
92
|
+
return ret;
|
|
93
|
+
}
|
|
70
94
|
/**
|
|
71
95
|
* Number of hydrogen bond acceptors (Lipinski: all N and O atoms).
|
|
72
96
|
* @returns {number}
|
|
@@ -99,6 +123,14 @@ export class MolHandle {
|
|
|
99
123
|
const ret = wasm.molhandle_lipinski_passes(this.__wbg_ptr);
|
|
100
124
|
return ret !== 0;
|
|
101
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Crippen–Wildman octanol/water partition coefficient (LogP).
|
|
128
|
+
* @returns {number}
|
|
129
|
+
*/
|
|
130
|
+
logp_crippen() {
|
|
131
|
+
const ret = wasm.molhandle_logp_crippen(this.__wbg_ptr);
|
|
132
|
+
return ret;
|
|
133
|
+
}
|
|
102
134
|
/**
|
|
103
135
|
* Average molecular weight (Da).
|
|
104
136
|
* @returns {number}
|
|
@@ -107,6 +139,22 @@ export class MolHandle {
|
|
|
107
139
|
const ret = wasm.molhandle_molecular_weight(this.__wbg_ptr);
|
|
108
140
|
return ret;
|
|
109
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Quantitative Estimate of Drug-likeness (QED); range [0, 1].
|
|
144
|
+
* @returns {number}
|
|
145
|
+
*/
|
|
146
|
+
qed() {
|
|
147
|
+
const ret = wasm.molhandle_qed(this.__wbg_ptr);
|
|
148
|
+
return ret;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Number of rotatable bonds.
|
|
152
|
+
* @returns {number}
|
|
153
|
+
*/
|
|
154
|
+
rotatable_bond_count() {
|
|
155
|
+
const ret = wasm.molhandle_rotatable_bond_count(this.__wbg_ptr);
|
|
156
|
+
return ret >>> 0;
|
|
157
|
+
}
|
|
110
158
|
/**
|
|
111
159
|
* Topological polar surface area (Ų).
|
|
112
160
|
* @returns {number}
|
|
@@ -118,6 +166,19 @@ export class MolHandle {
|
|
|
118
166
|
}
|
|
119
167
|
if (Symbol.dispose) MolHandle.prototype[Symbol.dispose] = MolHandle.prototype.free;
|
|
120
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Number of BRICS fragments produced by fragmenting the molecule.
|
|
171
|
+
*
|
|
172
|
+
* Returns 1 if no BRICS-breakable bonds exist (whole molecule is one fragment).
|
|
173
|
+
* @param {MolHandle} mol
|
|
174
|
+
* @returns {number}
|
|
175
|
+
*/
|
|
176
|
+
export function brics_fragment_count(mol) {
|
|
177
|
+
_assertClass(mol, MolHandle);
|
|
178
|
+
const ret = wasm.brics_fragment_count(mol.__wbg_ptr);
|
|
179
|
+
return ret >>> 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
121
182
|
/**
|
|
122
183
|
* Compute the ECFP4 fingerprint as a bit-packed byte vector (256 bytes = 2048 bits).
|
|
123
184
|
* @param {MolHandle} mol
|
|
@@ -148,6 +209,19 @@ export function parse_smiles(s) {
|
|
|
148
209
|
return MolHandle.__wrap(ret[0]);
|
|
149
210
|
}
|
|
150
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Tanimoto similarity between two molecules using AtomPair fingerprints.
|
|
214
|
+
* @param {MolHandle} a
|
|
215
|
+
* @param {MolHandle} b
|
|
216
|
+
* @returns {number}
|
|
217
|
+
*/
|
|
218
|
+
export function tanimoto_atom_pair(a, b) {
|
|
219
|
+
_assertClass(a, MolHandle);
|
|
220
|
+
_assertClass(b, MolHandle);
|
|
221
|
+
const ret = wasm.tanimoto_atom_pair(a.__wbg_ptr, b.__wbg_ptr);
|
|
222
|
+
return ret;
|
|
223
|
+
}
|
|
224
|
+
|
|
151
225
|
/**
|
|
152
226
|
* Tanimoto similarity between two molecules using ECFP4 fingerprints.
|
|
153
227
|
* @param {MolHandle} a
|
|
@@ -160,6 +234,19 @@ export function tanimoto_ecfp4(a, b) {
|
|
|
160
234
|
const ret = wasm.tanimoto_ecfp4(a.__wbg_ptr, b.__wbg_ptr);
|
|
161
235
|
return ret;
|
|
162
236
|
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Tanimoto similarity between two molecules using Topological Torsion fingerprints.
|
|
240
|
+
* @param {MolHandle} a
|
|
241
|
+
* @param {MolHandle} b
|
|
242
|
+
* @returns {number}
|
|
243
|
+
*/
|
|
244
|
+
export function tanimoto_torsion(a, b) {
|
|
245
|
+
_assertClass(a, MolHandle);
|
|
246
|
+
_assertClass(b, MolHandle);
|
|
247
|
+
const ret = wasm.tanimoto_torsion(a.__wbg_ptr, b.__wbg_ptr);
|
|
248
|
+
return ret;
|
|
249
|
+
}
|
|
163
250
|
export function __wbg___wbindgen_throw_1506f2235d1bdba0(arg0, arg1) {
|
|
164
251
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
165
252
|
}
|
package/chematic_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"kent-tokyo <kent-tokyo@users.noreply.github.com>"
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for chematic — use chematic from JavaScript/TypeScript",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.4",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -26,11 +26,9 @@
|
|
|
26
26
|
],
|
|
27
27
|
"keywords": [
|
|
28
28
|
"cheminformatics",
|
|
29
|
-
"chemistry",
|
|
30
|
-
"smiles",
|
|
31
29
|
"wasm",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
30
|
+
"webassembly",
|
|
31
|
+
"smiles",
|
|
32
|
+
"chemistry"
|
|
35
33
|
]
|
|
36
34
|
}
|