@kent-tokyo/chematic 1.2.1 → 1.2.3

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 CHANGED
@@ -4,9 +4,10 @@ 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.2.1. The binding keeps bounded parsing,
8
- typed failures, and opt-in `embed_pipeline_v2_json`; 3D/MMFF94 behavior remains
9
- Experimental and is not a claim of full RDKit parity.
7
+ Use the [binding guide](../../docs/reference/language-bindings.md) for
8
+ data and error conventions and the [format matrix](../../docs/reference/format-capabilities.md)
9
+ for supported readers and writers. See [Cleanup migration](../../docs/reference/cleanup-migration.md)
10
+ for refusal codes in the unreleased source.
10
11
 
11
12
  ## Installation
12
13
 
@@ -16,52 +17,13 @@ npm install @kent-tokyo/chematic
16
17
 
17
18
  ## Features
18
19
 
19
- - Parse SMILES strings into molecule handles
20
- - Molecular descriptors: MW, TPSA, LogP, Fsp3, QED, exact mass, rotatable bonds, HBD/HBA, aromatic ring count, Labute ASA
21
- - Drug-likeness filters: Lipinski, Veber, Egan, REOS, Ghose, PAINS, and Brenk
22
- - EState indices (Hall & Kier 1991): per-atom values, sum/max/min
23
- - Gasteiger-Marsili PEOE partial charges: per-heavy-atom charges
24
- - VSA descriptors: SlogP_VSA (×12), SMR_VSA (×10), PEOE_VSA (×14)
25
- - SA score: synthetic accessibility estimate [1, 10]
26
- - Functional group identification (Ertl 2017 IFG)
27
- - Canonical SMILES generation
28
- - Separately named RDKit 2026.03.1 compatibility bindings for SMARTS/PDB,
29
- format readers, Murcko/stereo/hash/Morgan inspection, bounded alignment,
30
- seeded ETKDG, and distance bounds
31
- - ECFP4/6, AtomPair, Torsion, path, and RDKit-compatible RDK fingerprints
32
- with Tanimoto similarity
33
- - BRICS fragment count
34
- - SDF/MOL block parsing, including bounded resumable `sdf_records_batch_json`,
35
- `xyz_frames_batch_json`, and `extxyz_frames_batch_json` manifests with
36
- deterministic input indices and partial/complete status; bounded malformed
37
- XYZ frames are grouped inline as rejected records when a later count-line
38
- boundary is recoverable (core file-backed readers remain fail-stop)
39
- - Bounded topology parsing for CML (`mol_from_cml_strict` provides the opt-in
40
- non-empty, balanced, single-root boundary), ChemicalJSON (`mol_from_cjson`), MolJSON,
41
- CDXML, MOL2, and PDB/mmCIF
42
- - Index-aligned wildcard/R-group inspection with
43
- `MolHandle.atom_pseudo_labels_json()` and immutable edits through
44
- `mol_with_atom_pseudo_label`; labels are bounded to `*`, `R`, and
45
- `R1..R9999`
46
- - Label-stable R-group decomposition through
47
- `rgroup_decompose_columns_json(smilesJson, coreSmarts)`. The returned JSON
48
- contains input-aligned `Core`, `R1`, `R2`, ... columns and uses `null` for
49
- unmatched molecules or substituents absent from a matched row. The legacy
50
- `rgroup_decompose_json` row API is unchanged.
51
- - PDBx/mmCIF, PQR, QCSchema JSON, ORCA input/output, Gaussian Cube, OpenDX,
52
- and LAMMPS data/dump I/O (JSON-based bindings; see `format_io.rs`)
53
- - Topological descriptors: Wiener index, Hall-Kier κ, χ connectivity indices, Bertz CT
54
- - Shape descriptors (with 3D coordinates): PMI, NPR, radius of gyration, asphericity
55
- - 2D SVG depiction with CPK colors and atom/bond highlighting
56
- - SVG grid layout for multiple molecules
57
- - Reaction SMILES/SMIRKS parsing and transform
58
- (`run_reactants_checked` includes typed native and RDKit-profile rejection
59
- diagnostics without returning rejected products as successes)
60
- - Add/remove explicit hydrogens
61
- - `embed_pipeline_v2_json`: torsion-knowledge-aware 3D embedding + stereo
62
- verification/repair + policy-gated force field, mirroring the Python
63
- `Mol.embed_pipeline_v2()` binding — opt-in, not a default 3D API
64
- ([usage](#3d-embedding-embed_pipeline_v2_json))
20
+ - Parse SMILES and common molecule files, calculate descriptors and
21
+ fingerprints, search substructures, and draw SVG.
22
+ - Process documented SDF, XYZ and Extended XYZ batches with indexed results and
23
+ explicit partial status.
24
+ - Run bounded reaction, R-group and RDKit-compatible workflows.
25
+ - Use the opt-in [3D pipeline](#3d-embedding-embed_pipeline_v2_json) with
26
+ per-stage diagnostics.
65
27
 
66
28
  ## Usage
67
29
 
@@ -170,30 +132,6 @@ console.log(mol.formula()); // C6H6
170
132
  mol.free();
171
133
  ```
172
134
 
173
- ```js
174
- // Sprint Q: New descriptors (v0.1.15)
175
- console.log(mol.sa_score()); // synthetic accessibility [1,10]
176
- console.log(mol.labute_asa()); // Labute approx. surface area (Ų)
177
-
178
- // Gasteiger partial charges (per heavy atom)
179
- const charges = JSON.parse(gasteiger_charges_json(mol));
180
- console.log(charges); // [-0.08, 0.12, -0.43, ...]
181
-
182
- // Explicit RDKit-compatibility descriptor profile (kept separate from the
183
- // historical native get_descriptors_json() profile)
184
- const rdkitDescriptors = JSON.parse(get_rdkit_descriptors_json(mol));
185
- console.log(rdkitDescriptors.aromatic_ring_count);
186
-
187
- // VSA descriptor bins
188
- const slogpVsa = JSON.parse(slogp_vsa_json(mol));
189
- const smrVsa = JSON.parse(smr_vsa_json(mol));
190
- const peoeVsa = JSON.parse(peoe_vsa_json(mol));
191
-
192
- // Functional group identification
193
- const ifg = JSON.parse(identify_functional_groups(mol));
194
- console.log(ifg); // [{"atoms":[1,2,3],"types":"OC=O"}, ...]
195
- ```
196
-
197
135
  ### 3D embedding (`embed_pipeline_v2_json`)
198
136
 
199
137
  Opt-in — does not change behavior of any existing 3D API (`generate_coords`,