Page 1 of 1

Coupling NEURON to other solvers

Posted: Tue Oct 27, 2015 12:38 pm
by lmuller
Can anyone tell me, or refer me to the relevant documentation, on the possibilities of coupling NEURON models to other solvers. For example, let us say that you have a neural network that is fed by signals from the cardiovascular system (CVS) and in turn gives feedback to it. Then I should be able to communicate the state of some variables of the CVS model to a NEURON model and viceversa during a simulation, since the solution of both models are coupled. Is this possible?

Thanks in advanced,

Lucas.

Re: Coupling NEURON to other solvers

Posted: Fri Jan 08, 2016 9:29 am
by lmuller
No hints on this topic?

Re: Coupling NEURON to other solvers

Posted: Fri Jan 08, 2016 11:00 am
by ted
Sorry this went unanswered for so long. Python has been used to couple NEURON with other solvers; there is at least one thread about coupling NEURON with MATLAB, and a mention of coupling it to MUSIC. What "other solvers" did you have in mind?

Re: Coupling NEURON to other solvers

Posted: Sat Jan 09, 2016 12:27 pm
by hines
If Python can be the glue language that couples your solver, then a possibility is to use
http://neuron.yale.edu/hg/neuron/nrn/fi ... ervisor.py

an example for a potassium channel is

http://neuron.yale.edu/hg/nrntest/file/ ... anarray.py

Re: Coupling NEURON to other solvers

Posted: Mon Jan 18, 2016 6:50 am
by lmuller
Thanks for the answers! At a first stage Python can be used to put NEURON and other models (cardiovascular system) together. I will therefore follow the indications on that aspect. However, at some point we will eventually want to couple NEURON to extremely detailed models of the CVS and those models are solver using specific solvers, written in cpp. Should then still be necessary to use Python as a glue or can one think of calling NEURON as a library that waits for some information/delivers some results to advance in time?

Re: Coupling NEURON to other solvers

Posted: Mon Jan 18, 2016 8:56 am
by hines
If you prefer not to use the python nonvint_block_supervisor to connect your c++ solver you can do it using the pattern provided by nrn/src/nrniv/kschan.cpp and kschan.h.
In particular, in kschan,cpp, That, in turn, is the same pattern used when mod files are translated by the nocmodl translator into c. The latter is probably simplest.