@kent-tokyo/chematic 1.0.36 → 1.0.37
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 +1 -1
- package/chematic_wasm.d.ts +30 -2
- package/chematic_wasm.js +78 -2
- package/chematic_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ WebAssembly bindings for [chematic](https://github.com/kent-tokyo/chematic), a p
|
|
|
4
4
|
|
|
5
5
|
Published to npm as [`@kent-tokyo/chematic`](https://www.npmjs.com/package/@kent-tokyo/chematic).
|
|
6
6
|
|
|
7
|
-
The current workspace line is 1.0.
|
|
7
|
+
The current workspace line is 1.0.37. The binding keeps bounded parsing,
|
|
8
8
|
typed failures, and opt-in `embed_pipeline_v2_json`; 3D/MMFF94 behavior remains
|
|
9
9
|
Experimental and is not a claim of full RDKit parity.
|
|
10
10
|
|
package/chematic_wasm.d.ts
CHANGED
|
@@ -754,11 +754,14 @@ export function chematic_version(): string;
|
|
|
754
754
|
* CIP stereo assignments via the accurate hierarchical-digraph engine, as a JSON
|
|
755
755
|
* array of `{atomIdx, cipCode}` objects -- same shape as [`cip_assignments_json`],
|
|
756
756
|
* but merges the accurate engine's tetrahedral R/S (~99.6% oracle-stable agreement,
|
|
757
|
-
* see `docs/rfcs/cip_accurate_rfc.md`)
|
|
758
|
-
*
|
|
757
|
+
* see `docs/rfcs/cip_accurate_rfc.md`), E/Z ranked by the same engine and legacy's
|
|
758
|
+
* allene answers. Atoms it can't resolve are omitted here -- see
|
|
759
759
|
* [`cip_unresolved_json`] -- never a silently-guessed label. A phosphorus on an
|
|
760
760
|
* unsaturated ring (cyclophosphazene) gets RDKit's CIPLabeler label, which flips
|
|
761
761
|
* with the ring's Kekulé spelling; its object carries `"kekuleDependent": true`.
|
|
762
|
+
* A ring centre with three single bonds and a lone pair (bridgehead amine)
|
|
763
|
+
* gets RDKit's label for the parsed SMILES spelling and carries
|
|
764
|
+
* `"spellingDependent": true`.
|
|
762
765
|
* Returns `"null"` on an internal engine error (budget-independent computations
|
|
763
766
|
* should not normally hit this).
|
|
764
767
|
*/
|
|
@@ -1675,6 +1678,14 @@ export function mmff94_charges_typed_json(mol: MolHandle): string;
|
|
|
1675
1678
|
*/
|
|
1676
1679
|
export function mmff94_energy_breakdown_from_coords_json(mol: MolHandle, coords_json: string): string;
|
|
1677
1680
|
|
|
1681
|
+
/**
|
|
1682
|
+
* [`mmff94_energy_breakdown_from_coords_json`] with
|
|
1683
|
+
* `ignore_interfrag_interactions`: `true` leaves out van der Waals and
|
|
1684
|
+
* electrostatic pairs between disconnected fragments, as RDKit's
|
|
1685
|
+
* `MMFFGetMoleculeForceField` does by default.
|
|
1686
|
+
*/
|
|
1687
|
+
export function mmff94_energy_breakdown_from_coords_json_with_options(mol: MolHandle, coords_json: string, ignore_interfrag_interactions: boolean): string;
|
|
1688
|
+
|
|
1678
1689
|
/**
|
|
1679
1690
|
* Computes energy on an internally generated conformer.
|
|
1680
1691
|
* `MolHandle` stores topology only; coordinates previously read from PDB/XYZ
|
|
@@ -2024,6 +2035,20 @@ export function normalize_cxsmiles(s: string): string;
|
|
|
2024
2035
|
*/
|
|
2025
2036
|
export function normalize_reaction_smiles(rxn_smiles: string): string;
|
|
2026
2037
|
|
|
2038
|
+
/**
|
|
2039
|
+
* Apply one bounded metadata edit without changing atom ownership or linkage
|
|
2040
|
+
* topology. Returns the same tagged envelope as validation.
|
|
2041
|
+
*/
|
|
2042
|
+
export function nucleic_acid_apply_json_command(document_json: string, command_json: string): string;
|
|
2043
|
+
|
|
2044
|
+
/**
|
|
2045
|
+
* Validate and normalize a bounded `chematic.nucleic-acid.v1` document.
|
|
2046
|
+
*
|
|
2047
|
+
* Returns a stable JSON envelope with either `ok: true` and the normalized
|
|
2048
|
+
* document or `ok: false` and a typed error category.
|
|
2049
|
+
*/
|
|
2050
|
+
export function nucleic_acid_validate_json(document_json: string): string;
|
|
2051
|
+
|
|
2027
2052
|
/**
|
|
2028
2053
|
* Parse an OpenDX (APBS scalar-field subset) file and return its full
|
|
2029
2054
|
* [`chematic_mol::VolumetricGrid`] as JSON (same shape as
|
|
@@ -3196,6 +3221,7 @@ export interface InitOutput {
|
|
|
3196
3221
|
readonly mmff94_charges_json: (a: number) => [number, number];
|
|
3197
3222
|
readonly mmff94_charges_typed_json: (a: number) => [number, number];
|
|
3198
3223
|
readonly mmff94_energy_breakdown_from_coords_json: (a: number, b: number, c: number) => [number, number];
|
|
3224
|
+
readonly mmff94_energy_breakdown_from_coords_json_with_options: (a: number, b: number, c: number, d: number) => [number, number];
|
|
3199
3225
|
readonly mmff94_energy_breakdown_json: (a: number) => [number, number];
|
|
3200
3226
|
readonly mmff94_partial_charges_json: (a: number) => [number, number];
|
|
3201
3227
|
readonly mmp_pairs_json: (a: number, b: number) => [number, number, number, number];
|
|
@@ -3312,6 +3338,8 @@ export interface InitOutput {
|
|
|
3312
3338
|
readonly neutralize_charges: (a: number) => number;
|
|
3313
3339
|
readonly normalize_cxsmiles: (a: number, b: number) => [number, number, number, number];
|
|
3314
3340
|
readonly normalize_reaction_smiles: (a: number, b: number) => [number, number, number, number];
|
|
3341
|
+
readonly nucleic_acid_apply_json_command: (a: number, b: number, c: number, d: number) => [number, number];
|
|
3342
|
+
readonly nucleic_acid_validate_json: (a: number, b: number) => [number, number];
|
|
3315
3343
|
readonly opendx_grid_json: (a: number, b: number) => [number, number, number, number];
|
|
3316
3344
|
readonly opendx_shape_u32: (a: number, b: number) => [number, number, number];
|
|
3317
3345
|
readonly opendx_values_f64: (a: number, b: number) => [number, number, number];
|
package/chematic_wasm.js
CHANGED
|
@@ -1889,11 +1889,14 @@ export function chematic_version() {
|
|
|
1889
1889
|
* CIP stereo assignments via the accurate hierarchical-digraph engine, as a JSON
|
|
1890
1890
|
* array of `{atomIdx, cipCode}` objects -- same shape as [`cip_assignments_json`],
|
|
1891
1891
|
* but merges the accurate engine's tetrahedral R/S (~99.6% oracle-stable agreement,
|
|
1892
|
-
* see `docs/rfcs/cip_accurate_rfc.md`)
|
|
1893
|
-
*
|
|
1892
|
+
* see `docs/rfcs/cip_accurate_rfc.md`), E/Z ranked by the same engine and legacy's
|
|
1893
|
+
* allene answers. Atoms it can't resolve are omitted here -- see
|
|
1894
1894
|
* [`cip_unresolved_json`] -- never a silently-guessed label. A phosphorus on an
|
|
1895
1895
|
* unsaturated ring (cyclophosphazene) gets RDKit's CIPLabeler label, which flips
|
|
1896
1896
|
* with the ring's Kekulé spelling; its object carries `"kekuleDependent": true`.
|
|
1897
|
+
* A ring centre with three single bonds and a lone pair (bridgehead amine)
|
|
1898
|
+
* gets RDKit's label for the parsed SMILES spelling and carries
|
|
1899
|
+
* `"spellingDependent": true`.
|
|
1897
1900
|
* Returns `"null"` on an internal engine error (budget-independent computations
|
|
1898
1901
|
* should not normally hit this).
|
|
1899
1902
|
* @param {MolHandle} mol
|
|
@@ -4226,6 +4229,32 @@ export function mmff94_energy_breakdown_from_coords_json(mol, coords_json) {
|
|
|
4226
4229
|
}
|
|
4227
4230
|
}
|
|
4228
4231
|
|
|
4232
|
+
/**
|
|
4233
|
+
* [`mmff94_energy_breakdown_from_coords_json`] with
|
|
4234
|
+
* `ignore_interfrag_interactions`: `true` leaves out van der Waals and
|
|
4235
|
+
* electrostatic pairs between disconnected fragments, as RDKit's
|
|
4236
|
+
* `MMFFGetMoleculeForceField` does by default.
|
|
4237
|
+
* @param {MolHandle} mol
|
|
4238
|
+
* @param {string} coords_json
|
|
4239
|
+
* @param {boolean} ignore_interfrag_interactions
|
|
4240
|
+
* @returns {string}
|
|
4241
|
+
*/
|
|
4242
|
+
export function mmff94_energy_breakdown_from_coords_json_with_options(mol, coords_json, ignore_interfrag_interactions) {
|
|
4243
|
+
let deferred2_0;
|
|
4244
|
+
let deferred2_1;
|
|
4245
|
+
try {
|
|
4246
|
+
_assertClass(mol, MolHandle);
|
|
4247
|
+
const ptr0 = passStringToWasm0(coords_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4248
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4249
|
+
const ret = wasm.mmff94_energy_breakdown_from_coords_json_with_options(mol.__wbg_ptr, ptr0, len0, ignore_interfrag_interactions);
|
|
4250
|
+
deferred2_0 = ret[0];
|
|
4251
|
+
deferred2_1 = ret[1];
|
|
4252
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
4253
|
+
} finally {
|
|
4254
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
4255
|
+
}
|
|
4256
|
+
}
|
|
4257
|
+
|
|
4229
4258
|
/**
|
|
4230
4259
|
* Computes energy on an internally generated conformer.
|
|
4231
4260
|
* `MolHandle` stores topology only; coordinates previously read from PDB/XYZ
|
|
@@ -5113,6 +5142,53 @@ export function normalize_reaction_smiles(rxn_smiles) {
|
|
|
5113
5142
|
}
|
|
5114
5143
|
}
|
|
5115
5144
|
|
|
5145
|
+
/**
|
|
5146
|
+
* Apply one bounded metadata edit without changing atom ownership or linkage
|
|
5147
|
+
* topology. Returns the same tagged envelope as validation.
|
|
5148
|
+
* @param {string} document_json
|
|
5149
|
+
* @param {string} command_json
|
|
5150
|
+
* @returns {string}
|
|
5151
|
+
*/
|
|
5152
|
+
export function nucleic_acid_apply_json_command(document_json, command_json) {
|
|
5153
|
+
let deferred3_0;
|
|
5154
|
+
let deferred3_1;
|
|
5155
|
+
try {
|
|
5156
|
+
const ptr0 = passStringToWasm0(document_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5157
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5158
|
+
const ptr1 = passStringToWasm0(command_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5159
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5160
|
+
const ret = wasm.nucleic_acid_apply_json_command(ptr0, len0, ptr1, len1);
|
|
5161
|
+
deferred3_0 = ret[0];
|
|
5162
|
+
deferred3_1 = ret[1];
|
|
5163
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5164
|
+
} finally {
|
|
5165
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
5166
|
+
}
|
|
5167
|
+
}
|
|
5168
|
+
|
|
5169
|
+
/**
|
|
5170
|
+
* Validate and normalize a bounded `chematic.nucleic-acid.v1` document.
|
|
5171
|
+
*
|
|
5172
|
+
* Returns a stable JSON envelope with either `ok: true` and the normalized
|
|
5173
|
+
* document or `ok: false` and a typed error category.
|
|
5174
|
+
* @param {string} document_json
|
|
5175
|
+
* @returns {string}
|
|
5176
|
+
*/
|
|
5177
|
+
export function nucleic_acid_validate_json(document_json) {
|
|
5178
|
+
let deferred2_0;
|
|
5179
|
+
let deferred2_1;
|
|
5180
|
+
try {
|
|
5181
|
+
const ptr0 = passStringToWasm0(document_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5182
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5183
|
+
const ret = wasm.nucleic_acid_validate_json(ptr0, len0);
|
|
5184
|
+
deferred2_0 = ret[0];
|
|
5185
|
+
deferred2_1 = ret[1];
|
|
5186
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5187
|
+
} finally {
|
|
5188
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
5189
|
+
}
|
|
5190
|
+
}
|
|
5191
|
+
|
|
5116
5192
|
/**
|
|
5117
5193
|
* Parse an OpenDX (APBS scalar-field subset) file and return its full
|
|
5118
5194
|
* [`chematic_mol::VolumetricGrid`] as JSON (same shape as
|
package/chematic_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"Kentaro Tanabe (kent-tokyo) <kent-tokyo@users.noreply.github.com>"
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for chematic — use chematic from JavaScript/TypeScript",
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.37",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|