# MolFoundry

```{rubric} MolFoundry
```

**MolFoundry** is a Python library for rule-based graph transformation applied to
chemistry: build molecules from SMILES / InChI / molfiles, define reaction rules,
expand derivation graphs (reaction networks), and run rule-based stochastic
simulations. The Python API is a thin, typed surface over a vendored JavaScript
compute engine and a native InChI library.

```{code-cell} python
import molfoundry as mf

water = mf.smiles("O", "water")
print(water.exactMass, water.inchi)
```

::::{grid} 1 1 2 2
:gutter: 3

:::{grid-item-card} {octicon}`rocket` Getting started
:link: getting_started
:link-type: doc

Install the package and run your first snippets — create molecules and
inspect their properties.
:::

:::{grid-item-card} {octicon}`book` API reference
:link: api/index
:link-type: doc

Every public name re-exported from the top-level `molfoundry` package, generated
from the source with type hints.
:::

:::{grid-item-card} {octicon}`beaker` Examples
:link: examples
:link-type: doc

Full, runnable worked examples.
:::

:::{grid-item-card} {octicon}`light-bulb` Concepts
:link: api/index
:link-type: doc

Graphs, rules, derivation graphs, strategies, and stochastic simulation — the
building blocks of MolFoundry.
:::

::::

```{toctree}
:maxdepth: 2
:hidden:

getting_started
api/index
examples
```
