Metadata-Version: 2.1
Name: nmodl_preprocessor
Version: 1.0.7
Summary: Optimize NMODL files for the NEURON simulator
Author-email: David McDougall <dam1784@rit.edu>
License: MIT
Project-URL: Homepage, https://github.com/ctrl-z-9000-times/nmodl_preprocessor
Keywords: nmodl,neuron
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Development Status :: 5 - Production/Stable
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# nmodl_preprocessor

This program optimizes NMODL files for the NEURON simulator.  
It scans all of your project's files to perform aggressive whole program optimization.  
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 between
5% and 15%.

## Installation

#### Prerequisites
* [Python](https://www.python.org/) and [pip](https://pip.pypa.io/en/stable/)
* [The NMODL Framework](https://bluebrain.github.io/nmodl/html/index.html)

```
pip install nmodl_preprocessor
```

## Usage
```
$ nmodl_preprocessor [-h] project_dir [model_dir ...]

positional arguments:
  project_dir  root directory of all simulation files
  model_dir    input directory of nmodl files

options:
  -h, --help   show this help message and exit

```

## Tips

* Keep your projects in separate directories.  

* Use unique and descriptive variable names.  

* Remove unnecessary VERBATIM statements.  

