Skip to main content

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 networkx and rdkit.


🧪 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

topoindex-0.1.5.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topoindex-0.1.5-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

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

Hashes for topoindex-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a421853eeecd2f1e37fb8a85c62b66f07a6c61070fab0f706fb1620b284cf209
MD5 9604d2910d43b09b8c1ace4732169e7f
BLAKE2b-256 82e866e7613372f348eecba2b99afef06235ca6ba885959e720f8247280fefd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for topoindex-0.1.5.tar.gz:

Publisher: publish.yml on avimallick/topoindex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for topoindex-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8a4c7aa0d7a4377dfabe2b4224dc5ff26668f26693c67a5af95d91f078e636
MD5 134e41600ca7d68d746046e82c7ce14f
BLAKE2b-256 3b702852f7936bfff44be1cc2ba5da96bbe118d8c288cd7bfde9058abc02c6d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for topoindex-0.1.5-py3-none-any.whl:

Publisher: publish.yml on avimallick/topoindex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page