Registry / data / reaction-network

reaction-network

JSON →
library8.3.0pypypiunverified

Reaction-network is a Python package (version 8.3.0) for synthesis planning and predicting chemical reaction pathways in inorganic materials synthesis. It focuses on representing and analyzing chemical reactions, materials, and their relationships within a network structure. The library has a regular release cadence, with major versions introducing significant architectural changes.

pip install reaction-network
INSTALL
IMPORT
SIG · REACTION-NETWORK
R
reaction-network
datapythonv8.3.0
Install
46.4s avg
Import
—
Disk
1188MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
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
musl
py 3.10–3.910 runs
build_error
glibc
py 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.
fix
Replace 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.
fix
When 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.
fix
Install 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`.
fix
Review 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).
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
reaction-network — pip install reaction-network · libregistry