Skip to content

MolCrafts/molpy

🚀 MolPy — A fast, clean, and composable toolkit for molecular modeling

Python License Docs CI

⚠️ 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.

🚀 Installation

pip install molcrafts-molpy

For development:

git clone https://github.com/MolCrafts/molpy.git
cd molpy
pip install -e ".[dev]"

✨ Features

  • Unified Data ModelFrame / Block / Box for molecular structures
  • Explicit TopologyAtom, Bond, Angle, Dihedral with 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

📚 Documentation

Full documentation: https://molcrafts.github.io/molpy


🌌 MolCrafts Ecosystem

MolVis — Interactive Molecular Visualization

WebGL-based visualization and editing.

MolRS — High-Performance Rust Backend

Typed array structures, compute kernels, and fast builders (native + WASM).


🤝 Contributing

pip install -e ".[dev]"
pre-commit install
pytest -q

We welcome issues and pull requests.


📄 License

BSD-3-Clause — see LICENSE.


Built with ❤️ by MolCrafts.

About

[WIP] A data structure used to describe molecules in computational chemistry, just like numpy in data science

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Languages