From da24ef570a313bc6152e14d3173b10cdc209cfc9 Mon Sep 17 00:00:00 2001 From: Markus Date: Sun, 18 Jan 2026 15:40:30 +0100 Subject: [PATCH 1/3] paper: Pre-review changes --- .gitignore | 1 + joss/paper.bib | 20 ++++++++++++++++++++ joss/paper.md | 22 +++++++++++++++++++++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b58d307b..58a44b53 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ Cargo.lock *.pkm /paper_files paper.html +/joss/paper_files diff --git a/joss/paper.bib b/joss/paper.bib index 51a95c48..6000bd3d 100644 --- a/joss/paper.bib +++ b/joss/paper.bib @@ -76,4 +76,24 @@ @Article{npag publisher = {MDPI AG}, } +@Book{npod, + author = {Hovd, Markus and Kryshchenko, Alona and Neely, Michael N. and Otalvaro, Julian and Schumitzky, Alan and Yamada, Walter M.}, + editor = {Cristina Garcia-Cardona and Harlin Lee}, + publisher = {Springer Nature Switzerland}, + title = {A Non-parametric Optimal Design Algorithm for Population Pharmacokinetics}, + year = {2025}, + address = {Cham}, + isbn = {9783031878046}, + number = {37}, + series = {Association for Women in Mathematics Series}, + booktitle = {Advances in Data Science: Women in Data Science and Mathematics (WiSDM) 2023}, + doi = {10.1007/978-3-031-87804-6_12}, + issn = {2364-5741}, + pages = {259--274}, + pagetotal = {1357}, + ppn_gvk = {1937384802}, + subtitle = {Women in data science and mathematics (WiSDM) 2023}, + url = {https://doi.org/10.1007/978-3-031-87804-6_12}, +} + @Comment{jabref-meta: databaseType:bibtex;} diff --git a/joss/paper.md b/joss/paper.md index 867d586c..d154c40c 100644 --- a/joss/paper.md +++ b/joss/paper.md @@ -39,6 +39,22 @@ Pharmacokinetic and pharmacodynamic modeling and simulation are computationally As a fully open-source solution, `pharmsol` empowers users to inspect, modify, and extend the simulation capabilities without licensing constraints. Users can define custom models by specifying their own differential equations as closures, or use the provided analytical solutions for standard compartmental models. Additionally, `pharmsol` can be integrated in more user-friendly languages such as R using `extendr` [@extendr], making it accessible to pharmacometricians who may prefer higher-level interfaces. +# Software design + +To the authors' knowledge, `pharmsol` is the first software written in Rust for pharmacokinetic modeling and simulation. The design of `pharmsol` is to provide a flexible and efficient API for solving pharmacokinetic problems. It aims to provide researchers and pharmacometricians with a fast and flexible solver for pharmacokinetic problems. + +These problems are defined by two key aspects: the pharmacokinetic data, and the structural model. While the data structure is explained in detail below, the structural model is more complex. In `pharmsol`, models are defined using a set of closures, providing methods to define the set of equations that describe the mass transfer of drug, as well as initial conditions and output equations, i.e. detailing the initial and observed states of the system. Bioavailability terms and lag-time of absorption is also supported. Covariates may be applied on both parameters and state values. Importantly, `pharmsol` provides both linear interpolation and carry-forward for covariates, both common in population pharmacokinetic models. + +The three different solver types, i.e. analytical, ODE, and SDE based, are all build around a common `Equation` trait. This allows for + +# Research impact statement + +As a tool for pharmacokinetic modelling and simulation, `pharmsol` has already demonstrated research impact. Most notably, it is used as a simulation engine for the Rust crate `PMcore` and `Pmetrics` [@pmetrics] - the _de facto_ R package for non-parametric population pharmacokinetic modelling and simulation. + +Additionally, `pharmsol` has been used to generate results in scientific publications, such as the creation of a new algorithm for non-parametric parameter estimation [@npod]. + +Internally, `pharmsol` is also used for simulating alternative dose regimens to individualize drug therapy in patients. + # Data format `pharmsol` is designed around a hierarchical data structure that models the typical organization of pharmacometric data. The primary data struct, `Data`, is a collection of `Subject`s, which may have one or more `Occasion`s, i.e. separate pharmacokinetic investigations. Each occasion consists of one or more `Event`s, e.g. an instantaneous dose (bolus), infusions of drug, or observed concentrations at given times. @@ -47,7 +63,7 @@ As a fully open-source solution, `pharmsol` empowers users to inspect, modify, a Data → Subject → Occasion → Event (Bolus, Infusion, Observation) ``` -Currently, `pharmsol` provides methods to parse the Pmetrics [@pmetrics] data format. In the future, we aim to also support additional formats, such as those used by NONMEM, Monolix [@monolix], and more. +Currently, `pharmsol` provides methods to parse the Pmetrics [@pmetrics] data format. In the future, we aim to also support additional formats, such as those used by NONMEM, Monolix [@monolix], and more. Data may also be built using a provided builder-pattern, providing a flexible method for defining subjects on the go for pharmacometricians comfortable with Rust. This is especially useful when integrating `pharmsol` with third-party software, as it allows for reading and generating data that is not in a supported format. # Supported equation formats @@ -69,6 +85,10 @@ Experimental support for stochastic differential equations (SDEs) is available u `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. +# AI usage disclosure + +The authors declare that generative AI has been used during software development and manuscript preparation. For software development, generative AI has been used to generate code by instruction, refactor existing code, produce tests and write documentation. For the manuscript, generative AI was used to improve the language of the submission. The use of generative AI was reviewed, edited, and verified by the authors. The authors take full responsibility for the contents of the submission, and for the software within the scopes of the software license. + # Acknowledgements We acknowledge the intellectual contributions to the package by members of the Laboratory of Applied Pharmacokinetics and Bioinformatics (LAPKB), and feedback from the pharmacokinetics research group at the University of Oslo. From eee53fc49367c4fecd433bdf0904af1cfb597c71 Mon Sep 17 00:00:00 2001 From: Markus Hovd Date: Sun, 18 Jan 2026 15:43:22 +0100 Subject: [PATCH 2/3] Update joss/paper.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- joss/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joss/paper.md b/joss/paper.md index d154c40c..79c2e6ac 100644 --- a/joss/paper.md +++ b/joss/paper.md @@ -45,7 +45,7 @@ To the authors' knowledge, `pharmsol` is the first software written in Rust for These problems are defined by two key aspects: the pharmacokinetic data, and the structural model. While the data structure is explained in detail below, the structural model is more complex. In `pharmsol`, models are defined using a set of closures, providing methods to define the set of equations that describe the mass transfer of drug, as well as initial conditions and output equations, i.e. detailing the initial and observed states of the system. Bioavailability terms and lag-time of absorption is also supported. Covariates may be applied on both parameters and state values. Importantly, `pharmsol` provides both linear interpolation and carry-forward for covariates, both common in population pharmacokinetic models. -The three different solver types, i.e. analytical, ODE, and SDE based, are all build around a common `Equation` trait. This allows for +The three different solver types, i.e. analytical, ODE, and SDE based, are all built around a common `Equation` trait. This allows for # Research impact statement From a289d64a2c1d1de7621ebfdacf552163e3cf646c Mon Sep 17 00:00:00 2001 From: Julian Otalvaro Date: Mon, 19 Jan 2026 12:12:13 +0000 Subject: [PATCH 3/3] paper: Comments by Julian (#202) --- joss/paper.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/joss/paper.md b/joss/paper.md index 79c2e6ac..9eac5cfc 100644 --- a/joss/paper.md +++ b/joss/paper.md @@ -41,15 +41,15 @@ As a fully open-source solution, `pharmsol` empowers users to inspect, modify, a # Software design -To the authors' knowledge, `pharmsol` is the first software written in Rust for pharmacokinetic modeling and simulation. The design of `pharmsol` is to provide a flexible and efficient API for solving pharmacokinetic problems. It aims to provide researchers and pharmacometricians with a fast and flexible solver for pharmacokinetic problems. +To the authors' knowledge, `pharmsol` is the first software written in Rust for pharmacokinetic modeling and simulation. The design principle of `pharmsol` is to provide researchers and pharmacometricians a flexible and efficient library for solving pharmacokinetic problems. These problems are defined by two key aspects: the pharmacokinetic data, and the structural model. While the data structure is explained in detail below, the structural model is more complex. In `pharmsol`, models are defined using a set of closures, providing methods to define the set of equations that describe the mass transfer of drug, as well as initial conditions and output equations, i.e. detailing the initial and observed states of the system. Bioavailability terms and lag-time of absorption is also supported. Covariates may be applied on both parameters and state values. Importantly, `pharmsol` provides both linear interpolation and carry-forward for covariates, both common in population pharmacokinetic models. -The three different solver types, i.e. analytical, ODE, and SDE based, are all built around a common `Equation` trait. This allows for +The three different solver types, i.e. analytical, ODE, and SDE based, are all built around a common `Equation` trait. This gives `Pharmsol` a modular design, allowing users to easily extend the library with new solvers or to rely on it while being agnostic on the underlying solver type. This flexibility is particularly useful when integrating `pharmsol` with other software, as it allows users to select the most appropriate solver for their specific use case (e.g., speed vs. model complexity). # Research impact statement -As a tool for pharmacokinetic modelling and simulation, `pharmsol` has already demonstrated research impact. Most notably, it is used as a simulation engine for the Rust crate `PMcore` and `Pmetrics` [@pmetrics] - the _de facto_ R package for non-parametric population pharmacokinetic modelling and simulation. +As a tool for pharmacokinetic modelling and simulation, `pharmsol` has already demonstrated research impact. Most notably, it is used as a simulation engine for the Rust crate `PMcore` and `Pmetrics` [@pmetrics] - the _de facto_ R package for non-parametric population pharmacokinetic modelling and simulation. Additionally, `pharmsol` has been used to generate results in scientific publications, such as the creation of a new algorithm for non-parametric parameter estimation [@npod]. @@ -67,11 +67,11 @@ Currently, `pharmsol` provides methods to parse the Pmetrics [@pmetrics] data fo # Supported equation formats -The equation module provides the mathematical foundation for simulating PK/PD output with three model equation solver types: analytical solutions, ordinary differential equations, and experimental support for stochastic differential equations. +As stated before the `Equation` trait provides the architectural backbone for simulating PK/PD profiles. Pharmsol currently also provides three solvers implementing this trait: analytical solutions, ordinary differential equations, and experimental support for stochastic differential equations. ## 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, 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. ## Ordinary Differential Equations