This release is a pre-release and may not be stable for production use.
molcrafts-molrs
Python bindings for the molrs molecular modeling toolkit.
Install with pip install molcrafts-molrs and import molrs. Full docs:
https://docs.molcrafts.org/molrs/.
Install
pip install molcrafts-molrs
Requires Python 3.12+.
Quick start
import molrs
# SMILES → atomistic graph (class API under molrs.io)
mol = molrs.io.smiles.read_smiles("CCO").to_atomistic()
# 3D coordinates
from molrs.conformer import Conformer
mol, report = Conformer().generate(mol)
# Force field: typify → pairs → potentials
from molrs.ff.typifier import Mmff94Typifier
from molrs.ff.potential import intramolecular_pairs
from molrs.ff.compile import PotentialCompiler
typifier = Mmff94Typifier()
typed = typifier.typify(mol)
frame = typed.to_frame()
ff = typifier.forcefield() # a copy of exactly the types typify assigned
frame["pairs"] = intramolecular_pairs(frame, ff)
pots = PotentialCompiler(ff).compile(frame)
energy, forces = pots.evaluate(frame)
assert forces.shape == (frame["atoms"].n_rows, 3)
Package layout
The top level is the subsystems, plus the core data classes a user handles
directly (molrs.Frame is molrs.core.Frame: Frame,
Block, Trajectory, Box, MolGraph, Atomistic, CoarseGrain, the
entity classes, Element, Topology). Everything else has one path, named
after its Rust owner.
| Import | Owns |
|---|---|
molrs.core |
Frame, Block, Trajectory, frame metadata; Box and its Cell, neighbour search, regions, TriMesh, Trace; MolGraph, Atomistic, CoarseGrain and their live views, Element, Topology; Unit, Quantity, UnitPreset, UnitRegistry |
molrs.core.keys / .schema / .constants |
the column vocabulary, its specifications, and every physical and engine constant |
molrs.io |
Every file reader and writer: one door per format and direction, read_<fmt>(source) / write_<fmt>(sink, frame) (a source is a pathlib.Path, bytes or molrs.io.Text; a sink a pathlib.Path or a bytearray); each format's classes in its own submodule — the multi-frame <Fmt>Reader / <Fmt>Writer of io.pdb, io.xyz, io.gro, io.mol2, io.cif, io.sdf, io.dcd, io.trr, io.xtc, io.lammps, and the force-field reader / writer classes of io.lammps, io.gromacs, io.amber, io.openmm_xml; io.smiles, io.cgsmiles, io.mrec |
molrs.io.mrec |
*.mrec store pieces: MrecFile (per-section reads), streaming SequenceSchema, MrecWriter, MrecReader, ForceFieldSection, pack_mrec_zip, validation (a whole record is written by molrs.io.write_mrec) |
molrs.ff.* |
forcefield, potential, typifier, charge, ir, params, clpol_scaling |
molrs.optimize |
Lbfgs, OptimizationReport |
molrs.md |
Integrators and the MD driver |
molrs.compute |
One class per molrs::compute type, under its core name (flat): RDF, MSD, correlations, fits, spectra, order, clusters, … |
molrs.conformer |
3D generation |
molrs.perceive |
Rings, aromaticity, SMARTS, reactions |
molrs.builder |
Structure builders, site-graph assembly, Coarsener |
An analysis is configured when it is built and given its data when it
computes: Steinhardt(l=[6]) then .compute(...). The constructor takes
configuration only, every optional setting is None unless given (all
defaults live in the core; Msd.spec() lists them), and compute takes the
data as keyword arguments named after the core input's fields. Msd, Vacf
and Rdf are streams, as in the core: acc = Msd(max_lag).accumulator(),
acc.push(positions, dt=...) per frame, then acc.finish(). A result is a read-only object that the next compute accepts as is —
LinearFit(0.2, 0.8).compute(correlation=msd_result, channel=0).
Kernels take dt in the time unit of your trajectory, and time-valued
results come back in that unit. MSD needs unwrapped coordinates
(Unwrap produces them). VACF is the unbiased (C(\tau)) used for
Green–Kubo D and VDOS.
Development
maturin develop --release
pytest -q
Metadata
Release files for molcrafts-molrs-nightly 0.19.0.dev202610240809
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details |
| molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.12 | abi3 | macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) | Details |
Total release size: 42.1 MB
Release files / molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-win_amd64.whl
| Download URL | molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 11.3 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
23b91bcae5c8d8b537a7290f7483ad1dcf9acea9e06a9dbaae557ebbe1d69b8e
|
|
BLAKE2b-256 checksum How to use checksums |
6594d90141303683a756fb2224a273a428f191192635d464951f94ecfd25ada1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.9 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
72644b10c161e0e90c2f826cbdd2d5c16ef07ad9f77a7df704c9dd740b487df0
|
|
BLAKE2b-256 checksum How to use checksums |
2d11272009758d223561f2c8eb5db6766280699669f42e4440e0b7c59fb539ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 19.9 MB |
| Tags | CPython 3.12 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4bbb1d9ff3567acfaf721f747287a3c4ed451c0abd0b4726b79838fcf22e055d
|
|
BLAKE2b-256 checksum How to use checksums |
6d403fcaf59d4d5ae7a955132877a76c573d7c44837c13c42b7fbc4639060520
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for molcrafts-molrs-nightly 0.19.0.dev202610240809
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for molcrafts_molrs_nightly-0.19.0.dev202610240809-cp312-abi3-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.