Skip to main content

Optimize NMODL files for the NEURON simulator

Project description

nmodl_preprocessor

This program performs the following optimizations to ".mod" files:

  • Inline parameters
  • Inline temperature
  • Inline functions and procedures
  • Inline assigned variables with constant values
  • Convert assigned variables into local variables

These optimizations can improve runtime performance by as much as 15%.

Installation

Prerequisites

pip install nmodl_preprocessor

Usage

$ nmodl_preprocessor [-h] [--celsius CELSIUS] input_path output_path

positional arguments:
  input_path         input filename or directory of nmodl files
  output_path        output filename or directory for nmodl files

options:
  -h, --help         show this help message and exit
  --celsius CELSIUS  temperature of the simulation

Tips

  • Remove variables from RANGE and GLOBAL statements unless you actually need to inspect or modify their value.

  • 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.2.tar.gz (42.4 kB view hashes)

Uploaded Source

Built Distribution

nmodl_preprocessor-1.0.2-py3-none-any.whl (10.7 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