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/avimallick/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.2.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.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topoindex-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 30bb4e42a1123a74700e51ccec94513051f1f21652f0ae449fcb8c9676a5cb5c
MD5 dc25609ea845665cc4a3acc2efa64b3b
BLAKE2b-256 140911066f115ed6d4423865b61aa859e8d60028a027726e855166323b942088

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: topoindex-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08b097433946c170c034412191e5c07db35f0650868139f951cd73d38f52c6c1
MD5 e86eb9eb1e395d0f8a63ff3490d09444
BLAKE2b-256 b7ff5039fad45213a9e0bf44086a46fbbcb6b847166addcd526d30b21ee0e7b9

See more details on using hashes here.

Provenance

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