Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>MNE — Make NONMEM EasierNew to Visual Studio Code? Get it now.
MNE — Make NONMEM Easier

MNE — Make NONMEM Easier

slow-walker66

|
19 installs
| (0) | Free
Local-first NONMEM, PsN, VPC and Bootstrap workbench / 本地优先的群体药动学建模工作台
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MNE — Make NONMEM Easier

New in 0.1.4 / 0.1.4 更新

  • Modeling Overview: six action icons, nested Tools/context menus, direct SCM access, multi-selection, 2–100-model result comparison and persistent hide/unhide. Code comparison stays two-pane with switchable pairs. / 六个操作图标、多级工具及右键菜单、SCM 直接入口、多选、多模型结果比较和持久化隐藏管理;代码保持双栏,可切换模型组合。
  • Model preparation and editing: new empty model creation, header-only $INPUT Mapper, 31 curated snippets, parameter hover/navigation, Outline and folding. Models and data are never silently rewritten. / 新建空模型、仅读表头的 $INPUT Mapper、31 个代码片段、参数悬停与导航、结构大纲及折叠,不静默改写模型或数据。
  • Model Summary Report: independently choose each section's model/task/plot, including earlier SCM runs; export English HTML/Word with MNE branding, logo watermark and three-line tables. Plain-language methods and a compact VPC settings table replace raw configuration JSON. / 按章节选择模型、任务及绘图版本,可选前期 SCM;生成品牌化英文 HTML/Word 报告;方法说明和 VPC 设置表替代原始 JSON。
  • Release protection: bundled/minified JavaScript, exact package allowlist and no source maps or development sources. Required R/template resources remain available locally and can still be inspected. / 生产代码合并压缩、精确打包白名单、不分发 source map 与开发源码;必要 R/模板资源仍在本地,不能保证防提取或防逆向。
  • License: restricted to personal learning and non-commercial academic research for newly licensed MNE-owned material. Enterprise/CRO use, paid services and other commercial purposes require written authorization from 苏州析模生物科技有限公司. Previously granted MIT rights and third-party licenses remain unchanged. / 新许可适用的自有内容仅限个人学习及非商业学术研究,商业用途须另获公司书面授权;既有 MIT 与第三方许可不变。

Exploratory Analysis, SIR and FREM are Planned, not active workflows. See the Changelog tab for the detailed bilingual release notes. / 探索性分析、SIR、FREM 仅为预留入口;完整中英文更新记录见 Changelog。

Model Summary Report / 模型汇总报告

Report prose describes the recorded covariate methods and highlighting thresholds in English. VPC/pcVPC settings appear in a compact table (TIME/TALD, units, binning, stratification and scales), without raw JSON. Complete source configurations remain in the report's snapshotted assets. Regenerate a report after updating; previously generated files are not overwritten or migrated.

报告正文将协变量方法和阈值写成英文说明,VPC/pcVPC 设置整理为简洁表格,不再直接输出 JSON;完整配置仍保留在报告快照文件中。更新后需重新生成报告,已生成文件不会自动覆盖或改写。

Right-click a model file or Run Tree model node → Generate Model Report…, or select an Overview row → Model Report. One page lets you independently select the source model/task/plot for parameters, GOF, ETA, covariates, SCM, VPC and Bootstrap. Earlier SCM models can be selected explicitly. Reports reuse existing results without rerunning analyses; cross-model sources are labeled and copied into a fixed, hash-tracked snapshot.

Export English HTML and editable Word reports with MNE branding, the supplied logo watermark, page header/footer and www.clinicalpharmpmx.com. Each generation creates .nmw/reports/<model>/report_###/. Use Open Task Folder and retain the entire folder for PDF/listing attachments. Requires Quarto plus jsonlite, knitr, rmarkdown in the MNE-selected R environment; Quarto is optional for all other workflows. PowerPoint is not included in this first version.

模型文件、Run Tree 模型节点右键 → Generate Model Report…,或选中 Overview 行 → Model Report。同一页面独立选择参数表、GOF、ETA、协变量、SCM、VPC、Bootstrap 的来源模型及任务/绘图版本,SCM 可手动选前期模型。不重新跑模型或分析;跨模型来源明确标注,并保存结果快照。输出英文 HTML 与可编辑 Word,带 MNE 页眉、Logo 水印、页码及指定网址;保存于 .nmw/reports/,支持 Open Task Folder。本版不含 PPTX;已有原始结果尚未导入 MNE 时,请先用现有 Import Existing Run 功能。

Model setup tools / 模型创建工具

  • New NONMEM Model: right-click a folder, use the Overview New Model icon, or run MNE: New NONMEM Model. One page lets you set folder, filename, .mod/.ctl, and starting point. The default is a truly empty file; the optional commented skeleton is not ready to run and selects no ADVAN, equations, estimates or estimation method. Existing filenames/model identities are protected, and the new document opens in NONMEM mode. No process, run record, or .nmw output is created.
  • Input Mapper: right-click a .csv/.txt/.dat dataset, use Overview → Tools → Data & Model Preparation, or run MNE: Input Mapper. Review the dataset, delimiter and header row on one page. Every mapping is editable, including exact matches; preview and copy $INPUT without editing any model or dataset. Custom labels are positional names, not transformations: CONC → LNDV emits LNDV, not CONC=LNDV; reserved aliases such as CONC=DV remain supported.
  • Column order, empty columns and duplicate headers are preserved. Conflicting active labels block Copy but keep the preview visible; missing ID is a warning. DROP always occupies its original position. Names use the standard NONMEM 7 limit of 24 characters. Configure header exclusion in $DATA separately; the Mapper does not check dataset values, units or full-model compatibility.
  • Header reading uses TypeScript, at most 256 KiB, with no R or new dependency. Supports UTF-8 and BOM-marked UTF-16, comma/tab/semicolon/whitespace, quoted headers, Windows CRLF, manual header-row selection and headerless files with editable placeholder names. Decoding a file for preview does not make its encoding/delimiter NONMEM-compatible. Automatic discovery is bounded (250 files, 5000 entries, 5 nested levels) and excludes common run/output folders; Browse remains available, even without a workspace.

新建模型: 文件夹右键或 MNE 工具栏选择 New NONMEM Model,在同一页面填写目录、名称、扩展名和起点。默认创建真正的空文件,可选不预设建模方法的注释骨架;骨架不能直接运行。不覆盖已有模型、不执行环境检查、不产生运行记录。

Input Mapper: 数据文件右键选择 Input Mapper,或从命令面板/Overview → Tools → Data & Model Preparation 打开。在同一页面调整文件、分隔符、表头行及所有变量映射,实时预览并复制 $INPUT。严格保持物理列顺序;空列、重复列不会被自动删除。仅复制代码,不修改数据、模型或执行数值转换,不依赖 R。没有表头时可选择无表头模式并手动分配名称;换文件或表头设置会重置映射,复制前会检查文件是否发生变化。

Model editing assistance / 模型编辑辅助

Open a .mod or .ctl file in NONMEM language mode (the language label in the editor status bar).

  • Type mne- and invoke Trigger Suggest (usually Ctrl+Space), or run MNE: Insert Model Snippet from the command palette or model editor's right-click menu. There are 31 curated PK/record templates; use Tab/Shift+Tab to fill placeholders. ADVAN/TRANS snippets select a routine, not a complete runnable model.
  • Hover over THETA/ETA/EPS to inspect the current source declaration, FIX status and declaration-line comment. These are initial declarations, not fitted estimates. Hover also explains common control records and shows source assignments for user variables.
  • Use Go to Definition (F12) and Find All References (Shift+F12). Mapping is scoped to the current $PROBLEM; comments, strings and verbatim lines are excluded. BLOCK matrices map ETA/EPS to diagonal entries; SAME navigation includes the shared original declaration.
  • The editor's Outline lists problems, control records and parameters. Collapse individual records using gutter folding controls. This does not replace or rearrange the MNE Run Tree.

打开 .mod/.ctl,确认编辑器右下角语言为 NONMEM。输入 mne- 调用补全,或在命令面板运行 MNE: Insert Model Snippet,用 Tab 填写模板。悬停查看当前源码中的参数初始声明与注释;F12 跳转定义,Shift+F12 查找引用;Outline 展示模型结构,左侧折叠按钮折叠控制记录。共 31 个精选模板,须自行核对参数编号、变量、单位及适用条件。

MNE residual-error templates use THETA-parameterized SDs and require a matching unit-variance EPS (SIGMA 1 FIX). They do not insert/renumber THETA or SIGMA automatically. GOF/ETA/COTAB/CATAB tables must contain variables available in the actual model. Advanced PD/TTE/BQL/mixture templates are not included in this first batch.

残差模板使用 THETA 表示 SD,要求对应 EPS 的方差为 1;不会自动补充或重排 THETA/SIGMA。表格模板中的协变量是可编辑示例,不能未经核对直接运行。没有新增模型自动改写、实时诊断、自动格式化或任何外部进程调用;现有运行和结果分析流程不变。

Scope and limits: conventional numeric THETA declarations and numeric diagonal/BLOCK OMEGA/SIGMA records are supported. Symbolic/named/repeated parameter declarations, multiline THETA tuples, imported MSFI/CHAIN values and context-dependent ERR bindings without SIGMA are not fully resolved. Unsupported parameter syntax suppresses that family's navigation in the problem instead of guessing; it is not a NONMEM error or a run blocker. Large source files (>2 MB or 50,000 lines) skip editor parsing. No result files are parsed by these providers.

Set nonmemWorkbench.editorAssistance.enabled to false to disable MNE hover/navigation/Outline/folding (static snippets remain available). If the separate NMTRAN extension is installed, its nmtran language mode remains owned by that extension; MNE does not register duplicate providers there or silently change file associations. Choose NONMEM for MNE editing features. An explicit MNE snippet insertion command also works on model files in another language mode.

Adapted utilities and selected snippets: vrognas/vrognas-nmtran (MIT), pinned commit and changes documented in the extension's NOTICE.md and third-party/nmtran/PROVENANCE.json. No additional extension, R runtime or NONMEM installation is required merely to use these editing features.

A local-first VS Code workbench for NONMEM, PsN, and pharmacometrics modeling.

一个面向 NONMEM、PsN 与群体药动学/药效学建模的本地优先 VS Code 工作台。

MNE helps pharmacometricians create, run, compare, and evaluate NONMEM models without leaving VS Code. NONMEM, PsN, and R are external requirements and are not bundled.

Core workflows include:

  • NONMEM model creation and duplication
  • PsN execution and safe update_inits
  • Modeling Overview with model lineage and fit statistics
  • code and normalized result comparison
  • GOF, individual-fit, and editable parameter reports
  • VPC and pcVPC workflows
  • PsN bootstrap with an editable English Word report
  • subject-level continuous and categorical covariate association analysis
  • NONMEM syntax highlighting

Current release status / 当前版本:MNE v0.1.4 remains macOS-first. Windows compatibility has been improved and user testing is ongoing; Windows/Linux end-to-end compatibility is not fully verified. MNE v0.1.4 仍主要在 macOS 上验证,持续改善 Windows 兼容性并进行用户测试;Windows/Linux 全流程兼容性尚未完全验证。

What is MNE? / MNE 是什么?

MNE is an independent locally running tool for local NONMEM model development. It provides a VS Code interface around existing local tools and the repository's established R analysis backends.

MNE is not an official NONMEM or PsN product. NONMEM and PsN are external software and are not distributed with this extension.

MNE 是独立的本地建模工具,通过 VS Code 界面连接本地 NONMEM、PsN 和经过验证的 R 分析后端。MNE 并非 NONMEM 或 PsN 官方产品,也不随扩展分发这些外部软件。

New in 0.1.3 / 0.1.3 更新

  1. Bug fixes / 问题修复: Fixed known bugs and improved runtime-environment compatibility. 修复已知 bug,改善运行环境兼容性。

  2. Run Tree enhancements / Run Tree 增强: Added a Raw Output virtual group for this run's declared $TABLE outputs and .lst file, without copying or moving files. Supported tables offer right-click covariate exploration/correlation and GOF analysis, with run-specific provenance checks to avoid using stale or unrelated outputs. Existing SCM task results remain accessible in the tree; SCM setup is launched from the model-file context menu. 新增 Raw Output 虚拟分组,集中展示本次运行的 $TABLE 输出和 .lst 文件,不复制或移动原始文件。支持对适用表格在树内右键进行协变量探索性/相关性分析及 GOF 分析,并校验运行来源,避免误用旧文件或其他模型的输出。保留树内已有 SCM 任务结果入口;启动 SCM 仍通过模型文件右键菜单。

  3. Model ratings and organization / 模型星级管理: Added 1–5-star ratings, personal notes, minimum-rating filters, Show All Runs, and sorting by model number or rating first. Quickly locate important models while retaining the existing tree structure. Ratings persist for reruns of the same model number and are personal annotations, not scientific model-quality scores. 新增 1–5 星评级、备注、最低星级筛选、显示全部,以及按模型编号或星级优先排序,方便快速定位重要模型,并保留现有树结构。同编号重跑保留评级;星级仅为个人标记,不代表模型科学质量评价。

  4. R runtime selection / R 环境选择: On first use without an explicit R setting, automatically discover installed R runtimes, check actual package loading, and recommend the environment best suited to MNE's available features. When multiple R versions are installed, compare feature readiness before version numbers. Confirm once and reuse the choice for this workspace on this computer; rescan or switch through Check Environment → Select R Runtime. No automatic package installation or system PATH changes. 首次使用且未显式配置 R 时,自动发现已安装的 R 环境、检查包能否实际加载,并推荐更符合 MNE 功能需求的环境。电脑存在多个 R 版本时,优先比较功能可用性,再比较版本;确认后在本机当前工作区记住选择,不重复弹窗。可通过 Check Environment → Select R Runtime 重新扫描或切换,不自动安装包或修改系统 PATH。

New in 0.1.2 / 0.1.2 更新

  • Ordinary execute reuses its confirmed environment within the current VS Code session; it does not repeat the ready/command approval page until environment evidence changes. Trust, unsaved edits, inputs and write permissions are still checked every run. Use Check Environment → Recheck after installing tools or R packages. SCM, Bootstrap, VPC and Retries retain their same-page preflight/preview. / 普通运行复用当前会话已确认环境,不再每次弹出准备确认;环境变化后重新检查,每次仍校验信任、未保存修改、输入及写权限。安装工具或 R 包后可手动 Recheck;生成新模型的工作流保留同页检查与预览。
  • VPC/pcVPC offers TIME / TALD at plotting only. TALD must already be finite numeric data in both observation and simulation tables. Repeated-dose TALDs stay together within bins; quantiles are computed per simulation replicate before confidence intervals. TALD count bins may resolve to fewer bins to preserve ties. No automatic TALD calculation, model TIME change or simulation rerun occurs during replotting. / 绘图页选择 TIME/TALD;TALD 须已存在于观测和模拟表。重复给药按 TALD 分箱汇总,先逐模拟重复计算分位数再计算区间;不拆散相同 TALD,实际箱数可能较少。不自动计算 TALD、不改模型 TIME、不因重绘而重跑模拟。
  • Drag one or more SCM continuous forms into an ordered selection, mapped to [valid_states] with the default PsN sequential mechanism. No parallel_states or custom minimum-OFV algorithm is added. Final-model export uses dedicated DATA-path/provenance validation, preserving estimates and equations. / SCM 支持拖入多种形式,按顺序写入 valid_states,沿用 PsN 默认机制;最终模型导出采用独立路径与来源校验,保留估计值与方程。
  • Open Task Folder is available for GOF, VPC, Bootstrap and SCM. The existing .nmw layout is retained without migrating files. Keep SCM task data while a derived model references it. / 四个工作流提供打开任务文件夹入口,保留原有 .nmw 布局,不迁移文件;派生模型使用任务数据期间请保留该任务。

See the Changelog tab for the complete bilingual 0.1.2 release notes. / 完整中英文 0.1.2 更新记录见 Changelog 页面。

Windows tools and R selection / Windows 工具与 R 环境选择

Windows PsN discovery prefers usable .bat, .cmd and .exe launchers over extensionless scripts. A configured installation folder or extensionless execute path is adapted automatically. MNE probes versions without running a model, keeps related commands in the selected PsN installation, and asks for a version only when ambiguous. Batch launchers use cmd.exe; no system PATH changes are made.

Windows 下自动选择可用启动器,可直接配置 PsN 目录或无扩展名 execute 路径;MNE 自动适配并用版本探测验证,不运行模型。同套安装优先解析各 PsN 命令,多版本无法确定时才询问,不改系统 PATH。

On first trusted use without an explicit R setting, MNE discovers Rscript installations (PATH, R_HOME, common directories and Windows R registry entries), checks actual package loading, and recommends a runtime by feature readiness before version. Confirm once or choose Continue without R. The choice is saved only for this workspace on this machine and reused after restarting VS Code. Optional Word package failures do not disable other ready features. Existing explicit R settings are respected. Use MNE: Check Environment → Select R Runtime to rescan, browse a custom installation or deliberately override the current choice. Later edits to the Rscript setting take precedence. A deleted runtime is reported rather than silently replaced.

首次在受信任工作区使用且未显式配置 R 时,自动发现各 R 环境并实际测试包加载,优先按功能可用性推荐、再比较版本。一次确认或选择暂不使用 R 后,本机当前工作区记住选择,重启后不重复弹窗;可选 Word 包失败不禁用其他已就绪功能。环境检查页提供 Select R Runtime 重新扫描/浏览/切换;之后修改 Rscript 设置优先生效,已选路径被删除时不静默换版本。不会安装包、升级 R 或修改模型。自定义位置未自动发现时可手动浏览;首次检查不保证未来任务目录的启动文件或包环境不发生变化,工作流仍保留现有 Preflight。

Run Tree: Raw Output and Ratings / 原始输出与星级

Raw Output is a virtual group containing only this run’s declared TABLE files and listing. No raw files are copied or moved. New executions record TABLE declarations and output fingerprints; opening/analyzing a missing or replaced file is blocked. Legacy runs expose only retained, unambiguous execution files; same-name files in the project folder are not assumed to belong to an old run. Explicitly imported listings are retained as references.

Raw Output 为虚拟分组,仅包含本次运行的 TABLE 输出与 lst,不复制或移动文件。新运行记录 TABLE 声明及输出指纹;文件被删除或覆盖后阻止分析。旧运行只展示来源可确认的留存文件,不自动使用项目目录的同名旧表;直接导入的 lst 保留引用。

Right-click COTAB/CATAB for Covariate Correlation, or a compatible diagnostic table for GOF. Pairing is confined to verified tables from the same attempt; analysis belongs to the tree’s run even if TABLE filenames contain another model number. Results appear in the existing Results group. Large tables are header-inspected with bounded reads, not loaded into the tree.

右键 COTAB/CATAB 可运行协变量相关性,兼容的诊断表可运行 GOF;配对限定同一次运行的已验证文件。即使 run50 输出 COTAB1,分析仍归 run50。结果在原 Results 分组呈现,展开树只限量读取表头。

Right-click a model to Set Rating (1–5 stars or Clear Rating) and Edit Personal Note. The Run Tree context menu provides Filter Runs, Show All Runs and Sort Runs (also available in the Command Palette). Default sorting is natural model-number order; rating-first sorting breaks ties by model number. Ratings persist across reruns, are not inherited by new model numbers, and express personal importance—not statistical quality or backup protection. Local annotations live in .nmw/run-annotations.json; source models and scientific results remain untouched.

右键模型设置 1–5 星/清除星级和个人备注;Run Tree 右键菜单提供筛选、显示全部及排序。默认按模型编号自然排序,也可星级优先。重跑保留标记,新编号不继承;星级仅表示个人重要性,不表示统计质量、锁定或备份。标记保存在 .nmw/run-annotations.json,不写入模型和科学结果。

Features / 功能介绍

  • Model development / 模型开发: Create or duplicate numbered .mod/.ctl models, safely apply final estimates through PsN update_inits, run with isolated retry directories, and import completed runs without rerunning NONMEM。创建或复制连续编号的模型,通过 PsN update_inits 安全更新初始值,使用隔离的重试目录执行模型,并可直接导入已有成功结果。
  • Modeling Overview and Run Tree / 建模总览与运行树: Review explicit model lineage, descriptions, datasets, ID/observation counts, OFV, dOFV, AIC, BIC, minimization/covariance status, notes, and generated artifacts。查看明确的模型继承关系、描述、数据集、ID/观测数、OFV、dOFV、AIC、BIC、最小化/协方差状态、备注与输出产物。
  • Model and result comparison / 模型与结果比较: Compare control-stream code with native VS Code diff or compare two normalized RunSummary results; two selected .lst or .ext files can launch result comparison directly。使用 VS Code 原生差异视图比较控制流代码,或比较两个标准化 RunSummary;也可直接选择两个 .lst 或 .ext 文件比较结果。
  • GOF and individual fits / GOF 与个体拟合图: Discover any compatible table by DV, PRED, IPRED, IWRES, and CWRES columns, use data-driven axes and editable labels/units, generate GOF images and a multipage individual-fit PDF, and gracefully report unavailable diagnostics for non-PK/TTE-style data。根据必需列自动发现兼容表格,使用数据驱动坐标范围及可编辑标签/单位,生成 GOF 与多页个体拟合 PDF;对于非 PK/TTE 类数据则明确提示诊断不可用,不影响模型成功状态。
  • Parameter and Bootstrap reports / 参数与 Bootstrap 报告: Generate editable English Word reports with Model Information, Population Typical Values, Inter-individual Variability, and Residual Error sections. Confirmed lognormal IIV uses the exact 100 × sqrt(exp(OMEGA) - 1) CV% conversion, consistently in model and Bootstrap summaries。生成全英文可编辑 Word 报告,包含模型信息、群体典型值、个体间变异和残差部分;对确认的对数正态 IIV,在模型与 Bootstrap 汇总中统一使用精确 CV% 换算。
  • ETA/EBE correlation / ETA/EBE 参数间相关性: Automatically select the most informative empirical ETA table and export parameter-labelled Pearson/BH correlation diagnostics, shrinkage warnings, PDF, PNG, and JSON results。自动选择信息最完整的经验 ETA 表格,输出带参数名称的 Pearson/BH 相关性、收缩率警告以及 PDF、PNG 和 JSON 结果。
  • Covariate correlation / 协变量相关性: Right-click COTAB* or CATAB* to run subject-level Spearman and Cramer's V diagnostics with BH/FDR correction, dynamic lower-triangle PDF matrices, ranked effects, paginated high-association details, Excel, and JSON exports。右键 COTAB* 或 CATAB* 即可运行受试者水平 Spearman 与 Cramer's V 诊断,并输出 BH/FDR 校正、动态下三角 PDF 矩阵、效应量排序、高相关分页结果、Excel 与 JSON。
  • VPC and pcVPC / VPC 与 pcVPC: Run and replot simulations with shared bins, editable display units, up to two facets, and CMT-level filtering。使用共享分箱、可编辑显示单位、最多两个分面变量与 CMT 水平筛选运行和重绘 VPC/pcVPC。
  • Local-first safety / 本地优先与安全: Keep NONMEM, PsN, R, models, and results local; honor Workspace Trust; never bundle study data; and highlight NONMEM syntax in .mod and .ctl files。NONMEM、PsN、R、模型和结果均保留在本地,遵循 Workspace Trust,不打包研究数据,并为 .mod/.ctl 提供语法高亮。

Typical Workflow / 典型工作流

SCM: Stepwise Covariate Modeling / 逐步协变量建模

SCM now defaults to Preserve all selected SCM covariates against candidate-specific PsN DROP. Referenced-only mode still protects inputs used by TABLE/code/data filters, with per-variable reasons in Command Preview. This retains input columns, not covariate effects; statistical selection is unchanged. Failed candidates are distinguished from non-selected candidates.

SCM 默认开启 Preserve all selected SCM covariates,防止 PsN 按候选模型 DROP 输入列;仅保护引用变量模式仍会自动保护 TABLE/代码/数据过滤器依赖,并在预览中解释原因。该选项只保留输入列,不代表协变量已入模,不改变统计筛选;候选模型失败也不再与未选中混淆。

Right-click a saved .mod or .ctl file in the workspace and choose MNE: Run SCM / Stepwise Covariate Modeling. A single page contains variable classification, the parameter–covariate matrix, relationship shape, search direction, significance thresholds and threads. Move variables by dragging or by selecting several and using Move selected here. Types are never inferred from names.

在工作区内右键已保存的 .mod / .ctl,选择 MNE: Run SCM / Stepwise Covariate Modeling。同页完成变量分类、参数–协变量关系矩阵、关系形式、搜索方向、阈值和线程设置;支持拖拽或多选后批量移动,不根据缩写猜测变量类型。

  • Prior / Protected: starts empty; choose your own variables. MNE merges these names with SCM DROP safety protection in do_not_drop before the configuration sections. Existing equations/initial values are preserved; protecting inputs does not fix THETA estimates. In this first release, protected variables cannot also be searched on another parameter. / 先验/保护: 默认空白,用户自行选择;后台写入 do_not_drop,不写死 HV、DDIC 或其他名称,不固定 THETA。第一版保护变量不再参与其他参数的候选搜索。
  • Check & Preview → Run: inspect actual data mapped by $INPUT, review the source/generated model, configuration and exact command, then approve. Generate Files Only prepares an isolated task without starting PsN. / 检查与预览 → 运行: 按 $INPUT 位置检查数据,预览原模型、副本、配置和最终命令;也可只生成文件,不启动 PsN。
  • Results: automatically show Forward/Backward changes, retained relations after each step, OFV, signed ΔOFV, recorded P values, log evidence and the final relationship table. English CSV/JSON are always separate from optional editable Word three-line tables (officer + flextable). No selected covariate is a valid outcome; incomplete or unverified searches are not labelled final. / 结果: 自动展示前向纳入、后向删除、每步保留关系及最终关系,附 OFV、带符号 ΔOFV、日志 P 值和来源行;导出英文 CSV/JSON 及可选 Word 三线表。未纳入新协变量可正常结束,未完成或无法验证的任务不冒充最终结果。
  • Reopen and reuse: open task results from Run Tree or Open SCM Results on the source model. Reparse/regenerate reports never reruns SCM. Create Model from SCM Result requires a separate confirmation, uses a new filename, records lineage, and opens a diff. / 重新打开与使用: 从 Run Tree 或源模型右键打开历史结果;重新解析不会重跑 SCM。另存最终模型需单独确认,使用新编号并记录来源、打开差异视图。

Tasks are stored under .nmw/scm/<source run>/scm_001/ with source/data snapshots, a generated model, .scm, MNE_command.txt, execution/preflight records, PsN raw output and results. Keep the task directory while a derived model uses its data. Original source models and datasets are never overwritten.

任务隔离保存在 .nmw/scm/<源模型>/scm_001/,保留源模型/数据快照、模型副本、配置、命令、检查记录、PsN 原始结果和报告。新模型若引用任务数据,不能删除该任务目录;原模型及原数据不被覆盖。

Initial scope / 首版范围: standard single-problem PK models with explicit TV<parameter> definitions and one FO/FOCE estimation step; complete, time-invariant numeric candidate covariates; one or more shared continuous forms (Linear, Power, Exponential or Piecewise linear), in the selected PsN sequential order. Categorical variables use PsN categorical effects. Unsupported $DATA filters/options, missing/time-varying candidates, implicit parameter structures, SAEM/IMP, multi-step models and $PRIOR are blocked for review, not silently transformed. Existing covariate equations must be explicitly protected. / 限于显式 TV 参数定义、单一 FO/FOCE 步骤的标准 PK 模型及完整、非时变的数值候选数据;连续关系可拖入一种或多种,按所选顺序交给 PsN 默认的条件式顺序测试,分类变量使用分类效应。不支持的结构、数据选项或缺失/时变候选会明确拦截,不自动改模型或补值。

Uses the configured/PATH-resolved scm and Rscript; optional setting: nonmemWorkbench.scmExecutable. No development-machine version is required. Local integration was checked with PsN 5.7.0 on macOS; Windows execution and visual Word pagination still require platform/manual QA. Press F5 in this repository to compile and run the development extension.

使用用户配置或 PATH 中的 scm / Rscript,可设置 nonmemWorkbench.scmExecutable,不要求与开发机版本一致。本机已完成 macOS / PsN 5.7.0 小型联调;Windows 实跑及 Word 分页视觉检查仍待验证。在本仓库按 F5 即可编译并启动开发扩展。

Single-page settings / 单页设置

GOF, Bootstrap, VPC and Retries now use one editable form per workflow instead of consecutive settings popups. Bootstrap/VPC/Retries follow Check & Preview → Run on the same page; Edit Settings / Recheck returns to the retained values and requires a fresh preflight. Validation errors stay on the page. Settings are remembered locally per model (VPC plotting per task), with Restore Defaults available.

GOF、Bootstrap、VPC 和 Retries 的设置改为单页填写,不再连续弹出输入框。Bootstrap/VPC/Retries 在同页完成 Check & Preview → Run;点击 Edit Settings / Recheck 可保留输入返回修改,并重新检查后才能运行。校验错误直接显示在页面内;按模型记住本地设置(VPC 绘图按任务保存),也可使用 Restore Defaults 恢复默认值。

  • GOF: select the discovered table and edit labels/units together. Regeneration starts with the recorded choices; original QMD defaults remain available. / GOF:同页选择发现的表格、标签和单位;重绘带入已记录选项,并保留原始 QMD 默认模式。
  • Bootstrap: estimate source, samples and threads together; generated-model confirmation is included in the reviewed execution plan. / Bootstrap:同页填写估计来源、样本数和线程数;模型副本生成与执行统一纳入运行前确认。
  • VPC: simulation settings first; after completion the same page offers VPC/pcVPC, binning, units, row/column facets and conditional CMT levels from actual R-inspected tables. Adjust & Replot reuses simulation. / VPC:先填写模拟设置,完成后同页配置图型、分箱、单位、行列分面及按需显示的 CMT 水平;调整重绘不会重跑 NONMEM。
  • Retries: presets, retry count, perturbation, threads and advanced seed use the shared form; results replace the same tab. / Retries:预设、次数、扰动幅度、线程和高级种子统一填写;结果继续在同一标签页展示。

Closing a settings page before Run starts no workload. After Run, closing the page does not cancel a process: use its cancellable progress notification. Result files, historical-result pickers and explicit model-creation safety confirmations remain available. No R analysis algorithms, scientific model transformations or backend JSON schemas were changed by this UI update.

运行前取消或关闭设置页不会启动任务;点击 Run 后,关闭页面不会取消进程,请使用进度通知中的取消按钮。结果文件、历史结果选择入口及创建模型时的安全确认继续保留。本次仅调整交互,不更改 R 分析算法、科学模型转换或后端 JSON 协议。

Create run1
→ Run with PsN
→ Duplicate to run2
→ Update initial estimates
→ Compare models/results
→ Review Modeling Overview and GOF
→ Run VPC or pcVPC
→ Run Bootstrap

Requirements / 环境要求

  • Visual Studio Code 1.85 or newer.
  • A licensed and working local NONMEM installation.
  • A local PsN installation providing the commands used by your workflows:
    • execute
    • update_inits
    • bootstrap
  • R and Rscript.
  • R packages used by the selected workflow.

The v0.1.1 release environment used R 4.5.3 and PsN 5.7.0. These are verified environment versions, not declared minimum versions.

MNE does not require users to match those exact versions. It resolves the configured local executables and checks capabilities and workflow-specific packages at runtime. Missing optional plotting or Word-report packages disable only the affected artifact; they do not invalidate an otherwise successful NONMEM/PsN run or remove core RunSummary and parameter CSV output.

MNE 不要求用户安装与开发环境完全相同的版本。扩展会解析用户配置的本地可执行程序,并在运行时检查各工作流所需能力和 R 包;缺少可选绘图或 Word 报告包时,只停用对应产物,不会把原本成功的 NONMEM/PsN 运行判为失败,也不会丢失核心 RunSummary 和参数 CSV。

Python is not required for MNE v0.1.4.

R packages

MNE can check, but never automatically installs, its R dependencies. Run:

MNE: Check R Dependencies

The packaged R backends currently use:

  • Core contracts and adapters: jsonlite
  • GOF: ggplot2, ggpubr, scales
  • Individual-fit PDF: lattice
  • Word reports: officer, flextable
  • VPC/pcVPC: dplyr, tidyvpc
  • Covariate Correlation: ggplot2, scales, gridExtra, and either writexl or openxlsx (ragg is used for PNG output when available)

Install only the packages required for the workflows you intend to use, for example:

install.packages(c(
  "jsonlite", "ggplot2", "ggpubr", "scales", "lattice",
  "officer", "flextable", "dplyr", "tidyvpc", "gridExtra", "writexl"
))

Covariate Correlation / 协变量相关性

In the VS Code Explorer, right-click a file whose name starts with COTAB or CATAB and choose MNE: Run Covariate Correlation. MNE matches the other table by its complete suffix (for example, COTAB005_1 with CATAB005_1) and shows a chooser if more than one valid match exists. Either table can also be analyzed alone.

The R backend removes NONMEM-reserved columns, reduces repeated records to one value per ID, reports within-ID inconsistencies, and never silently converts a non-numeric COTAB variable into a categorical variable. Continuous pairs use pairwise-complete Spearman correlation; categorical pairs use Cramer's V. P values are adjusted with Benjamini-Hochberg FDR.

Results are written to .nmw/runs/<runId>/covariates/correlation_NNN/. The primary matrix displays are clustered, lower-triangle vector PDFs with dynamic dimensions; PNG previews, a ranked effect-size plot, a paginated high-association PDF, an Excel workbook, and a versioned JSON summary are also generated. Results are available in Run Tree.

在 VS Code 资源管理器中右键以 COTAB 或 CATAB 开头的文件,选择 MNE: Run Covariate Correlation。MNE 按完整后缀匹配另一张表;连续变量使用 Spearman 相关,分类变量使用 Cramer's V,并进行 BH/FDR 校正。结果保存至 .nmw/runs/<runId>/covariates/correlation_NNN/,包括动态尺寸的聚类下三角矢量 PDF、PNG 预览、效应量排序图、高相关分页 PDF、Excel 与版本化 JSON,并可从 Run Tree 访问。

Installation / 安装

Install MNE — Make NONMEM Easier from the Visual Studio Marketplace, or install the reviewed mne-0.1.4.vsix package manually.

可在 Visual Studio Marketplace 中搜索并安装 MNE — Make NONMEM Easier,也可手动安装已审核的 mne-0.1.4.vsix。

To install a reviewed VSIX:

  1. Open VS Code.
  2. Open the Extensions view.
  3. Choose Install from VSIX… from the Extensions menu.
  4. Select mne-0.1.4.vsix.
  5. Open a folder containing NONMEM models.

For source development:

cd apps/vscode-extension
npm ci
npm test

Press F5 in VS Code to start an Extension Development Host.

Environment Setup

Run:

MNE: Check Environment

MNE resolves tools from the following settings first and then from PATH:

{
  "nonmemWorkbench.psnExecutable": "",
  "nonmemWorkbench.updateInitsExecutable": "",
  "nonmemWorkbench.bootstrapExecutable": "",
  "nonmemWorkbench.bootstrapThreads": 4,
  "nonmemWorkbench.rscriptExecutable": ""
}

The existing nonmemWorkbench.* setting and command identifiers are intentionally retained for compatibility; user-visible labels use MNE.

Missing optional workflow tools do not prevent syntax highlighting, native code comparison, or read-only result access.

Workspace Trust

MNE declares limited support for untrusted workspaces.

In an untrusted workspace, syntax highlighting, native code comparison, and read-only artifact access remain available. Operations that execute local NONMEM, PsN, or R processes are blocked until the workspace is trusted.

Model Development

Use the Explorer context menu or Command Palette:

  • MNE: New NONMEM Model
  • MNE: Duplicate Model
  • MNE: Update Initial Estimates
  • MNE: Run with PsN
  • MNE: Import Existing Run

New and duplicate model names use the next available runN number. Operations using final estimates delegate to PsN update_inits; TypeScript does not parse or rewrite THETA, OMEGA, or SIGMA estimates.

Modeling Overview / 建模总览

Overview is the modeling workspace; Run Tree is the result/raw-output browser. The top-right icon buttons are New Model, Run Model, Duplicate Model, Compare Models, Model Report and Tools, with hover labels. Select a row before running, duplicating or reporting; these remain single-model actions. Right-click a row for the same actions, or right-click blank space for global tools without accidentally targeting the last selected model.

Tools expands into the following English hierarchy (hover or click; arrow keys/Escape also work):

  1. Environment → Environment Check, Check R Dependencies, NONMEM Versions, PsN Version, Select R Environment.
  2. Data & Model Preparation → Input Mapper, Import Existing Run.
  3. Exploratory Analysis → Planned, disabled.
  4. Model Diagnostics & Evaluation → GOF, ETA Correlation, VPC, Bootstrap, SIR (Planned).
  5. Covariate Exploration → Covariate Correlation, SCM, FREM (Planned).
  6. Other Tools → Retries, Update Initial Estimates, Estimation Diagnostics.

SIR/FREM are placeholders only: there is no runnable command or new PsN integration. ETA Correlation opens an existing plot or reuses the established ETA backend independently; regenerating ETA does not rerun the model or GOF. Tools → Covariate Correlation opens a table chooser; run-specific Raw Output context actions retain provenance checks.

Use Ctrl/Cmd-click for multiple models and Shift-click for a range. Compare → Results presents 2–100 normalized summaries side by side with a reference selector. ΔOFV/ΔAIC mean model minus reference; missing values remain missing. Parameter alignment requires matching index/matrix coordinates, recorded labels and display scales; mismatches are separate rows, not assumed equivalent. No significance judgment is inferred. Compare → Code shows two files at a time; switch either side among the selection. Single-model Compare lets you choose other models explicitly, including hidden ones. Existing two-file Explorer comparison is unchanged.

Hide Selected Models changes only Overview visibility. A gap marks consecutive hidden models; use its Unhide link, Show hidden (temporary/dimmed), Unhide Selected Models, or Unhide all to restore access. Hidden rows are removed from selection when no longer visible. Visibility is stored by workspace/model ID in .nmw/overview-state.json: reruns retain it; new model IDs start visible. This is not deletion, task cancellation or backup protection; Run Tree and report-source discovery remain unchanged.

Default columns show the key fit/status fields; Columns exposes the other existing fields and Model details preserves metadata editing and Reveal in Run Tree. The footer provides model/rating sorting, minimum-star filtering, counts and Refresh. dOFV uses only the explicitly selected reference; row order never implies lineage. Results are opened from Run Tree, not a wide per-row action column.

Overview 顶部保留六个带悬停提示的图标,工具按上述英文分类逐级展开;右键菜单与工具栏一致。SCM 可直接从 Overview 启动。运行、复制、报告仍仅作用于单个模型,多选不自动批量执行。Run Tree 不再堆放顶部图标,保留右键分析、星级、筛选、排序,并增加模型节点 SCM/ETA 入口。

Ctrl/Cmd 多选、Shift 范围选择后可比较结果;代码仍为双栏,可切换模型对。隐藏仅改变 Overview 显示:提供隐藏行间隙、一键临时显示、选中恢复和全部恢复;不移动或删除文件、不影响正在执行的任务、Run Tree 或报告来源。隐藏与星级分别保存,同编号重跑保留,新编号默认显示。其他信息可从 Columns 与 Model details 查看。SIR、FREM、探索性分析仅预留入口,当前不可运行。

Compare Models and Results / 比较模型与结果

Compare Models offers:

  • Compare Code — native VS Code side-by-side diff; no external process is run.
  • Compare Results — comparison of normalized RunSummary contracts using the packaged R adapter.

Two selected .lst files or two selected .ext files can also invoke Compare Results from the Explorer context menu.

Compare Code 使用 VS Code 原生并排差异视图;Compare Results 通过打包的 R 适配器比较标准化 RunSummary。也可在资源管理器中同时选择两个 .lst 或两个 .ext 文件后直接执行结果比较。

GOF and Parameter Reports / GOF 与参数报告

After successful execution or existing-run import, MNE writes standardized artifacts under .nmw/runs/<runId>/, including:

  • summary.json — versioned RunSummary backend contract
  • GOF overview image
  • individual-fit PDF
  • editable Word parameter report
  • normalized parameter CSV

GOF table selection is based on table headers rather than names such as sdtab. MNE inspects a bounded header region in .tab, .tbl, .csv, .txt, and extensionless text tables and requires DV, PRED, IPRED, IWRES, and CWRES case-insensitively. One compatible table is selected automatically; multiple compatible tables are presented in a Quick Pick with relative paths and detected columns.

GOF is an optional diagnostic artifact during run and import post-processing. If no compatible table is found—for example, for a model that does not emit standard PK diagnostics—the NONMEM run remains successful, core fit statistics and parameter reports are retained, and RunSummary records GOF as unavailable. The manual MNE: Generate or Regenerate GOF action remains strict and reports the required columns and closest inspected files.

Before plotting, choose the existing QMD labels or customize time, observation, population/individual prediction, residual labels, and display units. Units change axis titles only and never transform values. The selected relative table path, detected columns, and axis configuration are stored in the run manifest and RunSummary. MNE: Generate or Regenerate GOF reuses this configuration; if the table has disappeared, discovery runs again.

The UI consumes RunSummary rather than parsing NONMEM result formats directly.

RunSummary v0.3 keeps raw NONMEM estimates separate from display values. A diagonal OMEGA is shown as IIV on <parameter> (CV%) only when MNE can confirm a multiplicative EXP(ETA(n)) relationship in the model. The exact conversion is 100 × sqrt(exp(OMEGA) - 1); transformed SE and RSE use the corresponding delta method. BLOCK OMEGA/SIGMA parameters retain stable matrix coordinates, and off-diagonal OMEGA values remain covariances.

When at least two empirical ETA/EBE columns are available, post-processing also writes eta_correlation_matrix.pdf, a PNG preview, and eta-correlation-summary.json under .nmw/runs/<run>/. MNE selects the most informative known .phi or PATAB* table, asks through Quick Pick when candidates remain tied after source/completeness scoring, deduplicates complete ETA vectors by ID, reports Pearson correlations with Benjamini–Hochberg adjusted p-values, reuses parameter labels such as ETA-CL, and warns when ETA shrinkage exceeds 30%. More than ten ETAs use a heatmap overview plus a paginated detail PDF.

GOF 不再依赖固定表名:MNE 会检查受限范围内的表头,并按 DV、PRED、IPRED、IWRES 和 CWRES 自动选择数据源;多个候选时由用户选择,没有候选时将 GOF 标记为不可用,而不会把成功的 NONMEM 运行误判为失败。坐标范围根据数据自动确定,标签和显示单位可以配置并保存。参数报告使用 RunSummary v0.3,原始 NONMEM 估计值与展示值分离;只有确认存在 EXP(ETA(n)) 关系的对角 OMEGA 才以 IIV on <parameter> (CV%) 展示,并采用精确对数正态公式。存在至少两个经验 ETA/EBE 列时,还会自动生成带参数名称的相关性 PDF、PNG 与 JSON,并提示高收缩率。

VPC / pcVPC

MNE: Run VPC creates an isolated job under:

.nmw/vpc/<sourceRun>/vpc_00N/

The generated simulation model is derived from a job-local copy. MNE applies final estimates with update_inits, localizes relative data dependencies, and does not overwrite the structural source model.

The plotting wizard supports:

  • VPC or pcVPC
  • automatic, equal-frequency, or explicit global bins
  • axis-unit labels
  • up to two facet variables
  • CMT-level selection, including explicit dose-only metadata
  • linear and semilog output

Open Latest VPC → Replot VPC reuses the existing simulation table and does not rerun NONMEM.

Bootstrap / Bootstrap 分析

MNE: Run Bootstrap creates an isolated job under:

.nmw/bootstrap/<sourceRun>/bootstrap_00N/

The generated model:

  • receives final estimates through PsN update_inits
  • retains $ESTIMATION
  • removes $COV/$COVARIANCE
  • removes all $TABLE records
  • leaves the source model unchanged

MNE invokes PsN 5.7-compatible syntax:

bootstrap -samples=<N> -threads=<N> <generated-model>

The parser locates section anchors instead of fixed row numbers. Minimization success is read from diagnostic.means/minimization.successful; medians come from medians; 95% intervals come only from the 2.5% and 97.5% rows of percentile.confidence.intervals.

The report is written as:

reports/<runId>_bootstrap_results.docx

It contains English headings, the minimization-success rate, final model estimates, Bootstrap medians, percentile intervals, and population/IIV/residual groups. Parameter matching uses the normalized RunSummary identities, and confirmed lognormal IIV medians and interval endpoints use the same exact CV% transformation as the final model table. Regenerate Bootstrap Report reuses the existing CSV and does not rerun Bootstrap.

Bootstrap 报告为可编辑的全英文 Word 文档,包含最小化成功率、最终模型估计、Bootstrap 中位数、百分位区间,以及群体典型值/IIV/残差分组。参数匹配使用标准化 RunSummary 标识,确认的对数正态 IIV 中位数和区间端点采用与最终模型参数表一致的精确 CV% 转换;重新生成报告不会再次运行 Bootstrap。

Phase 1: Environment, Preflight and Command Preview / 环境与运行前检查

Run MNE: Check Environment (or MNE: Check R Dependencies) to open the shared environment panel. It shows the resolved execute/update_inits/bootstrap/parallel_retries/Rscript paths, discovery sources, version-probe results, PsN's configured NONMEM versions, the actual R runtime and library paths, and each package's status and affected features. Available, Missing, Load failed, and Not checked are distinct; an installed package with a DLL/dependency error is not reported simply as missing.

Use Recheck after changing tools or installing packages. Probes are bounded (10 seconds per tool; 15 seconds for R package inspection); successful inspections are cached within the session until relevant settings, trust, executable or startup-file evidence changes. Untrusted workspaces receive static information only: no R/PsN probes or write probes run. The trusted write check creates and removes a uniquely named temporary file in the existing output parent. Environment inspection does not execute NONMEM, validate its license/compiler, install packages, or change PATH/PsN configuration.

Copy Install Command lets you select unavailable packages and copies an explicit command for the detected Rscript and its user library: PowerShell on Windows, POSIX shell on macOS/Linux. It does not execute the command or upgrade unrelated packages. Review the command and target library before running it. A Load failed error may require repairing a dependent package or DLL rather than merely reinstalling the named package. Copy Diagnostic Report includes environment evidence and the last process status when available, but no model contents, datasets, or full environment-variable dump; local paths are included, so review before sharing.

Execute, Bootstrap, VPC and Retries share Preflight and Command Preview; ordinary execute can reuse its confirmed environment/approval during the session, retaining per-run safety checks. Generated-model workflows keep their same-page review. Bootstrap/VPC previews list both update_inits and the main PsN command; VPC requires execute, not the separate PsN vpc utility. Each command has Copy Command, and the displayed working directory and argument vector are the ones approved for execution. Generated input files are prepared after confirmation, so copied commands assume those files exist. R result parsing remains in existing backend adapters; plotting configuration is chosen in the existing plotting wizard.

Dependencies are stage-specific. Missing a required PsN executable blocks that workflow only. Missing R parsing/plotting prerequisites offers Run only — keep raw results; no R post-processing is silently attempted in that mode. Missing optional Word packages does not prevent NONMEM/PsN execution, and Bootstrap now retains its parsed summary when Word rendering is unavailable. Restore the missing dependencies and use Import Existing Run, Regenerate Report, Open VPC/plotting, or Reparse Results as appropriate.

Cancelling the four main workflow previews does not create their task directories or archive previous results. Source-model/estimate-input changes, dirty model edits, environment-setting changes and occupied planned task directories stop execution for a new review. Approved tasks save versioned execution-plan.json, preflight.json, and per-process execution-result-*.json beside existing task metadata. Existing model transformations, parameter calculations and NONMEM result parsers are retained.

中文说明: 现在环境检测和 R 依赖检查共用一个面板,展示实际程序路径、版本、NONMEM 配置、R 库路径及缺包影响,明确区分“缺失”“已安装但加载失败”和“尚未检查”。可以刷新检查、复制安装命令和诊断信息;不会自动安装、修改 PATH 或要求升级到开发机版本。四个主要运行流程共用 Preflight 和命令预览,确认后才准备任务。缺少解析/绘图依赖时,可明确选择仅运行并保留原始结果;缺 Word 包不阻止模型运行。已有模型与结果解析逻辑保持不变。

Compatibility scope / 兼容范围: macOS is the live-tested platform for this development build; Windows command/path construction is covered by tests, but Windows/Linux NONMEM execution is not newly certified. Tool-version probes and configured NONMEM paths are evidence, not a guarantee of runtime success. No new modeling methods, automatic dependency installation or cloud dependency were added.

Retries / Initial Est Search / 初值扰动重试

Right-click a .mod or .ctl model and select MNE: Retries / Initial Est Search. A single configuration panel offers Quick (5 retries), Standard (10, default), and Extensive (20), all with a 30% perturbation degree. Retry count, degree, threads and seed remain editable. The default requested seed is 012345678.

MNE runs PsN parallel_retries -min_retries=N on an isolated snapshot under .nmw/retries/<model>/retries_NNN/. Original is the unperturbed run in this task; N retries means N + 1 planned runs. Existing models and NONMEM results are preserved. PsN-selected output is contained in the task directory. The command uses -clean=0 -keep_nm_output -no-picky to retain diagnostic evidence and disable configured picky behavior for this task.

Results open automatically as a table. Open Retries Results reopens prior tasks and provides Reparse Results, Regenerate Report, and Create Model from Selected Retry. Reparse/report actions do not execute NONMEM. The optional English Word report is named <model>_retries Results.docx; JSON, retry CSV and parameter CSV remain available if officer/flextable cannot load. If Rscript/jsonlite is unavailable, raw PsN results remain available for later parsing.

Lowest observed OFV, best successful OFV and PsN-selected run are separate. Delta OFV is relative to the best successful run. Successful runs are grouped by distance <= 0.5 from each group's lowest OFV, without chaining. OFV groups do not establish equivalent parameters, statistical significance, or optimization basins. Group retry proportions exclude Original and report both requested and successful denominators. Parameter Min/Max include successful retries only; confirmed lognormal IIV uses the existing exact CV% conversion, while raw estimates remain in JSON. Assessments report facts without automated sensitivity grades.

Estimation Diagnostics adds passive LST minimization, covariance, boundary, R-matrix and S-matrix information to ordinary run/import summaries and Run Tree. Not requested and unknown states are distinguished in the diagnostics contract. MNE estimation diagnostics may flag conditions similar to PsN picky criteria, but MNE does not automatically trigger retries based on these warnings.

Creating a model uses the saved source structure and the explicitly selected result through PsN update_inits. Parameter identities, FIX flags and bounds are checked before exclusive creation of <model>_retry.mod, then <model>_retry1.mod, etc. Structural records are preserved and parent/task provenance is recorded. A changed source snapshot blocks model creation until reviewed.

First-version scope: one problem and one classical estimation step; multi-step/stochastic/evaluation-only models and external include/prior/custom-subroutine dependencies require dedicated adapters and are rejected by this module. Ordinary workflows remain available. R, PsN and NONMEM versions are not pinned; support depends on command availability and recognizable output. The recorded seed and input hashes aid reproducibility within an environment, without promising identical results across versions. Cancellation uses the existing process handler; child-process termination on each operating system still requires platform testing.

右键模型选择 Retries / Initial Est Search,在同一界面设置次数、扰动幅度、线程和 seed。任务保存到独立目录,运行后自动显示原始运行与各 retry 的结果;支持重新解析、重新生成 Word 报告以及从 PsN 选中结果创建新模型。缺少 Word 包时保留 JSON/CSV,缺少 R 时保留原始 PsN 输出供后续解析。OFV 分组仅为数值汇总,参数范围仅统计成功 retries;诊断不会自动触发重跑或修改模型结构。本版仅支持单问题、单经典估计步骤。

This tool is intended to assess sensitivity to initial estimates and potential local minima. It is not a general-purpose global parameter search algorithm.

NONMEM Syntax Highlighting

MNE includes an independently authored TextMate grammar for NONMEM control streams. It recognizes records, comments, strings, indexed parameters, routines, keywords, numbers, and operators.

The grammar was written independently. An older open repository was reviewed only as a design reference; provenance details are recorded in NOTICE.md.

Output Files and .nmw

.nmw/ is MNE's workspace-local metadata and artifact directory. It may contain:

.nmw/
├── runs/
├── comparisons/
├── vpc/
├── bootstrap/
├── history/
└── model-metadata.json

It does not replace source NONMEM models. MNE-generated VPC and Bootstrap models are job-local derivatives and do not overwrite their source models.

The repository .gitignore excludes .nmw/ by default. Teams that intentionally audit selected manifests can adopt their own version-control policy.

Privacy and Local-first Design

MNE's core v0.1.4 workflows run through local VS Code, NONMEM, PsN, and R installations. MNE v0.1.4 does not require an LLM or cloud service for its core modeling workflow.

The VSIX does not include NONMEM, PsN, clinical/study datasets, gold runs, test fixtures, or user-generated .nmw artifacts.

Known Limitations

  • v0.1.4 is primarily tested on macOS; Windows/Linux end-to-end compatibility remains unverified.
  • Known Windows report-opening issue: generated Word/PDF reports may fail to open from MNE even when opening the same files manually succeeds. This issue is not claimed fixed in v0.1.4; use File Explorer to open the generated report. / 已知 Windows 报告打开问题:部分环境中 MNE 内点击报告失败,而同一文件手动打开正常;0.1.4 不宣称已修复,可暂时从文件资源管理器打开。
  • NONMEM, PsN, and R must be installed and configured separately.
  • Result import and reporting depend on expected NONMEM/PsN output structures.
  • VPC/pcVPC requires tidyvpc and its R dependencies.
  • MNE has no independent QC or regulatory-validation engine.
  • MNE assists workflow automation; it does not replace pharmacometric review, model qualification, or regulatory validation.

Troubleshooting

PsN command not found

Run MNE: Check Environment. Configure the corresponding nonmemWorkbench.*Executable setting or add the command to PATH.

Rscript not found

Configure nonmemWorkbench.rscriptExecutable or add Rscript to PATH.

Missing R package

Run MNE: Check R Dependencies. Install the listed packages in the R library used by the configured Rscript.

update_inits unavailable

Install/configure PsN and verify update_inits from the same environment in which VS Code is launched.

bootstrap_results.csv not found

Inspect the MNE Output channel and the job manifest under .nmw/bootstrap/<run>/<job>/manifest.json. PsN may have exited without producing a complete Bootstrap result.

External execution is blocked

Trust the workspace before running NONMEM, PsN, R reporting, VPC, pcVPC, or Bootstrap. Read-only workflows remain available without trust.

License

MNE 0.1.4 and later releases carrying the new license are not open source. MNE-owned material covered by that license is available only for personal learning and non-commercial academic research. Enterprise/CRO use, paid services, commercially sponsored work and other commercial uses require prior written authorization from 苏州析模生物科技有限公司 through https://www.clinicalpharmpmx.com. Unauthorized modification, repackaging and redistribution of the covered software are prohibited, subject to applicable law and retained licenses. Normal settings, user models/data and sharing generated reports remain permitted within the licensed use. See LICENSE for the full terms.

MNE 0.1.4 起携带新许可的版本不属于开源软件。新许可适用的 MNE 自有内容仅限个人学习及非商业学术研究;企业、CRO、收费服务、商业资助项目及其他商业用途须事先取得苏州析模生物科技有限公司书面授权。未经授权不得修改、重新打包或再分发受限软件,但应遵守适用法律及保留的原许可。正常配置、用户模型/数据及许可用途下的报告分享不受禁止,详见 LICENSE。

Previously MIT-released versions/code retain their MIT permissions. Third-party MIT components (including adapted NMTRAN utilities/snippets) remain MIT-licensed; see NOTICE.md and third-party/nmtran/LICENSE. Bundling/minification is not encryption or a guarantee against reverse engineering. / 旧版及既有 MIT 代码授权不被撤回;第三方 MIT 组件继续保留原许可;打包压缩不等于加密,也不保证无法逆向。

Third-party Attribution

NONMEM and PsN are separate external products and are not bundled with MNE.

The syntax grammar provenance statement is available in NOTICE.md. Runtime npm development tooling and user-installed R packages retain their respective licenses and are not vendored as application source.

Project Links

  • Repository: https://github.com/Slow-Walker66/PPK-workbench-assistance-demo
  • Issues: https://github.com/Slow-Walker66/PPK-workbench-assistance-demo/issues
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft