\section{Summary}
We have identified and addressed a gap in ion channel simulation software by
developing ModFossa, a Python library dedicated to the construction and
simulation of ion channels based on continuous time Markov processes. While
several recent software tools have been released for this purpose, none are
Python libraries. Python is a popular tool among research scientists, therefore
we hypothesize that a versatile and easy-to-use ion channel simulation library
has the potential for providing a valuable service to those developing and
testing Markov models of ion channels. In summary, ModFossa allows for the
creation of channel models using simple Python syntax. Several rate constant
types are supported, including exponential and Boltzmann voltage dependent
rates, as well as ligand-gated rates. Voltage and current protocols are defined
easily. Some common plots including IV curves, state probabilities, conductance
versus voltage, and conductance versus ligand concentration are generated using
a single function call. Finally, ModFossa’s core is implemented in C++ using the
Sundials differential equation solver, providing the benefit of fast execution
times. 

\section{Applications}
ModFossa can provide rapid model development and testing for researchers with
varying programming skill. A common task in ion channel model development is
parameter searching, which requires the modeler to find the rate constant
parameters which best fit the experimental data. Because ModFossa is usable from
Python, existing machine learning libraries such as scikit-learn can be
leveraged to perform parameter searches automatically. This situation is where
ModFossa’s fast execution speed provides a great benefit, as it is not uncommon
for modelers to leave parameter searches running for several days, or weeks. 

\section{Future work}
Several ideas for additional development of ModFossa are presented here.
First, some minor enhancements such as the addition of more sample models,
improved customization of plotting functions (plot size, legend, colors, data
range, etc.), and standardization of the data structures used in the results
module would add value to the software by ensuring a smooth experience for new
users. Additionally, creating and distributing a Debian package for ModFossa
would ease installation significantly. 

Several preliminary users have expressed interest in user-defined rate contant
equations. A custom rate equation could be written by the user in Python using
either a decorator function, or by inheriting from a base class. During
simulation, the simulator would call the user's custom rate equation, passing in
the current state of the simulation (membrane voltagte, concentrations, time,
etc.), and use the returned value as the rate for whichever transitions the user
specified. The performance hit due to calling a Python function from C++ during
the simulation would have to be quantified, but it is not expected to be
significant.

Lastly, the idea of offering ModFossa as a web service with a rich graphical
user interface has been explored. Doing so would encourage use from a wider
audience, particularly from those with limited or no programming experience.
Such a web service could be implemented using a Python web framework such as
Flask. A JavaScript visualization package, such as d3.js could provide rich
graph visualizations of the model, as well as the stimuli definitions and
simulation results. Finally, a web site would allow like-minded scientists to
collaborate and easily share results with the community.  
