Dear all,

In the last couple of months I have been working on NMGUI2, a graphical user 
interface for pharmacometric workflows with NONMEM, R, RStudio and PSN, mainly 
for my own use, but would like to share it. It runs in Python and should 
therefore natively run on Windows, MacOS and LINUX as long as Python (version 
>3.10) is installed.

It is free and open-source and can be downloaded through 
https://github.com/robterheine/nmgui2 .  Contributions or bug reports are 
warmly welcomed!

The current version of NMGUI (2.5) has the following features:

Model browser
Opens a directory and displays all NONMEM control stream files (.mod/.ctl) in a 
sortable, filterable table. Columns include OFV, ΔOFV relative to a reference 
model, minimisation status, covariance step result, condition number, 
estimation method, number of individuals and observations, number of estimated 
parameters, AIC, and runtime. Rows are colour-coded: green for converged, red 
for failed, orange for stale (control stream or dataset modified after the last 
run). Free-text search and filter buttons (All / Completed / Failed / Starred) 
narrow the list quickly.

Model comparison
Right-click any model to compare it with another. A side-by-side dialog shows 
parameter estimates from both models with aligned rows, and a statistics strip 
with ΔOFV, ΔAIC, ΔBIC, difference in parameter count, LRT p-value, and a 
plain-English verdict (nested/non-nested, significant or not).

Model workbench
A sortable table of all completed models in the current directory with OFV, 
ΔOFV, AIC, BIC, and LRT p-values computed against a user-selected reference. 
Useful at the end of a covariate search for a quick ranked overview. Exportable 
to CSV.

Model editor
Syntax-highlighted editor for control streams with a Save button.

Model ancestry tree
An interactive node graph of model genealogy, based on the standard PsN 
parent-model header line or a manually set parent. Zoom, pan, double-click a 
node to select that model in the table. Useful as a visual record of the 
model-building sequence.

Running models
Any PsN tool can be launched directly: execute, vpc, bootstrap, scm, sir, cdd, 
npc, sse. Each run opens in its own floating window with a live console, an 
iteration and OFV progress indicator (updated in real time from NONMEM output), 
an elapsed timer, and a Stop button offering either a gentle stop (allows PsN 
to finish writing output) or an immediate force kill. Multiple models can run 
simultaneously. An Active & Recent Runs table in the Run panel shows all live 
and historical runs for the current project folder, persists across restarts, 
and lets you click a live row to raise its window.

Run records
Every run automatically creates an immutable audit record containing a unique 
run ID, SHA-256 hash of the control stream and dataset at the time of the run, 
NONMEM/PsN/NMGUI versions, start and end timestamps, duration, final OFV, 
minimisation status, covariance status, and the full command used.

Output viewer
The .lst file is rendered as structured HTML inside the app: a summary strip 
with key results, an estimation steps table for chained $EST runs (e.g. FO → 
FOCE → IMP) showing per-step OFV, ΔOFV, runtime, significant digits and 
termination status, NM-TRAN compilation warnings, convergence table, parameter 
estimates with standard errors, ETABAR with p-values, shrinkage (ETA and EPS), 
correlation and covariance matrices, and eigenvalues with condition number. The 
full HTML can be exported and opened in a browser.

Parameter table
Full THETA/OMEGA/SIGMA table with parameter names (parsed from comments in the 
control stream), estimates, standard errors, RSE%, 95% confidence intervals, 
and standard deviation for variance parameters. BLOCK(n) and BLOCK(n) SAME 
designs are handled correctly. Collapsible by section. Exportable to CSV and as 
a self-contained HTML report.

Goodness-of-fit diagnostics
Native diagnostic plots that do not require R: DV vs PRED, DV vs IPRED, CWRES 
vs TIME, CWRES vs PRED, CWRES histogram with normal distribution overlay, QQ 
plot with Shapiro-Wilk test and 95% confidence band, and ETA vs covariate 
scatter plots with LOESS overlay. Auto-loads the sdtab file when a model is 
selected.

Individual fits
Paginated DV/IPRED/PRED vs TIME plots per subject, with a configurable number 
of panels per page.

OFV waterfall
Ranked ΔOFV bar chart across all completed models in the current directory — 
useful as a final overview of the covariate search results.

Data explorer
Interactive scatter plot of any table file with any X/Y combination, colour by 
any column, multi-condition filtering, and a paginated data table view.

VPC
Visual Predictive Checks generated via three R backends: vpc, xpose, or xpose4. 
Options include prediction-corrected VPC, stratification by any column (with 
validation), configurable prediction and confidence intervals, LLOQ shading, 
log Y axis, and number of bins. The underlying R script is editable before 
running. Output is displayed as a PNG inside the app and can be saved as a 
high-resolution PNG or vector PDF.

Parameter uncertainty assessment

Run a new bootstrap or SIR via PsN or load an existing results folder. Produces 
a summary and overall assessment report.

QC report
Right-click any completed model to generate a self-contained HTML 
quality-control report with a PASS/WARN/FAIL checklist covering: termination 
status, covariance step, condition number, maximum %RSE, parameter 
correlations, ETA and EPS shrinkage, ETABAR p-values, and OMEGA boundary 
proximity.

Dataset integrity checks
At scan time, each model's data file is automatically checked for: missing 
file, column-count mismatches between header and data, non-monotonic TIME 
within an individual, duplicate dose records, extreme DV values, and high BLQ 
proportion. Issues appear in the Info panel.

Model annotations
Each model can be tagged (Base / Candidate / Final / Reject), given a one-line 
comment visible in the table, and given free-form notes. All annotations are 
persisted in a project metadata file and survive rescans.

History tab
Chronological log of all runs started from NMGUI2 (last 200 entries across all 
projects), with status, model name, tool, full command, start time and duration.

Settings
Dark and light theme (follows the system or manually overridden). Path 
configuration for NONMEM, PsN, R and RStudio. Directory bookmarks for quick 
access to frequently-used project folders. Optional GitHub update check.

Cheers,
Rob

De informatie in dit bericht is uitsluitend bestemd voor de geadresseerde. Aan 
dit bericht en de bijlagen kunnen geen rechten worden ontleend. Heeft u deze 
e-mail onbedoeld ontvangen? Dan verzoeken wij u het te vernietigen en de 
afzender te informeren. Openbaar maken, kopieren en verspreiden van deze e-mail 
of informatie uit deze e-mail is alleen toegestaan met voorafgaande 
schriftelijke toestemming van de afzender. Het Radboudumc staat geregistreerd 
bij de Kamer van Koophandel in het handelsregister onder nummer 80262783.

The content of this message is intended solely for the addressee. No rights can 
be derived from this message or its attachments. If you are not the intended 
recipient, we kindly request you to delete the message and inform the sender. 
It is strictly prohibited to disclose, copy or distribute this email or the 
information inside it, without a written consent from the sender. Radboud 
university medical center is registered with the Dutch Chamber of Commerce 
trade register with number 80262783.

Reply via email to