A Python library for computing topological indices from SMILES using NetworkX
Project description
🧠 TopoIndex
TopoIndex is a Python library for computing topological indices of molecular and graph structures using NetworkX and RDKit. It supports input via SMILES strings and is designed for mathematical chemistry, cheminformatics, and graph theory applications.
📦 Features
- ✅ Wiener Index
- ✅ Zagreb Indices (First & Second)
- ✅ Hyper-Wiener Index
- ✅ Randic Index
- ✅ Balaban Index
- ✅ Eccentric Connectivity Index
- 📘 More indices coming soon!
🚀 Installation
Once released on PyPI:
pip install topoindex
For now (manual installation):
git clone https://github.com/avimallick/topoindex.git
cd topoindex
pip install .
⚠️ Requires
networkxandrdkit.
🧪 Example Usage
from topoindex import (
wiener_index,
first_zagreb_index,
second_zagreb_index,
hyper_wiener_index,
randic_index,
balaban_index,
eccentric_connectivity_index,
)
smiles = "CCO" # Ethanol
print("Wiener:", wiener_index(smiles))
print("Zagreb-1:", first_zagreb_index(smiles))
print("Zagreb-2:", second_zagreb_index(smiles))
print("Hyper-Wiener:", hyper_wiener_index(smiles))
print("Randic:", randic_index(smiles))
print("Balaban:", balaban_index(smiles))
print("Eccentric Connectivity:", eccentric_connectivity_index(smiles))
---
## 🧠 What are Topological Indices?
Topological indices are numerical descriptors of graph structure widely used in:
- Molecular property prediction
- Graph similarity comparison
- Cheminformatics and QSPR/QSAR
- Network analysis
---
## 📝 License
Licensed under the [MIT License](LICENSE).
---
## 🤝 Contributing
Pull requests are welcome. If you'd like to contribute a new index or optimization, please open an issue first.
---
## 👨💻 Author
Developed by [Avinash Mallick](https://github.com/avimallick).
Project details
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 topoindex-0.1.5.tar.gz.
File metadata
- Download URL: topoindex-0.1.5.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a421853eeecd2f1e37fb8a85c62b66f07a6c61070fab0f706fb1620b284cf209
|
|
| MD5 |
9604d2910d43b09b8c1ace4732169e7f
|
|
| BLAKE2b-256 |
82e866e7613372f348eecba2b99afef06235ca6ba885959e720f8247280fefd3
|
Provenance
The following attestation bundles were made for topoindex-0.1.5.tar.gz:
Publisher:
publish.yml on avimallick/topoindex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
topoindex-0.1.5.tar.gz -
Subject digest:
a421853eeecd2f1e37fb8a85c62b66f07a6c61070fab0f706fb1620b284cf209 - Sigstore transparency entry: 215256134
- Sigstore integration time:
-
Permalink:
avimallick/topoindex@5c3a18c25de97030bcede39ec8af830c29449115 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/avimallick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5c3a18c25de97030bcede39ec8af830c29449115 -
Trigger Event:
release
-
Statement type:
File details
Details for the file topoindex-0.1.5-py3-none-any.whl.
File metadata
- Download URL: topoindex-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b8a4c7aa0d7a4377dfabe2b4224dc5ff26668f26693c67a5af95d91f078e636
|
|
| MD5 |
134e41600ca7d68d746046e82c7ce14f
|
|
| BLAKE2b-256 |
3b702852f7936bfff44be1cc2ba5da96bbe118d8c288cd7bfde9058abc02c6d9
|
Provenance
The following attestation bundles were made for topoindex-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on avimallick/topoindex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
topoindex-0.1.5-py3-none-any.whl -
Subject digest:
8b8a4c7aa0d7a4377dfabe2b4224dc5ff26668f26693c67a5af95d91f078e636 - Sigstore transparency entry: 215256141
- Sigstore integration time:
-
Permalink:
avimallick/topoindex@5c3a18c25de97030bcede39ec8af830c29449115 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/avimallick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5c3a18c25de97030bcede39ec8af830c29449115 -
Trigger Event:
release
-
Statement type: