PyRhO is composed of several abstraction layers, including the Model layer, Protocol layer and Simulator layer (shown in the architectural schematic below). Choices in each layer are independent or one another, giving a large number of possible combinations to suit many needs for in silico experiments. Additionally, parameters may be fit to each type of kinetic model from experimental data or loaded from the default options of popular opsins.
For a more detailed introduction along with worked examples, please see our paper.
|Efficient analytic solution
|Single exponential off-phase decay
|Balance of detail and efficiency
|Lacks short-pulse dynamics
|Most detailed dynamics
PyRhO comes with several preconfigured and customisable simulation protocols for exploring the dynamics of the models. These include typical system analysis stimuli such as delta functions, step functions and sinusoids, as well as chirps and specialised protocols designed to probe particular features of the opsins including voltage-dependence (rectifier), opsin activation (shortPulse) and dark recovery (recovery).
|Standard pulse train
|Linearly varying pulse
|Assess voltage dependence
|Assess short pulse dynamics
|Assess dark recovery rate
|Build custom stimulation function
For opsin-level simulations, PyRhO solves the ordinary differential equations describing the opsin models with numerical integrators under a given set of experimental conditions. This assumes the opsin is essentially in something like a HEK cell where there are no confounding effects of other ion channels. The resultant photocurrents are then calculated and plotted.
If more detailed morphological neuron models are desired, the topology, geometry and biophysics may be specified in a list of hoc files and passed to the NEURON simulator, along with the parameterised opsin model to be inserted into the cell's membrane. Additionally, the compartment name of where to record from should be specified (default: Vcomp='soma') along with the compartmental expression probability (default: expProb=1.0) and the initialisation membrane potential (default: v_init=-65) and whether to use a voltage clamp (default Vclamp=False). If desired, details of NEURON's numerical integrator may also be adjusted (defaults: CVode=False; dt=0.1) to balance the accuracy and runtime of the simulation.
For network level simulations, groups of spiking neurons may be transfected with a model opsin and simulated with the Brian 2 simulator. Brian is not currently integrated with PyRhO's GUI and so networks for simulation must be specified programmatically (although the opsin parameters may still be fit or loaded from the GUI). A worked example may be found in the demonstration notebook. For further details, examples and tutorials for using Brian, we refer you to the Brian 2 documentation.