Description of problem
Minimal code to reproduce problem
can i use the class with rk4 like this
P = NeuronGroup(1, model=eqs, threshold=‘v>-20*mV’,refractory=3*ms, method=rk4)
Hi @KotsiosKotsiou. I am not 100% I understood the question correctly, but yes, you are allowed to use
P = NeuronGroup(1, model=eqs, threshold=‘v>-20*mV’,refractory=3*ms, method=rk4)
Alternatively, you can also use the name rk4 as a string like this:
P = NeuronGroup(1, model=eqs, threshold=‘v>-20*mV’,refractory=3*ms, method="rk4")
Confirmed above. One thing worth knowing: rk4 is a fixed-step explicit method, so for stiff, conductance-based models (HH-style with fast gating variables) it can be less stable and needs a smaller dt than the default exponential Euler. If you are not tied to rk4 for a specific reason, method='exponential_euler' (the default) is usually the safer choice for neuron models; rk4 is a good option when you want higher-order accuracy in a non-stiff model and can afford the extra function evaluations.