Releases: HFooladi/sdfrust
Releases · HFooladi/sdfrust
v0.6.0
Full Changelog: v0.5.0...v0.6.0
v0.5.0
Full Changelog: v0.4.0...v0.5.0
v0.4.0 - Python Bindings
What's New
Python Bindings (sdfrust-python/ crate)
- PyO3-based Python bindings with full API coverage
PyAtom,PyBond,PyBondOrder,PyBondStereowrapper classesPyMoleculewith all properties and descriptor methods- SDF V2000/V3000 parsing and writing functions
- MOL2 parsing functions
- Memory-efficient streaming iterators (
iter_sdf_file,iter_mol2_file) - NumPy integration for coordinate arrays (
get_coords_array,set_coords_array) - 33 pytest tests covering all functionality
Installation
# From source (requires Rust toolchain)
cd sdfrust-python
pip install maturin
maturin develop --features numpyExample Usage
import sdfrust
# Parse molecules
mol = sdfrust.parse_sdf_file("molecule.sdf")
print(f"{mol.name}: MW={mol.molecular_weight():.2f}")
# NumPy integration
coords = mol.get_coords_array() # (N, 3) array
# Iterate over large files
for mol in sdfrust.iter_sdf_file("large.sdf"):
process(mol)Full Changelog: v0.3.0...v0.4.0