pmcore/lib.rs
1//! PMcore is a framework for developing and running non-parametric algorithms for population pharmacokinetic modelling
2//!
3//! The framework is designed to be modular and flexible, allowing for easy integration of new algorithms and methods. It is heavily designed around the specifications for Pmetrics, a package for R, and is designed to be used in conjunction with it. However, as a general rust library, it can be used for a wide variety of applications, not limited to pharmacometrics.
4//!
5//! # Configuration
6//!
7//! PMcore is configured using [routines::settings::Settings], which specifies the settings for the program.
8//!
9//! # Data format
10//!
11//! PMcore is heavily linked to [pharmsol], which provides the data structures and routines for handling pharmacokinetic data. The data is stored in a [pharmsol::Data] structure, and can either be read from a CSV file, using [pharmsol::data::parse_pmetrics::read_pmetrics], or created dynamically using the [pharmsol::data::builder::SubjectBuilder].
12//!
13
14/// Provides the various algorithms used within the framework
15// pub mod algorithms;
16pub mod algorithms;
17
18/// Routines
19pub mod routines;
20
21// Structures
22pub mod structs;
23
24// Re-export commonly used items
25pub use anyhow::Result;
26pub use std::collections::HashMap;
27
28/// A collection of commonly used items to simplify imports.
29pub mod prelude {
30 pub use super::HashMap;
31 pub use super::Result;
32 pub use crate::algorithms;
33 pub use crate::algorithms::dispatch_algorithm;
34 pub use crate::algorithms::Algorithm;
35 pub use crate::routines;
36 pub use crate::routines::logger;
37
38 pub use crate::routines::initialization::Prior;
39
40 pub use crate::routines::settings::ErrorModel;
41 pub use crate::routines::settings::*;
42 pub use crate::structs::*;
43
44 //Alma re-exports
45 pub mod simulator {
46 pub use pharmsol::prelude::simulator::*;
47 }
48 pub mod data {
49 pub use pharmsol::prelude::data::*;
50 }
51 pub mod models {
52 pub use pharmsol::prelude::models::*;
53 }
54
55 //traits
56 pub use pharmsol::data::*;
57 pub use pharmsol::equation::Equation;
58 pub use pharmsol::equation::EquationTypes;
59 pub use pharmsol::equation::Predictions;
60 pub use pharmsol::equation::*;
61 pub use pharmsol::prelude::*;
62 pub use pharmsol::simulator::*;
63 pub use pharmsol::ODE;
64 pub use pharmsol::SDE;
65
66 //macros
67 pub use pharmsol::fa;
68 pub use pharmsol::fetch_cov;
69 pub use pharmsol::fetch_params;
70 pub use pharmsol::lag;
71}