Optimize NMODL files for the NEURON simulator
Project description
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.
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.4.tar.gz
(42.7 kB
view hashes)
Built Distribution
Close
Hashes for nmodl_preprocessor-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3946a783e3a29223152c15b1f123503eb5486fd4c0d92ed3a3968972e1459152 |
|
MD5 | 4661b70a3a9cde5267b58eb89c01fdc1 |
|
BLAKE2b-256 | a665568dfa53c84600a1050404434c517db414976f36610ed83d125116faaa43 |