Skip to main content

Optimize NMODL files for the NEURON simulator

Project description

nmodl_preprocessor

This program optimizes NMODL files for the NEURON simulator.
It scans all of your project's files to perform aggressive whole program optimization.
It performs the following optimizations to ".mod" files:

  • Hardcode the parameters
  • Hardcode the temperature
  • Hardcode any assigned variables with constant values
  • Inline all functions and procedures
  • Convert assigned variables into local variables

These optimizations can improve run-time performance and memory usage by between 5% and 15%.

Installation

Prerequisites

pip install nmodl_preprocessor

Usage

$ nmodl_preprocessor [-h] project_dir [model_dir ...]

positional arguments:
  project_dir  root directory of all simulation files
  model_dir    input directory of nmodl files

options:
  -h, --help   show this help message and exit

Tips

  • Always check your results for accuracy and correctness.

  • Do not use this tool with neuron's graphical user interface "nrngui".

  • Keep your projects in separate directories.

  • Use unique and descriptive variable names.

  • Remove unnecessary VERBATIM statements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nmodl_preprocessor-1.0.8.tar.gz (58.7 kB view hashes)

Uploaded Source

Built Distribution

nmodl_preprocessor-1.0.8-py3-none-any.whl (17.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page