Install & Compatibility
Where this runs
tested against v8.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
build_error
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 46.4s · import 0.000s · 1126.4MB
1188MB installed
● package 1188MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Reaction
✓ from rxn_network import Reaction
✗ from rxn_network import Reaction
This quickstart demonstrates how to define basic chemical reactions from strings, combine them into a ReactionNetwork, and inspect its properties. It also includes commented-out code for plotting, highlighting the need for the optional Graphviz dependency.
from reaction_network import Reaction, ReactionNetwork
# Define reactions
r1 = Reaction.from_string("A + B -> C")
r2 = Reaction.from_string("C + D -> E")
r3 = Reaction.from_string("A + D -> F") # A side reaction
# Create a network
rn = ReactionNetwork([r1, r2, r3])
# Print materials and reactions
print(f"Materials: {rn.materials}")
print(f"Reactions: {rn.reactions}")
# To plot the network (requires graphviz Python package and system executable)
# rn.plot(filename="reaction_network.png", fmt="png")
Debug
Known issues
breakingThe top-level `plot_reaction_network` utility function has been removed in version 8.0.0. Network plotting is now a method of the `ReactionNetwork` object.fixReplace calls to `plot_reaction_network(my_network, ...)` with `my_network.plot(...)`.
affects: >=8.0.0
breakingThe `ReactionEntryGenerator` class constructor in v8.0.0+ now requires a `ReactionGenerationConfig` object as its primary argument. Direct instantiation without this config will raise an error.fixWhen creating a `ReactionEntryGenerator`, instantiate `ReactionGenerationConfig` first and pass it: `config = ReactionGenerationConfig(...); generator = ReactionEntryGenerator(config)`.
affects: >=8.0.0
gotchaFor plotting reaction networks using `ReactionNetwork.plot()`, both the Python `graphviz` package (`pip install graphviz`) and the system-level Graphviz executable must be installed. The Python package alone is insufficient for rendering.fixInstall the Python package (`pip install graphviz`) and the system package (e.g., `sudo apt install graphviz` on Debian/Ubuntu, `brew install graphviz` on macOS, or install from graphviz.org).
affects: All versions with plotting
breakingVersion 8.0.0 introduced stricter parsing rules for reaction strings, affecting `Reaction.from_string` and `ReactionParser`. Previously accepted formats might now raise `ParseError`.fixReview the documentation for the updated reaction string format and adjust existing strings to conform to the new rules (e.g., explicit phases, proper stoichiometry syntax).
affects: >=8.0.0
Upgrade
Version history
8.3.0latest on PyPI · released Mar 6, 2024
Audit
Dependencies
pymatgenrequiredCore functionality for material representation.
matplotlibrequiredFor basic plotting capabilities.
networkxrequiredFor underlying graph and network structures.
graphvizoptionalFor advanced network visualization (requires system-level graphviz install).
pandasoptionalFor data manipulation and export (e.g., to CSV/Excel).