Thank you for your interest in contributing! chematic is a pure-Rust cheminformatics library — contributions of all sizes are welcome.
git clone https://github.com/kent-tokyo/chematic.git
cd chematic
cargo test --workspace --lib --quiet # 211 tests, all should pass
cargo clippy --workspace -- -D warningsNo C compiler, no Python, no external tools required for the core crates.
| Area | Crate | Difficulty |
|---|---|---|
| Bug fixes anywhere | any | Easy |
| New molecular descriptors | chematic-chem |
Easy — add a pub fn + tests |
| SMARTS pattern fixes | chematic-smarts |
Medium |
| New file formats | chematic-mol |
Medium |
| Force field parameters | chematic-ff |
Medium–Hard |
| Kekulization / aromaticity | chematic-core |
Hard |
Easiest entry point: chematic-core has zero external dependencies (no [dependencies] in Cargo.toml) and is pure safe Rust. Adding a helper to molecule.rs or a new descriptor to chematic-chem/src/descriptors.rs is a great first contribution.
feat/* new feature · fix/* bug fix · docs/* docs only · release/* version bump + CHANGELOG + tag
GitHub → Settings → Branches → Add rule for main:
- Require a pull request before merging
- Require status checks:
Test,Clippy,Format Check,Build Check - Do not allow bypassing the above settings
# Run tests for a single crate
cargo test -p chematic-chem --lib --quiet
# Run a specific test by name
cargo test -p chematic-chem --lib -- hba_count
# Check native InChI feature (requires C compiler)
cargo test -p chematic-inchi --features native-inchi --lib --quiet- No unsafe code —
#![forbid(unsafe_code)]is enforced in all crates, except thenative-inchifeature's C FFI boundary (crates/chematic-inchi/src/native/). - No external C/C++ deps by default (the
native-inchifeature is the only exception). - WASM-compatible — core crates must not use
std::fs, threads, or OS-specific APIs. - Justify unsafe/unwrap/expect/panic! outside
#[cfg(test)]with a// safe: ...comment explaining why it cannot fail (e.g.// safe: index bounds-checked above). - Format:
cargo fmt --workspacebefore committing. - Lints:
cargo clippy --workspace -- -D warningsmust pass (zero warnings).
- Add a
pub fn my_descriptor(mol: &Molecule) -> f64incrates/chematic-chem/src/descriptors.rs - Export it in
crates/chematic-chem/src/lib.rs - Add at least one
#[test]with a known value (e.g. benzene, aspirin) - If it belongs in the Python API, add it to
Molincrates/chematic-py/src/lib.rs
- Keep PRs focused — one feature or fix per PR.
- Include tests. New functions without tests will be asked to add them.
- Update
CHANGELOG.mdunder## [Unreleased]with a brief description. - CI must pass (
cargo test --workspace --lib --quiet+cargo clippy --workspace -- -D warnings).
Use the Bug report template. A minimal SMILES reproduction is the most helpful thing you can provide.
Open a Discussion — no need to file an issue for questions.