Quantitative Ring Complexity Index
Project description
QRCI
A Quantitative Ring Complexity Index for Profiling Ring Topology and Chemical Diversity
$\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}$
- TRS (Total Ring Size): Sum of all ring sizes.
- $N_{\mathrm{ra}}$: Total number of atoms in all rings.
- $N_{\mathrm{r}}$: Total number of rings
- $N_{\mathrm{fr}}$ (Fused Rings): Count of rings sharing atoms or bonds.
- $N_{\mathrm{ta}}$: Total number of atoms
- $N_{\mathrm{mr}}$: total number of macrocycles
- $W_{m}$: Weight for macrocycle descriptors.
- $W_{i}$: Weight for topological descriptors.
- $D_{i}$: Topological ring diversity descriptor.
Ring Complexity Index
$RCI=\frac{TRS}{nRingAtoms}$
where TRS is the total ring size and $nRingAtoms$ is the number of atoms belonging to a ring.
Ref: Gasteiger, J., & 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
Requirements
Python==3.13.2
rdkit==2025.03.2
scipy==1.15.1
QRCI Calculation
from QRCI.QRCI import QRCICalculator, get_QRCIproperties
from QRCI.RCI import RCICalculator
qrci_calc = QRCICalculator(weights='mean')
score_mean = qrci_calc('C1=CCOCc2cc(ccc2OCCN2CCCC2)Nc2nccc(n2)-c2cccc(c2)COC1')
print(f"QRCI(default/mean weights): {score_mean:.4f}")
#QRCI(default/mean weights): 4.0330
***************************************************************************************
mol = Chem.MolFromSmiles('C1=CCOCc2cc(ccc2OCCN2CCCC2)Nc2nccc(n2)-c2cccc(c2)COC1')
props = get_qrci_properties(mol)
print(props)
#QRCIproperties(nAromHetero=1, nAromCarbo=2, nAliHetero=2, nAliCarbo=0, nSatHetero=1, nSatCarbo=0, nMacrocycles=1, TRS=41, nRingAtom=32, nFusedRing=4, SF=1.0857142857142856)
Ring Descriptors Calculation
from QRCI.ring_descriptors import (
get_num_stereocenters,
get_num_macrocycles,
calculate_number_of_heteroatoms,
count_ring_atoms,
calculate_heteroatom_ratio,
calculate_nIR,
calculate_nFR,
calculate_TRS,
calculate_Rperim,
calculate_nrs,
calculate_cyclomatic_number,
calculate_nnrs,
calculate_mcd,
calculate_ring_fusion_density,
Calc_ARR,
Calc_Ar_Alk_balance,
calculate_heterorings_ratio,
)
#calculate ring descriptors
ring_descriptors = {
"num_stereocenters": get_num_stereocenters(mol),
"num_macrocycles": get_num_macrocycles(mol),
"num_heteroatoms": calculate_number_of_heteroatoms(mol),
"num_ring_atoms": count_ring_atoms(mol),
"heteroatom_ratio": calculate_heteroatom_ratio(mol),
"nIR": calculate_nIR(mol),
"nFR": calculate_nFR(mol),
"TRS": calculate_TRS(mol),
"Rperim": calculate_Rperim(mol),
"nRS": calculate_nrs(mol),
"cyclomatic_number": calculate_cyclomatic_number(mol),
"nNRS": calculate_nnrs(mol),
"mcd": calculate_mcd(mol),
"ring_fusion_density": calculate_ring_fusion_density(mol),
"ARR": Calc_ARR(mol),
"Ar_Alk_balance": Calc_Ar_Alk_balance(mol),
"heterorings_ratio": calculate_heterorings_ratio(mol),
}
for k, v in ring_descriptors.items():
print(f"{k}: {v}")
#num_stereocenters: 0
#num_macrocycles: 1
#num_heteroatoms: 7
#num_ring_atoms: 32
#heteroatom_ratio: 0.2
#nIR: 1
#nFR: 4
#TRS: 41
#Rperim: 41
#nRS: 2
#cyclomatic_number: 5
#nNRS: 0.4
#mcd: 0.9142857142857143
#ring_fusion_density: 0.2
#ARR: 0.4615
#Ar_Alk_balance: 6
#heterorings_ratio: 0.6
License
Code is released under MIT LICENSE.
Cite
- 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.
- 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
- Krzyzanowski, A., Pahl, A., Grigalunas, M., & 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
- 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 This content is a preprint and has not been peer-reviewed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qrci-0.1.5.tar.gz.
File metadata
- Download URL: qrci-0.1.5.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cf1976b1c91263495bcd059bbeddcc9f079de9a480f8646c56d360e995d673a
|
|
| MD5 |
418fe88b489e57ba6e2d7229dfe09b73
|
|
| BLAKE2b-256 |
7c3a9fe71c2c12212c0ea69d8ce7885ec2b5ee4dab5621abbdaa615c07560c38
|
File details
Details for the file qrci-0.1.5-py3-none-any.whl.
File metadata
- Download URL: qrci-0.1.5-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5170dbe64a6e99b2373e60a49efeaa9a439ffff116afde33e9eca67fa7bcdae
|
|
| MD5 |
5b4a7dffd7bd871729f64323969295a6
|
|
| BLAKE2b-256 |
d1d1685425263768989d0b8c1d78cd0a5e661116575dc6c5dbbe0a3aae64c668
|