Open-source cheminformatics libraries for JavaScript. Isomorphic — works in Node.js and browsers.
| Package | Description | npm |
|---|---|---|
| @chemistry/common | Common data formats and interfaces (JMol, JNMol) | |
| @chemistry/elements | Periodic table — element properties, radii, colors | |
| @chemistry/formula | Chemical formula parsing, stringification, molecular weight | |
| @chemistry/math | Linear algebra — Vec3, Matrix3x3, Transform3D, Quaternion | |
| @chemistry/molecule | Molecule data structure, JNMol loading, SVG export | |
| @chemistry/space-groups | 230 crystallographic space groups with symmetry operations |
npm install @chemistry/elementsimport { ChemElements } from '@chemistry/elements';
const hydrogen = ChemElements.getById(1);
// { id: 1, symbol: "H", RCow: 0.37, RVdW: 1.2, maxBonds: 1, mass: 1.00794, name: "Hydrogen", ... }
const carbon = ChemElements.getBySymbol('C');
// { id: 6, symbol: "C", RCow: 0.77, RVdW: 1.7, maxBonds: 4, mass: 12.0107, name: "Carbon", ... }import { Formula } from '@chemistry/formula';
const parsed = Formula.parse('C2H5OH');
// { C: 2, H: 6, O: 1 }
const weight = Formula.convertToWeight(parsed);
// 46.069import { SpaceGroup } from '@chemistry/space-groups';
const sg = SpaceGroup.getById(225);
// { id: 225, hm: "F m -3 m", hs: "-F 4 2 3", o: 24, s: [...192 symmetry operations] }- Monorepo: npm workspaces
- Language: TypeScript 5.9, strict mode, ESM-only
- Testing: Vitest, 70% coverage threshold
- Linting: ESLint flat config + typescript-eslint + Prettier
- CI/CD: GitHub Actions — automated weekly releases
- Target: ES2020, isomorphic (Node.js 20+ & modern browsers)
npm install
npm run build
npm run verify # type-check + lint + format:check + test + build| Command | Description |
|---|---|
npm run verify |
Full validation pipeline |
npm run build |
Build all packages (dependency-ordered) |
npm run test |
Run unit tests |
npm run lint |
Lint source code |
npm run format |
Format with Prettier |
npm run format:check |
Check formatting |
npm run type-check |
TypeScript type checking |
npm run clean |
Remove dist and coverage |
MIT © Volodymyr Vreshch