Search found 11 matches

by gaoyy18
Wed May 24, 2023 1:56 am
Forum: NEURON + Python
Topic: How to cut the simulation in-between into two runs?
Replies: 6
Views: 14161

Re: How to cut the simulation in-between into two runs?

Easy. Launch the first simulation. After that stops, make whatever parameter changes you like. Then execute if (cvode.active()) { cvode.re_init() } else { fcurrent() } or, if you prefer to use Python, execute the equivalent Python statements, which should be something like if (h.cvode.active()==TRU...
by gaoyy18
Mon May 22, 2023 10:10 pm
Forum: NEURON + Python
Topic: How to cut the simulation in-between into two runs?
Replies: 6
Views: 14161

Re: How to cut the simulation in-between into two runs?

See Using events to implement parameter changes during a run in the Hot tips area of the Forum. Yes, that example is written in hoc, but it's very simple, and by referring to NEURON's Python documentation at nrn.readthedocs.io I'm sure you'll be able to figure out what to do. Thank you for your gui...
by gaoyy18
Mon May 22, 2023 5:44 am
Forum: NEURON + Python
Topic: How to cut the simulation in-between into two runs?
Replies: 6
Views: 14161

How to cut the simulation in-between into two runs?

I have a neuron model that needs to simulate 1000ms, is there any method in python to cut the simulation in-between into two runs? For example, first simulate for 300ms, then I want to change some parameters of the neuron model, and continue the simulation for the rest 700ms. And the end of the firs...
by gaoyy18
Mon Apr 03, 2023 2:03 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Using NMODL integration of ODEs: sparse
Replies: 6
Views: 10944

Re: Using NMODL integration of ODEs: sparse

The core issue that bothers me Before proceeding further, it would be useful to read the relevant sections of chapter 7 of The NEURON Book (if you don't have the book, you might want to get this preprint of chapter 7 https://www.neuron.yale.edu/ftp/ted/book/revisions/chap7indexedref.pdf ). As I und...
by gaoyy18
Wed Mar 29, 2023 9:05 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Using NMODL integration of ODEs: sparse
Replies: 6
Views: 10944

Re: Using NMODL integration of ODEs: sparse

No need to apologize. Everybody makes stupid mistakes. Never use euler--it is not suitable for the equations that describe models with the anatomical and biophysical complexities of real neurons, which are stiff and often require a very small dt for stability. cnexp is the NMODL name for NEURON's i...
by gaoyy18
Wed Mar 29, 2023 5:34 am
Forum: Adding new mechanisms and functions to NEURON
Topic: What is the numeric integration method of cnexp?
Replies: 2
Views: 8462

Re: What is the numeric integration method of cnexp?

To anyone who later sees this post:
I got it, cnexp uses analytical integration method instead of numerical method.
by gaoyy18
Tue Mar 28, 2023 7:04 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Using NMODL integration of ODEs: sparse
Replies: 6
Views: 10944

Re: Using NMODL integration of ODEs: sparse

I want to change the NMODL integration of ODEs from cnexp to sparse Note for others who might read this thread: this change won't do anything useful. Anyone can help about this? The error message points to the line that contains the error. Compare that line with the corresponding line in hh.mod. A ...
by gaoyy18
Mon Mar 27, 2023 8:56 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Using NMODL integration of ODEs: sparse
Replies: 6
Views: 10944

Using NMODL integration of ODEs: sparse

Hi, I want to change the NMODL integration of ODEs from cnexp to sparse, I referred to this: https://bluebrain.github.io/nmodl/html/notebooks/nmodl-odes-overview.html To do this, I simply change the following codes from original hh.mod(from cnexp to sparse): NEURON { SUFFIX hh1 ... BREAKPOINT { SOLV...
by gaoyy18
Sun Mar 26, 2023 12:42 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: What is the numeric integration method of cnexp?
Replies: 2
Views: 8462

What is the numeric integration method of cnexp?

Hi, I see the following codes for HH channel in hh.mod(https://raw.githubusercontent.com/neuronsimulator/nrn/master/src/nrnoc/hh.mod) BREAKPOINT { SOLVE states METHOD cnexp gna = gnabar*m*m*m*h ina = gna*(v - ena) gk = gkbar*n*n*n*n ik = gk*(v - ek) il = gl*(v - el) } My question for HH channel and ...
by gaoyy18
Tue Mar 14, 2023 12:35 pm
Forum: NEURON + Python
Topic: The integration method and results of one compartment with only HH channel
Replies: 1
Views: 11855

The integration method and results of one compartment with only HH channel

I constructed a single section (one single compartment) with HH channel. I tried to verify the implicit method when updating the voltage and voltage-gated variables m, n and h. # single compartment with HH channel, and use implicit euler method by setting h.secondorder=0 h.celsius=6.3 h.secondorder ...