{"id":37611023,"url":"https://github.com/brsynth/rpreactor","last_synced_at":"2026-01-16T10:20:58.915Z","repository":{"id":52167361,"uuid":"281716012","full_name":"brsynth/rpreactor","owner":"brsynth","description":"A command-line and python package to handle biochemical reaction rules.","archived":false,"fork":false,"pushed_at":"2021-05-18T08:56:20.000Z","size":315,"stargazers_count":5,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"stable","last_synced_at":"2025-09-09T20:14:18.030Z","etag":null,"topics":["biochemical-reactions","reaction-rules","retrorules"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brsynth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-22T15:34:07.000Z","updated_at":"2023-03-20T11:45:39.000Z","dependencies_parsed_at":"2022-09-24T14:34:40.446Z","dependency_job_id":null,"html_url":"https://github.com/brsynth/rpreactor","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/brsynth/rpreactor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpreactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpreactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpreactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpreactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brsynth","download_url":"https://codeload.github.com/brsynth/rpreactor/tar.gz/refs/heads/stable","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpreactor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biochemical-reactions","reaction-rules","retrorules"],"created_at":"2026-01-16T10:20:57.361Z","updated_at":"2026-01-16T10:20:58.578Z","avatar_url":"https://github.com/brsynth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Anaconda-Server Badge](https://anaconda.org/brsynth/rpreactor/badges/version.svg)](https://anaconda.org/brsynth/rpreactor)\n[![Anaconda-Server Badge](https://anaconda.org/brsynth/rpreactor/badges/license.svg)](https://anaconda.org/brsynth/rpreactor)\n\n# rpreactor\n\n**A command-line and python package to handle biochemical reaction rules.**\n\n*rpreactor* is designed to use reaction rules from [RetroRules](https://retrorules.org/), \nand to be at the core of more complex bioretrosynthesis tools such as [RetroPathRL](https://github.com/brsynth/RetroPathRL).\nIt relies extensively on [RDKit](https://rdkit.org/) to handle chemicals and reactions.\n\nPlease submit your questions or any new issue you may encounter with *rpreactor* using [GitHub's issue system](https://github.com/brsynth/RetroPathRL/issues).\n\nIf you are interested in *rpreactor* you may also be interested in:\n* [Reactor](https://chemaxon.com/products/reactor): ChemAxon's \"*A high performance virtual synthesis engine*\"\n* [ATLAS](https://lcsb-databases.epfl.ch/pathways/atlas/): \"*A repository of all possible biochemical reactions for synthetic biology and metabolic engineering studies*\" by our friends from the [LCSB](https://www.epfl.ch/labs/lcsb/)\n* [MINE](https://github.com/tyo-nu/MINE-Database): \"*Metabolic In silico Network Expansion (MINE) Database Construction and DB Logic*\" by our friends from the [Tyo Lab](https://tyolab.northwestern.edu/)\n\n## Installation\n\n**Important**: rpreactor works with Python \u003e=3.6 and was tested with rdkit 2020.03*.\n\nWe strongly recommend you to use [conda package manager](https://docs.conda.io/en/latest/), and to follow those steps: \n\n```bash\n# installation in a new conda environment \u003cmyenv\u003e\nconda create --name \u003cmyenv\u003e -c conda-forge -c brsynth rdkit=2020.03 rpreactor\nconda activate \u003cmyenv\u003e\n```\n\n```bash\n# installation in an already existing environment \u003cmyenv\u003e\nconda activate \u003cmyenv\u003e\nconda install -c conda-forge -c brsynth rdkit=2020.03 rpreactor\n``` \n\n## Usage\n\nFrom command line:\n```bash\nconda activate \u003cmyenv\u003e\npython -m rpreactor.cli --help\npython -m rpreactor.cli --with_hs true inline --inchi \"InChI=1/C3H6O3/c1-2(4)3(5)6/h2,4H,1H3,(H,5,6)\" --rsmarts \"([#8\u0026v2:1](-[#6\u0026v4:2](-[#6\u0026v4:3](-[#8\u0026v2:4]-[#1\u0026v1:5])=[#8\u0026v2:6])(-[#6\u0026v4:7](-[#1\u0026v1:8])(-[#1\u0026v1:9])-[#1\u0026v1:10])-[#1\u0026v1:11])-[#1\u0026v1:12])\u003e\u003e([#15\u0026v5](=[#8\u0026v2])(-[#8\u0026v2]-[#1\u0026v1])(-[#8\u0026v2]-[#1\u0026v1])-[#8\u0026v2:1]-[#6\u0026v4:2](-[#6\u0026v4:3](-[#8\u0026v2:4]-[#1\u0026v1:5])=[#8\u0026v2:6])(-[#6\u0026v4:7](-[#1\u0026v1:8])(-[#1\u0026v1:9])-[#1\u0026v1:10])-[#1\u0026v1:11].[#7\u0026v3](=[#6\u0026v4]1:[#7\u0026v3]:[#6\u0026v4](-[#8\u0026v2]-[#1\u0026v1]):[#6\u0026v4]2:[#7\u0026v3]:[#6\u0026v4](-[#1\u0026v1]):[#7\u0026v3](-[#6\u0026v4]3(-[#1\u0026v1])-[#8\u0026v2]-[#6\u0026v4](-[#6\u0026v4](-[#8\u0026v2]-[#15\u0026v5](=[#8\u0026v2])(-[#8\u0026v2]-[#1\u0026v1])-[#8\u0026v2]-[#15\u0026v5](-[#8\u0026v2]-[#1\u0026v1:12])(=[#8\u0026v2])-[#8\u0026v2]-[#1\u0026v1])(-[#1\u0026v1])-[#1\u0026v1])(-[#1\u0026v1])-[#6\u0026v4](-[#8\u0026v2]-[#1\u0026v1])(-[#1\u0026v1])-[#6\u0026v4]-3(-[#8\u0026v2]-[#1\u0026v1])-[#1\u0026v1]):[#6\u0026v4]:2:[#7\u0026v3]:1-[#1\u0026v1])-[#1\u0026v1])\"\n```\n\nFrom within a script:\n```python\nimport json\nimport rpreactor\n\ninchi = 'InChI=1/C3H6O3/c1-2(4)3(5)6/h2,4H,1H3,(H,5,6)'\nrsmarts = '([#8\u0026v2:1](-[#6\u0026v4:2](-[#6\u0026v4:3](-[#8\u0026v2:4]-[#1\u0026v1:5])=[#8\u0026v2:6])(-[#6\u0026v4:7](-[#1\u0026v1:8])(-[#1\u0026v1:9])-[#1\u0026v1:10])-[#1\u0026v1:11])-[#1\u0026v1:12])\u003e\u003e([#15\u0026v5](=[#8\u0026v2])(-[#8\u0026v2]-[#1\u0026v1])(-[#8\u0026v2]-[#1\u0026v1])-[#8\u0026v2:1]-[#6\u0026v4:2](-[#6\u0026v4:3](-[#8\u0026v2:4]-[#1\u0026v1:5])=[#8\u0026v2:6])(-[#6\u0026v4:7](-[#1\u0026v1:8])(-[#1\u0026v1:9])-[#1\u0026v1:10])-[#1\u0026v1:11].[#7\u0026v3](=[#6\u0026v4]1:[#7\u0026v3]:[#6\u0026v4](-[#8\u0026v2]-[#1\u0026v1]):[#6\u0026v4]2:[#7\u0026v3]:[#6\u0026v4](-[#1\u0026v1]):[#7\u0026v3](-[#6\u0026v4]3(-[#1\u0026v1])-[#8\u0026v2]-[#6\u0026v4](-[#6\u0026v4](-[#8\u0026v2]-[#15\u0026v5](=[#8\u0026v2])(-[#8\u0026v2]-[#1\u0026v1])-[#8\u0026v2]-[#15\u0026v5](-[#8\u0026v2]-[#1\u0026v1:12])(=[#8\u0026v2])-[#8\u0026v2]-[#1\u0026v1])(-[#1\u0026v1])-[#1\u0026v1])(-[#1\u0026v1])-[#6\u0026v4](-[#8\u0026v2]-[#1\u0026v1])(-[#1\u0026v1])-[#6\u0026v4]-3(-[#8\u0026v2]-[#1\u0026v1])-[#1\u0026v1]):[#6\u0026v4]:2:[#7\u0026v3]:1-[#1\u0026v1])-[#1\u0026v1])'\n\no = rpreactor.RuleBurner(rsmarts_list=[rsmarts], inchi_list=[inchi], with_hs=True)\no.compute()\nres = json.loads('[' + ', '.join(o._json) + ']')\n```\n\n## For developers\n\n### Development installation\n\nAfter a git clone:\n\n```bash\ncd \u003crepository\u003e\nconda env create -f environment.yml -n \u003cdev_env\u003e\nconda activate \u003cdev_env\u003e\nconda develop -n \u003cdev_env\u003e .\n```\n\nWarning: if you do not specify an environment name with `-n \u003cdev_env\u003e`, \nthen 'dev_rpreactor' will be used.\n\nTest your installation with:\n\n```bash\nconda activate \u003cdev_env\u003e\npython -m rpreactor.cli -h\n```\n\nTo uninstall:\n\n```bash\nconda deactivate\nconda env remove -n \u003cdev_env\u003e\n```\n\n### Test suite\n\n```bash\ncd \u003crepository\u003e\npython -m pytest --doctest-modules \n```\n\n### Build the documentation\n\nTo build a local Sphinx HTML documentation at `\u003crepository\u003e/docs/_build/html/index.html`:\n\n```\ncd \u003crepository\u003e/docs\nmake html\n```\n\n### Build and deployment\n\nThe process is automated with GitHub's Action.\n\nIf you want to check the build process locally:\n\n```bash\nCONDA_BLD_PATH=\u003crepository\u003e/conda-bld\nmkdir -p ${CONDA_BLD_PATH} \ncd \u003crepository\u003e\n\nconda env create -f recipe/conda_build_env.yaml -n \u003cbuild_env\u003e\nconda activate \u003cbuild_env\u003e\nconda build -c conda-forge --output-folder ${CONDA_BLD_PATH} recipe\n\nconda convert --platform osx-64 --platform linux-64 --platform win-64 --output-dir ${CONDA_BLD_PATH} ${CONDA_BLD_PATH}/*/rpreactor-*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsynth%2Frpreactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrsynth%2Frpreactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsynth%2Frpreactor/lists"}