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. 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/YOUR_USERNAME/topoindex.git
cd topoindex
pip install .

⚠️ Requires networkx. RDKit must be installed separately via Conda:

conda install -c rdkit rdkit

🧪 Example Usage

from topoindex.indices.wiener import wiener_index
from topoindex.indices.zagreb import first_zagreb_index, second_zagreb_index
from topoindex.indices.hyper_wiener import hyper_wiener_index
from topoindex.indices.randic import randic_index
from topoindex.indices.balaban import balaban_index
from topoindex.indices.eccentric_connectivity import 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

📁 Project Structure

topoindex/
├── indices/           # Core index computations
├── utils/             # SMILES to graph conversion
├── tests/             # Unit tests (Pytest)
├── examples/          # Example usage scripts

📝 License

Licensed under the MIT 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.

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.0.tar.gz (6.2 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.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file topoindex-0.1.0.tar.gz.

File metadata

  • Download URL: topoindex-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 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.0.tar.gz
Algorithm Hash digest
SHA256 9b9a1f48344bde0657f7b19af636ed208821f404209905d74defedfd1c397ddf
MD5 d849b5ae097d750a933a76efd7afff73
BLAKE2b-256 15686e91958e871ff385300bce764c53e16fc01f1a12f467fdb177109497f118

See more details on using hashes here.

Provenance

The following attestation bundles were made for topoindex-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: topoindex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b29500799e7a30203dd004ca8992aaf6edd5f858eabfb8bca3dcc09e4aba471d
MD5 cf94318667d785d2389213e976c61fbe
BLAKE2b-256 3041fd4dee631697ed451cc406d8d9f85e04cffb5a7c790eebde9f8cddd1f114

See more details on using hashes here.

Provenance

The following attestation bundles were made for topoindex-0.1.0-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