{"id":30204363,"url":"https://github.com/aspirincode/qrci","last_synced_at":"2025-08-13T12:42:16.599Z","repository":{"id":288922026,"uuid":"910833619","full_name":"AspirinCode/QRCI","owner":"AspirinCode","description":"A Quantitative Ring Complexity Index for Profiling Ring Topology and Chemical Diversity","archived":false,"fork":false,"pushed_at":"2025-06-24T07:14:11.000Z","size":12694,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T21:17:53.699Z","etag":null,"topics":["chemical-space","molecular-design","molecular-diversity","molecular-optimization","qrci","ring","ring-systems"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/qrci","language":"Jupyter Notebook","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/AspirinCode.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-01T15:18:09.000Z","updated_at":"2025-06-24T07:14:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"999e03f8-66ea-4656-a775-e8cc4cd29f81","html_url":"https://github.com/AspirinCode/QRCI","commit_stats":null,"previous_names":["aspirincode/qrci"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AspirinCode/QRCI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AspirinCode%2FQRCI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AspirinCode%2FQRCI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AspirinCode%2FQRCI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AspirinCode%2FQRCI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AspirinCode","download_url":"https://codeload.github.com/AspirinCode/QRCI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AspirinCode%2FQRCI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270243107,"owners_count":24551626,"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-08-13T02:00:09.904Z","response_time":66,"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":["chemical-space","molecular-design","molecular-diversity","molecular-optimization","qrci","ring","ring-systems"],"created_at":"2025-08-13T12:42:14.699Z","updated_at":"2025-08-13T12:42:16.516Z","avatar_url":"https://github.com/AspirinCode.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](https://github.com/AspirinCode/QRCI)\n[![ChemRxiv2025](https://img.shields.io/badge/ChemRxiv-10.26434%2Fchemrxiv--2025--mlqwl--v2-green)](https://doi.org/10.26434/chemrxiv-2025-mlqwl-v2)\n[![PyPI](https://img.shields.io/badge/PyPI-cyan)](https://pypi.org/project/qrci)\n\n# QRCI\n\n**A Quantitative Ring Complexity Index for Profiling Ring Topology and Chemical Diversity** \n\n![QRCI](https://github.com/AspirinCode/qrci/blob/main/figures/qrci_cover.png)\n\n### Quantitative Ring Complexity Index\n\n$\\mathrm{QRCI}=\\frac{\\mathrm{TRS}}{N_{\\mathrm{ra}}}\\left(1+\\frac{N_{\\mathrm{fr}}}{N_{\\mathrm{r}}+1}\\right)+\\sum_{r}\\left[\\frac{360}{360-\\alpha_{\\mathrm{ideal}}(\\ell_{r})}\\cdot\\frac{1}{\\ell_{r}}\\cdot\\lambda_{M}(\\ell_{r})\\right]+\\frac{\\sum W_{i}\\cdot D_{i}}{\\sqrt{N_{\\mathrm{ra}}\\cdot\\mathrm{TRS}}}+\\frac{\\log(N_{\\mathrm{ta}})}{N_{\\mathrm{r}}+1}+W_{m}\\cdot\\frac{N_{\\mathrm{mr}}}{N_{\\mathrm{r}}+1}$  \n\n* **TRS** (Total Ring Size): Sum of all ring sizes.\n* **$N_{\\mathrm{ra}}$**: Total number of atoms in all rings.\n* **$N_{\\mathrm{r}}$**: Total number of rings\n* **$N_{\\mathrm{fr}}$** (Fused Rings): Count of rings sharing atoms or bonds.\n* **$N_{\\mathrm{ta}}$**: Total number of atoms\n* **$N_{\\mathrm{mr}}$**: total number of macrocycles\n* **$W_{m}$**: Weight for macrocycle descriptors.\n* **$W_{i}$**: Weight for topological descriptors.\n* **$D_{i}$**: Topological ring diversity descriptor.\n\n\n### Ring Complexity Index\n\n$\\mathrm{RCI}(R)=\\mathrm{CR}(R)=\\frac{\\mathrm{SREL}(R)}{\\mathrm{SEL}(R)}$  \n$\\mathrm{SREL}(R)$ counts the total number of atom participations across all rings, including duplicate counts if atoms belong to multiple rings. $\\mathrm{SEL}(R)$ is the number of unique atoms that appear in at least one ring.  \n**CR** (Complexity Ratio) of ring systems **R**, **CR(R)** measures how much ring overlap exists. Higher **CR(R)** indicates more shared atoms between rings, hence greater complexity.\n\n\n$RCI=\\frac{TRS}{nRingAtoms}$  \nwhere TRS is the total ring size and $nRingAtoms$ is the number of atoms belonging to a ring.\nRef: Gasteiger, J., \u0026 Jochum, C. (1979). An Algorithm for the Perception of Synthetically Important Rings. Journal of Chemical Information and Computer Sciences, 19(1), 43–48. https://doi.org/10.1021/ci60017a011  \n\n![RCI of Drug](https://github.com/AspirinCode/QRCI/blob/main/figures/drugbank5.1.13_apvd_r1r10w900_rci_histdist.png)\n**Distribution of RCI for approved drugs of DrugBank**\n\n## Requirements\n```python\nPython==3.13.2\nrdkit==2025.03.2\nscipy==1.15.1\n```\n\n\n## How to install the tool\n\nQRCI can be installed from pypi ([https://pypi.org/project/qrci](https://pypi.org/project/qrci)).\n\n```python\npip install qrci\n```\n\n### Usage\n\n```python\nfrom QRCI.QRCI import QRCICalculator, get_QRCIproperties\nfrom QRCI.RCI import RCICalculator\n\nqrci_calc = QRCICalculator(weights='mean')\nscore_mean = qrci_calc('C1=CCOCc2cc(ccc2OCCN2CCCC2)Nc2nccc(n2)-c2cccc(c2)COC1')\nprint(f\"QRCI(default/mean weights): {score_mean:.4f}\")\n#QRCI(default/mean weights): 4.0330\n\n***************************************************************************************\nmol = Chem.MolFromSmiles('C1=CCOCc2cc(ccc2OCCN2CCCC2)Nc2nccc(n2)-c2cccc(c2)COC1')\nprops = get_qrci_properties(mol)\nprint(props)\n#QRCIproperties(nAromHetero=1, nAromCarbo=2, nAliHetero=2, nAliCarbo=0, nSatHetero=1, nSatCarbo=0, nMacrocycles=1, TRS=41, nRingAtom=32, nFusedRing=4, SF=1.0857142857142856)\n```\n\n## Data\n\n* [DrugBank](https://go.drugbank.com/)  \n* [iPPI-DB](https://ippidb.pasteur.fr/)  \n* [COCONUT: the COlleCtion of Open NatUral producTs](https://coconut.naturalproducts.net/)  \n* [ChEMBL35](https://www.ebi.ac.uk/chembl/)\n* [PubChem](https://pubchem.ncbi.nlm.nih.gov/)  \n\n\n### Molecular Standardization\n\nhttps://www.rdkit.org/docs/source/rdkit.Chem.MolStandardize.rdMolStandardize.html\n\nhttps://github.com/rdkit/rdkit/blob/master/Docs/Notebooks/MolStandardize.ipynb\n\n\n\n## QRCI calculation\n[QRCI/QRCI_calculate_v1.1.ipynb](https://github.com/AspirinCode/QRCI/blob/main/QRCI/QRCI_calculate_v1.1.ipynb)  \n\nExample:[Pacritinib](https://go.drugbank.com/drugs/DB11697)  \n\n\n```python\nqrci_calc = QRCICalculator(weights='mean')\nscore_mean = qrci_calc('C1=CCOCc2cc(ccc2OCCN2CCCC2)Nc2nccc(n2)-c2cccc(c2)COC1')\nprint(f\"QRCI(default/mean weights): {score_mean:.4f}\")\n#QRCI(default/mean weights): 4.0330\n\n***************************************************************************************\nmol = Chem.MolFromSmiles('C1=CCOCc2cc(ccc2OCCN2CCCC2)Nc2nccc(n2)-c2cccc(c2)COC1')\nprops = get_qrci_properties(mol)\nprint(props)\n#QRCIproperties(nAromHetero=1, nAromCarbo=2, nAliHetero=2, nAliCarbo=0, nSatHetero=1, nSatCarbo=0, nMacrocycles=1)\n\n```\n\n![RCI of Drug](https://github.com/AspirinCode/QRCI/blob/main/figures/drugbank5.1.13_apvd_r1r10w900_qrci_histdist.png)\n**Distribution of QRCI for approved drugs of DrugBank**\n\n## Analysis\n\n### Spacial Score\n\n```python\nrdkit.Chem.SpacialScore.SPS(mol, normalize=True)\n```\n\nhttps://rdkit.org/docs/source/rdkit.Chem.SpacialScore.html  \n\nhttps://github.com/frog2000/Spacial-Score  \n\n\n### SAscore\n\n```python\n#Calculating SAscore\nimport sascorer\nsascore = sascorer.calculateScore()\n```\n\nhttps://greglandrum.github.io/rdkit-blog/posts/2023-12-01-using_sascore_and_npscore.html\n\n\n### QED\n\n```python\nfrom rdkit import Chem\nfrom rdkit.Chem import QED\n\nsmiles = \"C=CCN1CC(C(=O)N(CCCN(C)C)C(=O)NCC)C[C@@H]2c3cccc4[nH]cc(c34)C[C@H]21\"\nmol = Chem.MolFromSmiles(smiles)\n\nqed_score = QED.qed(mol)\nprint(f\"QED Score: {qed_score:.3f}\")\n#QED Score: 0.605\n```\n\nhttps://www.rdkit.org/docs/source/rdkit.Chem.QED.html#module-rdkit.Chem.QED\n\n\n### QEPPI\nquantitative estimate of protein-protein interaction targeting drug-likeness  \n\n```python\n#Calculates QEPPI\nq = ppi.QEPPI_Calculator()\nprint(\"QEPPI.model LOADING...\")\nq.load(\"./QEPPI/QEPPI.model\")\n\nsmiles = \"C=CCN1CC(C(=O)N(CCCN(C)C)C(=O)NCC)C[C@@H]2c3cccc4[nH]cc(c34)C[C@H]21\"\nmol = Chem.MolFromSmiles(smiles)\nprint(q.qeppi(mol))\n```\n\nhttps://github.com/ohuelab/QEPPI  \n\n\n\n### Others\n\n**Drug Data From the ChEMBL**\n\nhttps://github.com/PatWalters/practical_cheminformatics_tutorials/tree/main/misc\n\n![RCI/QRCI of Drugs by Era](https://github.com/AspirinCode/QRCI/blob/main/figures/drug2025_by_year_rci_qrci_Trend_1year_dist.png)\n**Trend of RCl/QRCl Over Time (approved drugs of ChEMBL 35)**\n\n## License\nCode is released under MIT LICENSE.\n\n\n## Cite\n\n* Gasteiger, J. and Jochum, C., 1979. An algorithm for the perception of synthetically important rings. Journal of Chemical Information and Computer Sciences, 19(1), pp.43-48.\n* Ertl, P., Schuffenhauer, A. Estimation of synthetic accessibility score of drug-like molecules based on molecular complexity and fragment contributions. J Cheminform 1, 8 (2009). https://doi.org/10.1186/1758-2946-1-8\n* Krzyzanowski, A., Pahl, A., Grigalunas, M., \u0026 Waldmann, H. (2023). Spacial Score─A Comprehensive Topological Indicator for Small-Molecule Complexity. Journal of medicinal chemistry, 66(18), 12739–12750. https://doi.org/10.1021/acs.jmedchem.3c00689\n* Wang J, Xu K, Ma T, Zhang X, Ma P, Li  C, et al. A Quantitative Ring Complexity Index for Profiling Ring Topology and Chemical Diversity. ChemRxiv. 2025; doi:[10.26434/chemrxiv-2025-mlqwl-v2](https://doi.org/10.26434/chemrxiv-2025-mlqwl-v2)  This content is a preprint and has not been peer-reviewed.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspirincode%2Fqrci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faspirincode%2Fqrci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspirincode%2Fqrci/lists"}