Skip to main content

Chemical Degradation Simulation

Project description

Chemical Degradation Reaction

This repository provides a framework for simulating and analyzing chemical degradation pathways of organic compounds. It leverages the RDKit cheminformatics library to predict degradation products based on a set of predefined reaction rules and allows for the kinetic modeling of these degradation processes.

Reaction Libraries have been sourced from the EPA's Chemical Transformation Simulator.

Degradation Graph Kinetics Graph

Dependencies

  • Python (>=3.12)
  • RDKit (>=2024.9.6)
  • NetworkX (>=3.4)
  • Matplotlib (>=3.10)
  • Seaborn (>=0.13)
  • Pandas (>=2.2)
  • SciPy (>=1.15)

Installation

Create and active virtual environment

python3 -m venv chem_deg
source chem_deg/bin/activate

Clone and install the repository

git clone git@github.com:davidkuter/chem_deg.git
pip install -e .

Usage

from chem_deg import simulate_degradation

# Simulate degradation starting from a SMILES string
smiles = "CCC(=O)N(c1ccccc1)C1(C(=O)OC)CCN(CCC(=O)OC)CC1"
df_results = simulate_degradation(
    compound=smiles,    # The compound to simulate degradation of
    ph=5,               # The pH to simulate degradation kinetics of
    max_generation=2,   # The maximum number of degradation steps to simulate.
    plot_degradation=True,  # If `True`, generates a visualization of the degradation graph (saved as `degradation_graph.png`).
    plot_kinetics=True,     # If `True`, generates a plot of the degradation kinetics (saved as `degradation_kinetics.png`).
    time_log=True,      # If `True`, uses a logarithmic time scale for the kinetics simulation.
)

Development

To install development dependencies:

pip install -e ".[dev]"

Running Tests

pytest

License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License - see the LICENSE file for details.

For commercial use, please contact David Kuter.

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

chem_deg-0.2.1.tar.gz (207.8 kB view details)

Uploaded Source

Built Distribution

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

chem_deg-0.2.1-py3-none-any.whl (211.2 kB view details)

Uploaded Python 3

File details

Details for the file chem_deg-0.2.1.tar.gz.

File metadata

  • Download URL: chem_deg-0.2.1.tar.gz
  • Upload date:
  • Size: 207.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chem_deg-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9ea553f8c55fd95ff57f73a24bde016a8c97d92d1a209eeab128b4e86865e7b9
MD5 92234bb661058c289419b550ff6ef972
BLAKE2b-256 85fe11cdcd982661cf77a457f877d0e82d99c59d06c496ba6fec9ef3382e09ff

See more details on using hashes here.

File details

Details for the file chem_deg-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: chem_deg-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 211.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chem_deg-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d433afe7a2384a1c97513a88acda6052952a66f2a0a7907d37bf7219ebe97cf6
MD5 71e6a72f1a437448c8c96f8ebc58804f
BLAKE2b-256 5fd7154482a5400be7101e042e32f9c800d1da7d666ac2720ac03de820f8a244

See more details on using hashes here.

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