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.3.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

nmodl_preprocessor-1.0.3-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file nmodl_preprocessor-1.0.3.tar.gz.

File metadata

  • Download URL: nmodl_preprocessor-1.0.3.tar.gz
  • Upload date:
  • Size: 42.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for nmodl_preprocessor-1.0.3.tar.gz
Algorithm Hash digest
SHA256 71303d3728df3e6605f440f9a27e2fc70394be5b4c13b829a004570e11c0ff16
MD5 8c351bf459b2ffe355b5edcd536e3882
BLAKE2b-256 1e69f1c45125ef1b5d268694d755887b5c7e5be7ea391445943fe6062e027042

See more details on using hashes here.

File details

Details for the file nmodl_preprocessor-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nmodl_preprocessor-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c3ce2d064abfed81995982f6bc27b72e6c61886687ca7a58afa4aa175e913be3
MD5 cbf2631824de9836add92ba7b492b459
BLAKE2b-256 eed48856f2919df02b777a647bee1774226c67b63e30586ef287983914a13df1

See more details on using hashes here.

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