Skip to main content

nmodl_preprocessor

This program optimizes NMODL files for the NEURON simulator.
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 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

  • This program will not optimize any RANGE or GLOBAL symbols.

    • Remove them unless you actually need to inspect or modify their value at run-time.
    • Add parameters to a GLOBAL statement to preserve them.
  • Remove unnecessary VERBATIM statements.

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nmodl_preprocessor-1.0.5-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nmodl_preprocessor-1.0.5.tar.gz
  • Upload date:
  • Size: 45.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.5.tar.gz
Algorithm Hash digest
SHA256 482883f05e2da9725d854d1d3d4db99efb9b2ee36286b45b22307647d45b52f0
MD5 3f34ffcd220a62f734f1c1ffe160f6ec
BLAKE2b-256 dc31fe18b268f49ffc73918a6f2477f40d0fb4c6bbaec3ed20b66dd8f3c89775

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nmodl_preprocessor-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fe2daa78a8b8ab7214640161946d5224e47a28960de402ef058a73eb1a72e974
MD5 16460b019370609471c5b328c12b3a42
BLAKE2b-256 2b2c27c767520745b9a07522bfdf822eadf0ef8f1fb73f9fd17cd27040422a8c

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

This release

1.0.5 This release

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page