Skip to main content

Drux: Drug Release Analysis Framework

Project description

Drux: Drug Release Analysis Framework


PyPI version built with Python3 GitHub repo size Discord Channel

Overview

Drux is a Python-based framework for simulating drug release profiles using mathematical models. It offers a reproducible and extensible platform to model, analyze, and visualize time-dependent drug release behavior, making it ideal for pharmaceutical research and development. By combining simplicity with scientific rigor, Drux provides a robust foundation for quantitative analysis of drug delivery kinetics.

PyPI Counter
Github Stars
Branch main dev
CI
Code Quality CodeFactor

Installation

PyPI

Source code

Supported Models

Zero-Order

The Zero-Order model describes a constant rate of drug release over time. According to this model, the cumulative amount of drug released at time $t$ is given by:

$$ M_t = M_0 + k_0 t $$

where:

  • $M_t (mg)$ is the cumulative absolute amount of drug released at time $t$.
  • $M_0 (mg)$ is the initial amount of drug in the system. $M_0$ defaults to zero in this model.
  • $k_0 (\frac{mg}{s})$ is the zero-order release rate constant.

Applications

  1. Tablets with extended release
  2. Transdermal Patches
  3. Implantable Device
  4. Intraocular Implants
  5. Infusion Systems

First-Order

The first-order drug release model describes a process where the rate of drug release is proportional to the remaining amount of drug in the system. According to this model, the cumulative amount of drug released at time $t$ is given by:

$$ M_t = M_0 (1 - e^{-kt}) $$

where:

  • $M_t (mg)$ is the cumulative absolute amount of drug released at time $t$.
  • $M_0 (mg)$ is entire releasable amount of drug (the asymptotic maximum).
  • $k (\frac{1}{s})$ is the first-order release rate constant.

Applications

  1. Immediate-release tablets and capsules
  2. Liquid drug formulations (oral solutions, intravenous injections)
  3. Controlled-release matrix systems
  4. Elastomeric infusion pumps

Higuchi

The Higuchi model describes the release of a drug from a matrix system, where the drug diffuses through a porous medium. The Higuchi equation addressed important aspects of drug transport and release from planar devices. According to this model, the cumulative amount of drug released at time $t$ is given by:

$$ M_t = \sqrt{D(2c_0 - c_s)c_st} $$

where:

  • $M_t (\frac{mg}{cm^2})$ is the cumulative absolute amount of drug released at time $t$
  • $D ({\frac{cm^2}{s}})$ is the drug diffusivity in the polymer carrier
  • $c_0 (\frac{mg}{cm^3})$ is the initial drug concentration (total concentration of drug in the matrix)
  • $c_s (\frac{mg}{cm^3})$ is the solubility of the drug in the polymer (carrier)

⚠️ The Higuchi model assumes that $c_0 \ge c_s$

Applications

  1. Matrix Tablets
  2. Hydrophilic polymer matrices
  3. Controlled - Release Microspheres
  4. Semisolid Systems
  5. Implantable Drug delivery systems

Weibull

Weibull model is an empirical model used to describe drug release kinetics from various pharmaceutical dosage forms. It is characterized by a flexible empirical equation that captures various release kinetics. According to this model, the cumulative amount of drug released at time $t$ is given by:

$$ M_t = M \left(1 - e^{-at^b}\right) $$

where:

  • $M_t (mg)$ is the cumulative absolute amount of drug released at time $t$
  • $M (mg)$ is the total amount of drug released at infinite time
  • $a$ is the scale parameter (related to the release rate)
  • $b$ is the shape parameter (indicates the release mechanism)

Applications

  1. Controlled-release modeling
  2. Dissolution profiling
  3. Comparative studies
  4. Vivo predictions

Hopfenberg

The Hopfenberg model describes drug release from surface-eroding polymers with a constant surface area. It is particularly useful for modeling drug release from biodegradable polymers where the drug is uniformly distributed throughout the matrix. According to this model, the cumulative amount of drug released at time $t$ is given by:

$$ M_t = M_{\infty} \left(1 - \left(1 - \frac{k_0t}{c_0 a_0}\right)^n\right) $$

where:

  • $M_t (mg)$ is the cumulative absolute amount of drug released at time $t
  • $M_{\infty} (mg)$ is the total amount of drug released at infinite time
  • $k_0 (\frac{mg}{mm^2 s})$ is the surface erosion rate constant
  • $c_0 (\frac{mg}{mm^3})$ is the initial drug concentration in the polymer matrix
  • $a_0 (mm)$ is the initial radius (for spheres) or half-thickness (for slabs) of the device
  • $n$ is the geometry-dependent exponent (1 for slabs, 2 for cylinders, 3 for spheres)

Applications

  1. Biodegradable Implants
  2. Surface-eroding drug delivery systems
  3. Transdermal Patches
  4. Injectable depots

Usage

Zero-Order Model

from drux import ZeroOrderModel
model = ZeroOrderModel(k0=0.1, M0=0)
model.simulate(duration=1000, time_step=10)
model.plot(show=True)
Zero-order Plot

First-Order Model

from drux import FirstOrderModel
model = FirstOrderModel(k=0.003, M0=0.1)
model.simulate(duration=1000, time_step=10)
model.plot(show=True)
First-order Plot

Higuchi Model

from drux import HiguchiModel
model = HiguchiModel(D=1e-6, c0=1, cs=0.5)
model.simulate(duration=1000, time_step=10)
model.plot(show=True)
Higuchi Plot

Weibull Model

from drux import WeibullModel
model = WeibullModel(M=1, a=0.095, b=0.7)
model.simulate(duration=100, time_step=1)
model.plot(show=True)
Weibull Plot

Hopfenberg Model

from drux import HopfenbergModel
model = HopfenbergModel(M=1, k0=0.00067, c0=0.0374, a0=3.51, n=2)
model.simulate(duration=100, time_step=1)
model.plot(show=True)
Hopfenberg Plot

Issues & bug reports

Just fill an issue and describe it. We'll check it ASAP! or send an email to drux@openscilab.com.

  • Please complete the issue template

You can also join our discord server

Discord Channel

References

1- T. Higuchi, "Rate of release of medicaments from ointment bases containing drugs in suspension," Journal of Pharmaceutical Sciences, vol. 50, no. 10, pp. 874–875, 1961.
2- D. R. Paul, "Elaborations on the Higuchi model for drug delivery," International Journal of Pharmaceutics, vol. 418, no. 1, pp. 13–17, 2011.
3- R. T. Medarametla, K. V. Gopaiah, J. N. Suresh Kumar, G. Anand Babu, M. Shaggir, G. Raghavendra, D. Naveen Reddy, and B. Venkamma, "Drug Release Kinetics and Mathematical Models," International Journal of Science and Research Methodology, vol. 27, no. 9, pp. 12–19, Sep. 2024.
4- R. Vaju and K. V. Murthy, "Development and validation of new discriminative dissolution method for carvedilol tablets," Indian Journal of Pharmaceutical Sciences, vol. 73, no. 5, pp. 527–536, Sep. 2011.
5- S. Dash, "Kinetic modeling on drug release from controlled drug delivery systems," Acta Poloniae Pharmaceutica, 2010.
6- K. H. Ramteke, P. A. Dighe, A. R. Kharat, S. V. Patil, Mathematical models of drug dissolution: A review, Sch. Acad. J. Pharm., vol. 3, no. 5, pp. 388-396, 2014.
7- C. Corsaro, G. Neri, A. M. Mezzasalma, and E. Fazio, "Weibull modeling of controlled drug release from Ag-PMA nanosystems," Polymers, vol. 13, no. 17, p. 2897, 2021.
8- H. B. Hopfenberg, "Controlled release from erodible slabs, cylinders, and spheres," in Controlled Release Polymeric Formulations, ACS Symposium Series, vol. 33, pp. 26–32, 1976.
9- H. V. Chavda, M. S. Patel, and C. N. Patel, "Preparation and in vitro evaluation of guar gum based triple-layer matrix tablet of diclofenac sodium," Research in Pharmaceutical Sciences, vol. 7, no. 1, pp. 57–64, Jan. 2012.

Show your support

Star this repo

Give a ⭐️ if this project helped you!

Donate to our project

If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .

Drux Donation

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

0.4 - 2026-05-18

Added

  • Hopfenberg model

0.3 - 2025-12-08

Added

  • Weibull model
  • Logo
  • __repr__ method for models

Changed

  • Python 3.14 added to test.yml

0.2 - 2025-09-27

Added

  • Zero-order model
  • First-order model

Changed

  • README.md modified
  • Test system modified
  • Release range bug in time_for_release fixed
  • matplotlib import bug fixed
  • plot method modified

0.1 - 2025-07-27

Added

  • Base model
  • Higuchi model

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

drux-0.4.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

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

drux-0.4-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file drux-0.4.tar.gz.

File metadata

  • Download URL: drux-0.4.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for drux-0.4.tar.gz
Algorithm Hash digest
SHA256 659326d8bc77a4371f5b78d6529cd6a163339b614f2f565d46820a8a669a87d7
MD5 511bb5484f35d800eef869ccc23a55c0
BLAKE2b-256 cfd440c8794d63339d4d5a27d4033330c1e2b574710d6a0d75973916e25aa81c

See more details on using hashes here.

File details

Details for the file drux-0.4-py3-none-any.whl.

File metadata

  • Download URL: drux-0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for drux-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 39f4d37911344857cc7b24ffb38c278d5c5cb50243e0e13d3762be85e6a11e1a
MD5 ee2a6ada96d5fea5f3fbdb10d7096b56
BLAKE2b-256 25a0f9b1e0a08a6f3ae9d82ce1e0260bb23b71295985af9408287dca6e9c26cb

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