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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file nmodl_preprocessor-1.0.2.tar.gz
.
File metadata
- Download URL: nmodl_preprocessor-1.0.2.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90fcf327d9f47552c809062d45dc91c4e00aa631fad856dfada6f2df21f77bbe |
|
MD5 | ff511830b24d6644edf6133677e64d00 |
|
BLAKE2b-256 | 20aad0503bc95e388ee72b3686509fe13ab8def058bcc98e344dfa845ad7ca8a |
File details
Details for the file nmodl_preprocessor-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: nmodl_preprocessor-1.0.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8830df42c5cec764bc46dc48eb3cd660e77d5e7d16a777ef55d840d92385cbc0 |
|
MD5 | 975478142c9a2864250d99ec99927b12 |
|
BLAKE2b-256 | 4d8a9fd7cd1e15991f72a4f17b2a25efdbbe9de590c5cc1078d0fddb681f610c |