Skip to content

vrognas/vscode-nmtran

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NMTRAN (NONMEM) Language Extension for VSCode NMTRAN Logo

GitHub Workflow Status Visual Studio Marketplace Downloads GitHub License

Note

This extension is currently in active development. While stable for daily use, expect occasional breaking changes. Please report any issues to help improve the extension.

Comprehensive language support for NMTRAN (NONMEM Translator) files in Visual Studio Code. Provides intelligent features for pharmacometric modeling with NONMEM control streams.

What is NMTRAN?

NMTRAN is the control language for NONMEM, the gold standard software for population pharmacokinetic/pharmacodynamic (PopPK/PD) modeling in pharmaceutical research. NMTRAN files (.mod, .ctl) define models for analyzing time-varying dose-concentration and exposure-response relationships.

Installation

The NMTRAN extension is available for VSCode and VSCode-based editors, including Positron.

Install via Extensions View:

  • Open your code editor
  • Make sure you have the latest version of the editor (requirement VSCode v1.102.0+)
  • Open the Extensions View
  • Search for NMTRAN or nonmem
  • Click "Install" on the NMTRAN extension by vrognas

Tip

For an enhanced NMTRAN development experience, consider installing ErrorLens. It makes diagnostics stand out more prominently, highlighting the entire line wherever a diagnostic is generated and printing the message inline. Perfect for spotting NMTRAN validation errors at a glance.

Quick start

Once installed, open any NMTRAN file (.mod, .ctl) to automatically activate the extension:

Try these features:

  • Hover over THETA/ETA/EPS to see definitions; control records to see explanations.
  • Right-click on THETA(1) → "Peek" → "Peek References"
  • Notice real-time error highlighting for invalid syntax

Features

🧠 Language intelligence

  • Real-time diagnostics: Validation of control records, parameter sequences, and NMTRAN syntax
  • Intelligent hover: Explanations for control records, parameters, and NONMEM functions
  • Go to Definition: Navigate from parameter usage (THETA(1)) to declaration ($THETA)
  • Find All References: Locate all usages of parameters throughout your model

Hover peek demo

✨ Code enhancement

  • Syntax highlighting: Rich tokenization following TextMate conventions
  • Code folding: Collapse control records for better file navigation
  • Smart formatting: Configurable indentation and code organization
  • Comment toggling: Quick comment/uncomment with standard VSCode commands

Syntax highlighting demo

📝 Code snippets

Comprehensive snippet library for rapid model development:

Snippet demo

Available snippets:

  • Subroutines: ADVAN/TRANS combinations for PK modeling
  • Data handling: $DATA record templates with common options
  • Error models: Additive, proportional, and combined residual error models
  • Tables: Xpose-friendly $TABLE configurations
  • Mixture models: 2-way and 3-way mixture model templates
  • Special modeling:

Supported file types

https://github.com/vrognas/vscode-nmtran/blob/main/README.md The extension activates for these NONMEM-related file extensions:

  • Control streams: .mod, .ctl, .modt
  • Output files: .lst, .ext, .cov, .cor, .coi, .cnv
  • Special files: .phi, .scm, .grd, .shk, .shm, .smt, .rmt, .phm

Community & support

Contributing

Whether you're fixing bugs, adding features, or improving documentation, your help makes this extension better for the pharmacometrics community.

License

MIT License - feel free to use this extension in your research and commercial projects.


Enjoy enhanced NMTRAN development! 🧬💊

Made with ❤️ for the pharmacometrics community

About

NMTRAN (NONMEM) extension for Visual Studio Code

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Contributors 2

  •  
  •  

Languages