A Python-first platform for pharmacokinetics, pharmacodynamics, and toxicity prediction using SciPy alternatives.
- Predict human PK (CL, F, tΒ½) and TI (QTc, bone marrow tox, DILI)
- Build cross-species PK/PD virtual models (rodent/dog/NHP) to estimate NOAEL at 14d/1m/9m
- Guide compound design toward human PK/PD/toxicity targets
- β Human PK/TI Prediction - Using RDKit + ADMET-AI + custom models
- β Cross-species PK/PD Models - Using SciPy ODE solvers + allometric scaling
- β Compound Design & Optimization - Using SciPy optimization + genetic algorithms
- β Production Ready - No complex compilation, GKE deployment ready
# Clone repository
git clone <repository-url>
cd PKPD
# Install dependencies
pip install -e .# Build image
docker build -t pkpd:latest .
# Run container
docker run -p 8000:8000 pkpd:latest# Build and push to GCR
docker build -t gcr.io/PROJECT_ID/pkpd:latest .
docker push gcr.io/PROJECT_ID/pkpd:latest
# Deploy to GKE
kubectl apply -f k8s/jupyter notebook notebooks/01_getting_started.ipynbThis notebook demonstrates all three goals:
- Goal 1: Human PK/TI Prediction
- Goal 2: Cross-species PK/PD Models & NOAEL Estimation
- Goal 3: Compound Design & Optimization
# Predict ADMET properties
pkpd-predict -i compounds.csv -o predictions.csv
# Fit PK model
pkpd-fit -d pk_data.csv -s human -m 2compartment
# Simulate NOAEL
pkpd-simulate -m fitted_model.pkl -d dosing.yaml
# Calculate therapeutic index
pkpd-ti -p predictions.csv
# Score compounds
pkpd-score -c compounds.csv -t targets.yamlsrc/pkpd/
βββ admet/ # ADMET prediction (CL, F, tΒ½, DILI, hERG)
βββ models/ # PK/PD model library (PySB)
βββ fit/ # Fitting pipeline (SciPy alternatives)
βββ simulate/ # Virtual population simulation
βββ ti/ # Therapeutic index calculators
βββ design/ # Compound scoring and design
βββ io/ # Data I/O and validation
βββ reporting/ # Plots, tables, reports
βββ cli/ # Command-line interface
configs/
βββ species/ # Human, rodent, dog, NHP configs
βββ dosing/ # 14d, 1m, 9m regimens
βββ tox_thresholds/ # QTc, marrow, DILI thresholds
βββ fitting/ # Fitting options and priors
- SciPy - ODE solving, optimization, scientific computing
- NumPy - Numerical computing
- Pandas - Data manipulation
- Matplotlib/Seaborn - Visualization
- RDKit - Cheminformatics and molecular descriptors
- PySB - Systems biology modeling
- ADMET-AI - ADMET property prediction
- β No AMICI (replaced with SciPy ODE solvers)
- β No pyPESTO (replaced with SciPy optimization)
- β No PyTDC (replaced with direct data loading)
from pkpd.admet import ADMETPredictor
predictor = ADMETPredictor()
predictions = predictor.predict_batch(smiles_list, compound_ids)from pkpd.models import TwoCompartmentPK
pk_model = TwoCompartmentPK(species='human')
pk_model.scale_to_species(70.0)from pkpd.simulate import SimulationEngine
engine = SimulationEngine()
noael = engine.simulate_noael(model, dosing_regimen)from pkpd.design import CompoundDesigner
designer = CompoundDesigner()
scores = designer.score_compounds(compounds, target_profiles)- Predicted clearance, volume, half-life, bioavailability
- Assessed QTc, bone marrow, and DILI risks
- Generated risk-based compound ranking
- Built 2-compartment PK models for 4 species
- Applied allometric scaling for cross-species translation
- Estimated NOAEL for 14d/1m/9m regimens
- Generated safety margin analysis
- Scored compounds against target profiles
- Performed multi-objective optimization
- Applied global optimization (differential evolution)
- Generated design recommendations
FROM python:3.11-slim
# Simple deployment - no complex compilation needed- Kubernetes manifests in
k8s/ - Resource management and health checks
- Persistent storage for data
- β Simpler deployment (no complex compilation)
- β Faster builds (no AMICI/pyPESTO compilation)
- β Easier maintenance (standard Python libraries)
- β Production ready (works in any environment)
PKPD/
βββ src/pkpd/ # Core platform code
βββ configs/ # Configuration files
βββ scripts/ # CLI scripts
βββ notebooks/ # Jupyter notebooks
βββ tests/ # Unit tests
βββ k8s/ # Kubernetes manifests
βββ data/ # Data directory (git-ignored)
βββ models_artifacts/ # Model artifacts (git-ignored)
βββ Dockerfile # Production Docker image
βββ environment.yml # Conda environment
βββ pyproject.toml # Python dependencies
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details.
β PRODUCTION READY
All three goals achieved using working libraries and SciPy alternatives. No complex dependencies needed - the platform is fully functional and ready for production deployment!