⚠️ MolPy is under active development. The API is evolving rapidly and may change between minor versions.
MolPy is a modern, strongly typed, and extensible toolkit for molecular modeling. It provides a clean data model, flexible builders, explicit force-field typing, and lightweight analysis — a foundation designed for reproducible workflows and AI-assisted development.
pip install molcrafts-molpyFor development:
git clone https://github.com/MolCrafts/molpy.git
cd molpy
pip install -e ".[dev]"- Unified Data Model —
Frame/Block/Boxfor molecular structures - Explicit Topology —
Atom,Bond,Angle,Dihedralwith typed metadata - Force-Field Typing — rule-based, engine-agnostic typifiers (OPLS-AA, custom SMARTS/SMIRKS)
- Polymer Builders — automatic polymer assembly from BigSMILES/GBigSMILES/CGSmiles
- Linear, branched, and cyclic topologies
- Polydisperse systems with Schulz-Zimm, Poisson, Uniform, Flory-Schulz distributions
- Reaction-based crosslinking and network formation
- Chemistry Parsers — SMILES, BigSMILES, GBigSMILES, and CGSmiles support
- Adapter System — seamless integration with RDKit, LAMMPS, OpenMM, Packmol
- Reaction Framework — explicit chemical reactions with leaving groups
- Lightweight Analysis — composable compute operators
- Robust I/O — PDB, XYZ, LAMMPS DATA, JSON-based formats
- AI-Friendly APIs — predictable, strongly typed, minimal magic
Full documentation: https://molcrafts.github.io/molpy
WebGL-based visualization and editing.
Typed array structures, compute kernels, and fast builders (native + WASM).
pip install -e ".[dev]"
pre-commit install
pytest -qWe welcome issues and pull requests.
BSD-3-Clause — see LICENSE.
Built with ❤️ by MolCrafts.