Skip to main content

Predictive modeling for drug-polymer compatibility in pharmaceutical formulations using COSMO-SAC.

Project description

COSMOPharm

Welcome to the COSMOPharm package, accompanying our paper in Molecular Pharmaceutics. This project and its associated publication offer insights and a practical toolkit for researching drug-polymer and drug-solvent systems, aiming to provide the scientific community with the means to reproduce our findings and further the development of COSMO-SAC-based models.

TOC Figure

About

COSMOPharm is a Python package designed to streamline the predictive modeling of drug-polymer compatibility, crucial for the development of pharmaceutical amorphous solid dispersions. Apart from that, it can also be used for the miscibility/solubility of drugs with/in common solvents. Leveraging the COSMO-SAC (Conductor-like Screening Model Segment Activity Coefficient) model, COSMOPharm offers a robust platform for scientists and researchers to predict solubility, miscibility, and phase behavior in drug formulation processes.

Features

  • Compatibility Prediction: Utilize open-source COSMO-SAC model for prediction of drug-polymer compatibility.
  • Solubility Calculation: Calculate drug-polymer solubilities to guide the selection of suitable polymers for drug formulations.
  • Miscibility and Phase Behavior Analysis: Analyze the miscibility of drug-polymer pairs and understand their phase behavior under various conditions.
  • User-friendly Interface: Easy-to-use functions and comprehensive documentation to facilitate research and development in pharmaceutical sciences.

Installation

Install COSMOPharm with pip:

pip install cosmopharm

Ensure you have installed the cCOSMO library as per instructions on the COSMOSAC GitHub page.

Quick Start

Get started with COSMOPharm using the minimal example below, which demonstrates how to calculate the solubility of a drug in a polymer. This example succinctly showcases the use of COSMOPharm for solubility calculations:

import matplotlib.pyplot as plt
import cCOSMO
from cosmopharm import SLE, COSMOSAC
from cosmopharm.utils import create_components, read_params

# Define components
names = ['SIM','PLGA50']
params_file = "data/sle/table_params.xlsx"

# Load parameters and create components
parameters = read_params(params_file)
mixture = create_components(names, parameters)

# Initialize COSMO-SAC model - replace paths with your local paths to COSMO profiles
db = cCOSMO.DelawareProfileDatabase(
    "./profiles/_import_methods/UD/complist.txt",
    "./profiles/_import_methods/UD/sigma3/")

for name in names:
    iden = db.normalize_identifier(name)
    db.add_profile(iden)
COSMO = cCOSMO.COSMO3(names, db)

# Setup the COSMO-SAC model with components
actmodel = COSMOSAC(COSMO, mixture=mixture)

# Calculate solubility (SLE)
sle = SLE(actmodel=actmodel)
solubility = sle.solubility(mix='real')

# Output the solubility
print(solubility[['T', 'w', 'x']].to_string(index=False))

# Plot results
plt.plot(*solubility[['w','T']].values.T,'.-', label='Solubility (w)')

# Settings
plt.xlim(0,1)
plt.ylim(300,500)
# Adding title and labels
plt.title('Solubility vs. Temperature')
plt.ylabel("T / K")
xlabel = {'w':'Weight', 'x':'Mole'}
plt.xlabel(f"Weight fraction {mixture[0].name}")
plt.legend()
# Save the figure to a PNG or PDF file
plt.savefig('solubility_plot.png')  # Saves the plot as a PNG file
# plt.savefig('solubility_plot.pdf')  # Saves the plot as a PDF file
plt.show()

For a more comprehensive demonstration, including advanced functionalities and plotting results, please see the example_usage.py script in this repository. This detailed example walks through the process of setting up COSMOPharm, initializing models, and visualizing the results of solubility and miscibility calculations.

Contributing

Contributions are welcome! Please refer to our GitHub repository for more information.

Citation

We appreciate citations to our work as they help acknowledge and spread our research contributions. If you use COSMOPharm in your research, please cite the associated paper as follows:

@article{Antolovic2024COSMOPharm,
  title={COSMOPharm: Drug--Polymer Compatibility of Pharmaceutical Amorphous Solid Dispersions from COSMO-SAC},
  author={Antolovic, Ivan and Vrabec, Jadran and Klajmon, Martin},
  journal={Molecular Pharmaceutics},
  year={2024},
  volume={1}, # Will be adjusted accordingly
  issue={1}, # Will be adjusted accordingly
  month={3}, # Will be adjusted accordingly
  pages={1--10},  # Will be adjusted accordingly
  doi={10.1021/acs.molpharmaceut.3c12345} # Will be adjusted accordingly
}

License

COSMOPharm is released under the MIT License. For more details, see the LICENSE file.

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

cosmopharm-0.0.25.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

cosmopharm-0.0.25-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file cosmopharm-0.0.25.tar.gz.

File metadata

  • Download URL: cosmopharm-0.0.25.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for cosmopharm-0.0.25.tar.gz
Algorithm Hash digest
SHA256 023eec82fed4c9fa8f940f96f72cc61fb4e641c18c9b292351fc5f78a4312526
MD5 2e2b42dee8c0c59b35f762efc956e1be
BLAKE2b-256 7dd7c55bf2c2f0815f87aaf0ec4544a52b5e54e3f01bffb5c7a1df6cdfef41fa

See more details on using hashes here.

File details

Details for the file cosmopharm-0.0.25-py3-none-any.whl.

File metadata

  • Download URL: cosmopharm-0.0.25-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for cosmopharm-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 a25f7a8f30256ddd8dbf0db3d9299d12a89ab362b733608335342d9e4fa9b6bc
MD5 b31a0163a3c4828994a575a86ad17bd8
BLAKE2b-256 7086a4d41df2f12cac2252d2a98850bcb022f8f95445ac3db3108201e3cd300b

See more details on using hashes here.

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