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 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

---

## 📁 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](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.3.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.3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topoindex-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 33e3fd22e7e3982466f1e3ea30a62751e000b7e6cefd22ce53c88562e065d380
MD5 d936018e5cbc4f9f75ab13e32def773e
BLAKE2b-256 63b2b71f9ab9a4f09a4fa773d78d1d6658e47e408dca08fa9da994c9d9b59951

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: topoindex-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d3e8e0be774f02fe338611ec95d8f58fd833bd375e0e010b868a786e0739e7
MD5 0fa6850e25c0a444c5b135b67479a839
BLAKE2b-256 97950c49905e188b7ad66f81948982f64f51ee8a78c043e200c17692a665d305

See more details on using hashes here.

Provenance

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