{"id":15118955,"url":"https://github.com/MolecularAI/route-distances","last_synced_at":"2025-09-28T01:31:33.446Z","repository":{"id":37595533,"uuid":"355475331","full_name":"MolecularAI/route-distances","owner":"MolecularAI","description":"Tools and routines to calculate distances between synthesis routes and to cluster them.","archived":false,"fork":false,"pushed_at":"2025-04-07T09:24:32.000Z","size":711,"stargazers_count":24,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-05T19:11:30.334Z","etag":null,"topics":["astrazeneca","cheminformatics","clustering"],"latest_commit_sha":null,"homepage":"https://molecularai.github.io/route-distances/","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/MolecularAI.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-07T08:50:13.000Z","updated_at":"2025-07-15T00:47:43.000Z","dependencies_parsed_at":"2024-08-21T09:10:12.264Z","dependency_job_id":null,"html_url":"https://github.com/MolecularAI/route-distances","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/MolecularAI/route-distances","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MolecularAI%2Froute-distances","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MolecularAI%2Froute-distances/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MolecularAI%2Froute-distances/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MolecularAI%2Froute-distances/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MolecularAI","download_url":"https://codeload.github.com/MolecularAI/route-distances/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MolecularAI%2Froute-distances/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276945446,"owners_count":25733094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["astrazeneca","cheminformatics","clustering"],"created_at":"2024-09-26T01:53:40.963Z","updated_at":"2025-09-28T01:31:28.439Z","avatar_url":"https://github.com/MolecularAI.png","language":"Python","funding_links":[],"categories":["Ranked by starred repositories"],"sub_categories":[],"readme":"# route-distances\n\n[![License](https://img.shields.io/github/license/MolecularAI/route-distances)](https://github.com/MolecularAI/route-distances/blob/master/LICENSE)\n[![Tests](https://github.com/MolecularAI/route-distances/workflows/tests/badge.svg)](https://github.com/MolecularAI/route-distances/actions?workflow=tests)\n[![codecov](https://codecov.io/gh/MolecularAI/route-distances/branch/master/graph/badge.svg)](https://codecov.io/gh/MolecularAI/route-distances)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black) \n\nThis repository contains tools and routines to calculate distances between synthesis routes and to cluster them.\n\nThis repository is mainly intended for developers and researchers. If you want a fully functional tool that is easy to use,\nplease consider looking into the *AiZynthFinder* project.\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n* Linux, Windows or macOS platforms are supported - as long as the dependencies are supported on these platforms.\n\n* You have installed [anaconda](https://www.anaconda.com/) or [miniconda](https://docs.conda.io/en/latest/miniconda.html) with python 3.9 to 3.11\n\nThe tool has been developed on a Linux platform, but the software has been tested on Windows 10 and macOS Catalina.\n\n## Installation\n\n### For users\n\nSetup your python environment and then run\n\n    pip install route-distances\n\n\n### For developers\n\nFirst clone the repository using Git.\n\nThen execute the following commands in the root of the repository \n\n    conda env create -f conda-env.yml\n    conda activate routes-env\n    poetry install\n    \nthe `route_distances` package is now installed in editable mode.\n\n## Usage\n\nThe tool will install the `cluster_aizynth_output` that is used\nto calculate distances and clusters for AiZynthFinder output\n\n    cluster_aizynth_output --files finder_output1.hdf5 finder_output2.hdf5 --output finder_distances.hdf5 --nclusters 0 --model ted\n    \nThis will perform TED calculations and add a column `distance_matrix` with the distances and column `cluster_labels` with the cluster labels for each route to the output file.\n\n\nAn ML model for fast predictions can be found here: [https://zenodo.org/record/4925903](https://zenodo.org/record/4925903).\n\nThis can be used with the `cluster_aizynth_output` tool\n\n    cluster_aizynth_output --files finder_output1.hdf5 finder_output2.hdf5 --output finder_distances.hdf5 --nclusters 0 --model chembl_10k_route_distance_model.ckpt\n\nFor further details, please consult the [documentation](https://molecularai.github.io/route-distances/).\n\n\n## Development\n\n### Testing\n\nTests uses the ``pytest`` package, and is installed by `poetry`\n\nRun the tests using:\n\n    pytest -v\n\n    \n ### Documentation generation\n\nThe documentation is generated by Sphinx from hand-written tutorials and docstrings\n\nThe HTML documentation can be generated by\n\n    invoke build-docs\n\n## Contributing\n\nWe welcome contributions, in the form of issues or pull requests.\n\nIf you have a question or want to report a bug, please submit an issue.\n\n\nTo contribute with code to the project, follow these steps:\n\n1. Fork this repository.\n2. Create a branch: `git checkout -b \u003cbranch_name\u003e`.\n3. Make your changes and commit them: `git commit -m '\u003ccommit_message\u003e'`\n4. Push to the remote branch: `git push`\n5. Create the pull request.\n\nPlease use ``black`` package for formatting, and follow ``pep8`` style guide.\n\n\n## Contributors\n\n* Samuel Genheden\n\nThe contributors have limited time for support questions, but please do not hesitate to submit an issue (see above).\n\n## License\n\nThe software is licensed under the MIT license (see LICENSE file), and is free and provided as-is.\n\n## References\n\n1. Genheden S, Engkvist O, Bjerrum E (2021) Clustering of synthetic routes using tree edit distance. J. Chem. Inf. Model. 61:3899–3907 [https://doi.org/10.1021/acs.jcim.1c00232](https://doi.org/10.1021/acs.jcim.1c00232)\n2. Genheden S, Engkvist O, Bjerrum E (2022) Fast prediction of distances between synthetic routes with deep learning. Mach. Learn. Sci. Technol. 3:015018 [https://doi.org/10.1088/2632-2153/ac4a91](https://doi.org/10.1088/2632-2153/ac4a91)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMolecularAI%2Froute-distances","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMolecularAI%2Froute-distances","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMolecularAI%2Froute-distances/lists"}