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

Uploaded Source

Built Distribution

nmodl_preprocessor-1.0.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nmodl_preprocessor-1.0.1.tar.gz
  • Upload date:
  • Size: 41.7 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.1.tar.gz
Algorithm Hash digest
SHA256 a127731939fc428350efeadb8a7a90ce8fa8acfdfec26730a8d64c2937b73c97
MD5 7292aca30bfae415d92160f3347ca631
BLAKE2b-256 b8e307630d4efacf3d5de985c9477a3c7741db60599f0422d4d2a13fa2c3fcd9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nmodl_preprocessor-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 913e8adfeb6fefbfa7628276471e7e82561eff2c243aca1868e2996cc86cf8e1
MD5 98e302a229afffdb8ab08c2e20250a36
BLAKE2b-256 b14586275094af17ae28d01d7ab0fa7fa4eaa11b59843870df37857faaacd85b

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