Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions joss/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bibliography: paper.bib

# Summary

`pharmsol` is a library for pharmacokinetic/pharmacodynamic (PK/PD) simulation written in Rust. It provides the necessary tools and frameworks for defining, solving, and analyzing compartmental models, with support for differential equations, their analytical solutions, and experimental support for stochastic differential equations. Written in Rust, the library aims to provide researchers and developers with a framework for pharmacokinetic simulation in a memory-safe and performant language. The library is distributed via crates.io with comprehensive API documentation, usage examples, and a test suite validated through continuous integration.
`pharmsol` is a library for pharmacokinetic/pharmacodynamic (PK/PD) simulation written in Rust. It provides the necessary tools and frameworks for defining, solving, and analyzing compartmental models, with support for differential equations, their analytical solutions, experimental support for stochastic differential equations, and a domain-specific language (DSL) for models that need to be validated or compiled at runtime. The DSL can target an in-process JIT runtime, native ahead-of-time artifacts, or WebAssembly (WASM) bundles depending on deployment needs. Written in Rust, the library aims to provide researchers and developers with a framework for pharmacokinetic simulation in a memory-safe and performant language. The library is distributed via crates.io with comprehensive API documentation, usage examples, and a test suite validated through continuous integration.

# Statement of Need

Expand All @@ -55,7 +55,7 @@ The equation module provides the mathematical foundation for simulating PK/PD ou

## Analytical Solutions

For standard compartmental models, `pharmsol` provides closed-form solutions for one- and two-compartment models, with and without oral absorption. These have been verified against their differential equation counterparts. Benchmarks demonstrate 20-33× speedups compared to equivalent ODE formulations without loss of precision (see repository benchmarks for details). Additional analytical solutions will be added in future versions.
For standard compartmental models, `pharmsol` provides closed-form solutions for one-, two-, and three-compartment models, including oral absorption variants. These have been verified against their differential equation counterparts. Benchmarks demonstrate 20-33× speedups compared to equivalent ODE formulations without loss of precision (see repository benchmarks for details). Additional analytical solutions will be added in future versions.

## Ordinary Differential Equations

Expand All @@ -65,9 +65,13 @@ For more complex or non-standard models, `pharmsol` supports user-defined ordina

Experimental support for stochastic differential equations (SDEs) is available using the Euler-Maruyama method. SDEs allow modeling of within-subject variability as a continuous stochastic process. However, particular care should be taken if applying SDEs in a non-parametric approach to population pharmacokinetic modeling, such as when using the non-parametric adaptive grid algorithm (NPAG) [@npag] for parameter estimation.

## DSL and execution runtimes

`pharmsol` also provides a DSL for models that need to be parsed, validated, and compiled at runtime. The DSL supports analytical, ODE, and SDE models and can target an in-process JIT runtime, native ahead-of-time artifacts, or WebAssembly (WASM) bundles. This allows the same model description to move between interactive research workflows and deployment-oriented settings without changing the surrounding data structures.

# Conclusion and Future Work

`pharmsol` aims to support the evolving needs of pharmacometric research by providing a modern, efficient platform that can adapt to the increasing complexity of pharmaceutical development while remaining accessible through its open-source licensing model. Future development will focus on additional analytical model implementations, support for common data formats used by other pharmacometric software, non-compartmental analysis and continued performance improvements.
`pharmsol` aims to support the evolving needs of pharmacometric research by providing a modern, efficient platform that can adapt to the increasing complexity of pharmaceutical development while remaining accessible through its open-source licensing model. Future development will focus on additional analytical model implementations, support for common data formats used by other pharmacometric software, and continued performance improvements.

# Acknowledgements

Expand Down
191 changes: 191 additions & 0 deletions paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
// Add your references here following the BibTeX format
@article{fidler2019nlmixr,
title={Nonlinear Mixed-Effects Model Development and Simulation Using nlmixr and Related R Open-Source Packages},
author={Fidler, Matthew and Wilkins, Justin J. and Hooijmaijers, Richard and Post, Teun M. and Schoemaker, Rik and Trame, Mirjam N. and Xiong, Yuan and Wang, Wenping},
journal={CPT: Pharmacometrics \& Systems Pharmacology},
volume={8},
number={9},
pages={621--633},
year={2019},
publisher={Wiley Online Library},
doi={10.1002/psp4.12445},
url={https://doi.org/10.1002/psp4.12445},
note={Open Access}
}

@article{neely2012accurate,
title={Accurate detection of outliers and subpopulations with Pmetrics, a nonparametric and parametric pharmacometric modeling and simulation package for R},
author={Neely, Michael N and van Guilder, Michael G and Yamada, Walter M and Schumitzky, Alan and Jelliffe, Roger W},
journal={Therapeutic Drug Monitoring},
volume={34},
number={4},
pages={467--476},
year={2012},
publisher={LWW},
doi={10.1097/FTD.0b013e31825c4ba6},
pmid={22722776},
pmcid={PMC3394880}
}

@online{cisa2023memorysafe,
title={The Case for Memory Safe Roadmaps},
author={{Cybersecurity and Infrastructure Security Agency (CISA)} and {National Security Agency (NSA)} and {Federal Bureau of Investigation (FBI)} and {International Partners}},
year={2023},
month={12},
day={6},
url={https://media.defense.gov/2023/Dec/06/2003352724/-1/-1/0/THE-CASE-FOR-MEMORY-SAFE-ROADMAPS-TLP-CLEAR.PDF},
note={Joint Cybersecurity Advisory},
urldate={2023-12-06}
}

@online{nsa2022adopting,
title={Software Memory Safety},
author={{National Security Agency (NSA)}},
year={2022},
month={2},
url={https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI_SOFTWARE_MEMORY_SAFETY.PDF},
note={Cybersecurity Information Sheet},
urldate={2022-02-02}
}

@manual{beal1989nonmem,
title = {NONMEM Users Guide and User's Manuals},
author = {Beal, S. L. and Sheiner, L. B. and Boeckmann, A. J. and Bauer, R. J.},
year = {1989},
organization = {Icon Development Solutions},
address = {Ellicott City, MD}
}


@manual{phoenixnlme,
title = {Phoenix NLME},
author = {{Certara}},
year = {2025},
note = {Phoenix NLME Version 8.5.2, Certara USA, Inc., 103 Carnegie Center, Suite 300, Princeton, NJ 08540, USA. Retrieved from \url{https://www.certara.com/software/phoenix-nlme/}}
}

@manual{monolix,
title = {Monolix Suite},
author = {{Lixoft}},
year = {2020},
note = {Monolix Suite Version 2020R2, Lixoft, Antony, France. Retrieved from \url{https://monolix.lixoft.com/}}
}


@article{wendling2016systematic,
title={Systematic Performance Evaluation of Nonlinear Mixed-Effects Models},
author={Wendling, Thierry and Trocóniz, Iñaki F. and Karlsson, Mats O. and Jönsson, Siv and Milligan, Peter A. and Hooker, Andrew C.},
journal={The AAPS Journal},
volume={18},
number={5},
pages={1146--1156},
year={2016},
doi={10.1208/s12248-016-9946-6}
}

@article{darwich2021guidelines,
title={Guidelines for the Use of Model-Informed Precision Dosing in Clinical Practice},
author={Darwich, Adam S and Ogungbenro, Kayode and Vinks, Alexander A and Powell, J Robert and Reny, Jean-Luc and Marsousi, Niloufar and Daali, Youssef and Fairman, Kimberly and Cook, Jack and Lesko, Larry J and others},
journal={Clinical Pharmacology \& Therapeutics},
volume={109},
number={4},
pages={907--921},
year={2021},
publisher={Wiley Online Library},
doi={10.1002/cpt.2173}
}

@article{mentre2013model,
title={Model-based design and analysis of clinical trials for anti-infective drug development},
author={Mentre, France and Friberg, Lena and Duffull, Stephen and Grasela, Thaddeus},
journal={Clinical Microbiology and Infection},
volume={19},
number={4},
pages={331--337},
year={2013},
publisher={Elsevier},
doi={10.1111/1469-0691.12140}
}

@article{mentre2005prediction,
title={Prediction discrepancies for the evaluation of nonlinear mixed-effects models},
author={Mentr\'e, France and Escolano, Sylvie},
journal={Journal of Pharmacokinetics and Pharmacodynamics},
volume={33},
number={3},
pages={345--367},
year={2005},
publisher={Springer},
doi={10.1007/s10928-005-0016-4},
pmid={16284919},
pmcid={PMC1989778},
note={Author manuscript available in PMC 2007 Oct 12}
}

@article{betts2020impact,
title={Impact of Preclinical PKPD Modeling and Simulation in Drug Development: Industry Perspective},
author={Betts, Alison and Kerzner, Lara and Bermejo, Marival and Devanathan, Subramanyam and Dixit, Rakesh and El-Kattan, Ayman and Guo, Elliott and Li, Xiaoying and Peer, Cody J and Pierce, David and others},
journal={Journal of Pharmacokinetics and Pharmacodynamics},
volume={47},
number={6},
pages={507--523},
year={2020},
publisher={Springer},
doi={10.1007/s10928-020-09706-z}
}

@article{svensson2016topics,
title={Topics in Pharmacometric Modelling: Model Linearization and Handling Time-varying Covariates},
author={Svensson, Elin M.},
journal={Acta Universitatis Upsaliensis},
year={2016},
publisher={Uppsala University}
}

@article{mager2001target,
title={Target-mediated drug disposition and dynamics},
author={Mager, Donald E and Jusko, William J},
journal={Pharmaceutical Research},
volume={18},
number={10},
pages={1335--1359},
year={2001},
publisher={Springer},
doi={10.1023/A:1013094919537}
}

@article{singh2015antibody,
title={Antibody-drug conjugates: design, delivery and fate},
author={Singh, Alok P and Sharma, Sharad and Shah, Dhaval K},
journal={Current Drug Discovery Technologies},
volume={12},
number={3},
pages={177--188},
year={2015},
publisher={Bentham Science Publishers},
doi={10.2174/1570163812666150902094738}
}

@article{ribba2017methodologies,
title={Methodologies for quantitative systems pharmacology (QSP) models: design and estimation},
author={Ribba, Benjamin and Grimm, Hans Peter and Agoram, Balaji and Davies, Michael R and Gadkar, Kapil and Niederer, Steven and van Riel, Natal and Timmis, Jon and van der Graaf, Piet H},
journal={CPT: Pharmacometrics \& Systems Pharmacology},
volume={6},
number={8},
pages={496--498},
year={2017},
publisher={Wiley Online Library},
doi={10.1002/psp4.12226}
}

@article{elmokadem2019parallel,
title={Parallel computing in pharmaceutical development: an industry perspective},
author={El-Mokadem, Abdallah and Eldeib, Ayman and El-Din, Mohammed Salah Zaki and Abdel-Aleem, Mohammed and Badawi, Ahmed and Sallam, Elsayed},
journal={Drug Development and Industrial Pharmacy},
volume={45},
number={6},
pages={934--944},
year={2019},
publisher={Taylor \& Francis},
doi={10.1080/03639045.2019.1583755}
}
Loading
Loading