{"id":10192,"library":"reaction-network","title":"Reaction-network","description":"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.","status":"active","version":"8.3.0","language":"python","source_language":"en","source_url":"https://github.com/materialsintelligence/reaction-network","tags":["chemistry","materials science","synthesis planning","network analysis","inorganic chemistry","reaction pathways"],"install":[{"cmd":"pip install reaction-network","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core functionality for material representation.","package":"pymatgen","optional":false},{"reason":"For basic plotting capabilities.","package":"matplotlib","optional":false},{"reason":"For underlying graph and network structures.","package":"networkx","optional":false},{"reason":"For advanced network visualization (requires system-level graphviz install).","package":"graphviz","optional":true},{"reason":"For data manipulation and export (e.g., to CSV/Excel).","package":"pandas","optional":true}],"imports":[{"wrong":"from rxn_network import Reaction","symbol":"Reaction","correct":"from rxn_network import Reaction"}],"quickstart":{"code":"from reaction_network import Reaction, ReactionNetwork\n\n# Define reactions\nr1 = Reaction.from_string(\"A + B -> C\")\nr2 = Reaction.from_string(\"C + D -> E\")\nr3 = Reaction.from_string(\"A + D -> F\") # A side reaction\n\n# Create a network\nrn = ReactionNetwork([r1, r2, r3])\n\n# Print materials and reactions\nprint(f\"Materials: {rn.materials}\")\nprint(f\"Reactions: {rn.reactions}\")\n\n# To plot the network (requires graphviz Python package and system executable)\n# rn.plot(filename=\"reaction_network.png\", fmt=\"png\")","lang":"python","description":"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."},"warnings":[{"fix":"Replace calls to `plot_reaction_network(my_network, ...)` with `my_network.plot(...)`.","message":"The 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.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"When creating a `ReactionEntryGenerator`, instantiate `ReactionGenerationConfig` first and pass it: `config = ReactionGenerationConfig(...); generator = ReactionEntryGenerator(config)`.","message":"The `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.","severity":"breaking","affected_versions":">=8.0.0"},{"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).","message":"For 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.","severity":"gotcha","affected_versions":"All versions with plotting"},{"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).","message":"Version 8.0.0 introduced stricter parsing rules for reaction strings, affecting `Reaction.from_string` and `ReactionParser`. Previously accepted formats might now raise `ParseError`.","severity":"breaking","affected_versions":">=8.0.0"}],"env_vars":null,"search_vec":"'8.3.0':12 'analysi':61 'analyz':30 'architectur':53 'cadenc':47 'chang':54 'chemic':18,31 'chemistri':55,63 'focus':26 'inorgan':22,62 'introduc':51 'librari':42 'major':49 'materi':23,33,56 'network':3,6,39,60 'packag':10 'pathway':20,65 'plan':15,59 'predict':17 'python':9 'reaction':2,5,19,32,64 'reaction-network':1,4 'regular':45 'relationship':36 'releas':46 'repres':28 'scienc':57 'signific':52 'structur':40 'synthesi':14,24,58 'version':11,50 'within':37","created_at":"2026-04-17T01:22:50.626334+00:00","updated_at":"2026-04-17T01:22:50.626334+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'Reaction' from 'rxn_network' (/tmp/tmpg0zh7krh/venv/lib/python3.12/site-packages/rxn_network/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"8.3.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://materialsproject.github.io/reaction-network/","github":"https://github.com/materialsproject/reaction-network","docs":"https://materialsproject.github.io/reaction-network/","changelog":"https://github.com/materialsproject/reaction-network/blob/main/docs/CHANGELOG.md","pypi":"https://pypi.org/project/reaction-network/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}