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.6.tar.gz
(45.4 kB
view hashes)
Built Distribution
Close
Hashes for nmodl_preprocessor-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ab91c601d7b9bac69c4d5497c35848a58827fc0720ac39763123dd127b75d6d |
|
MD5 | a517ddad6314e5b54c5b302a79a811a6 |
|
BLAKE2b-256 | c22e47a21e0fb75a469b68ef911ee6baaa01efdb268ccc3be7ad38cd2d87f521 |