Skip to main content

A package for creating molecular networks based on molecular features and similarities.

Project description

MolecularNetwork

MolecularNetwork is a Python package that facilitates the creation of molecular networks based on molecular similarities. It leverages the RDKit for molecular operations, NetworkX for graph operations, and PyVis for visualizing the generated molecular networks.

Features

  • Molecular Descriptors: Calculate molecular fingerprints using descriptor types (e.g., Morgan fingerprints, MACCS keys, AtomPairs).

  • Similarity Metrics: Choose from a variety of similarity metrics (e.g., Tanimoto, Cosine, Dice) to quantify molecular similarities.

  • Network Visualization: Visualize the generated molecular networks using interactive graph visualization tools.

  • Modularity: The code is organized into modular components, promoting easy extension and customization.

Installation

To install the MolecularNetwork package, you can use pip. Ensure you have Python and pip installed on your system.

pip install molecularnetwork

Usage

Here's a simple example of how to use the MolecularNetwork package:

from molecularnetwork import MolecularNetwork

# Define SMILES strings and classes
smiles_list = ["CCO", "CCN", "CCC", "CCF"]
classes = ["alcohol", "amine", "alkane", "fluoride"]

# Create MolecularNetwork instance
network = MolecularNetwork(descriptor="morgan2", sim_metric="tanimoto", sim_threshold=0.5)

# Generate the molecular network graph
graph = network.create_graph(smiles_list, classes)

# Save the graph to a file (e.g., GML format)
network.save_graph("molecular_network.gml")

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. I welcome contributions from the community.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

molecularnetwork-0.3.0.tar.gz (55.2 kB view hashes)

Uploaded Source

Supported by

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