## Search found 56 matches

Thu Aug 03, 2017 4:13 pm
Forum: NEURON + Python
Topic: Memory problem
Replies: 3
Views: 9901

### Re: Memory problem

Great, thanks ramcdougal!
Thu Aug 03, 2017 7:52 am
Forum: NEURON + Python
Topic: Memory problem
Replies: 3
Views: 9901

### Memory problem

Hi NEURON Forum, I am simulating a model of ~1500 cells (each having 20-30 variables) for 90 secs, and then vector recording the membrane potential and calcium in each cell at a timestep of 0.1ms. The simulations run for ~1 hour, and then the python process gets killed. If you look at top, %MEM gets...
Wed Feb 15, 2017 11:22 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Random maximal conductances in template
Replies: 3
Views: 6167

### Re: Random maximal conductances in template

Hi Ted,

Linford
Wed Feb 15, 2017 9:48 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Random maximal conductances in template
Replies: 3
Views: 6167

### Random maximal conductances in template

Dear NEURON forum, Everytime I call a template for a cell, I want it to pick parameters for certain membrane mechanisms from a distribution. For example, I have the following code which creates a cell template and randomly assigns the parameter gbar_na from a normal distribution: begintemplate CellT...
Fri Feb 10, 2017 6:54 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Thanks Ted, that work's great.

Here's the code I wrote:

Code: Select all

``````objref tvec, yvec
tvec = new Vector(4)
yvec = new Vector(4)

tvec.x[0]=0
tvec.x[1]=1000
tvec.x[2]=2000
tvec.x[3]=2000+1

yvec.x[0]=0.5e-3
yvec.x[1]=0.5e-3
yvec.x[2]=0.6e-3
yvec.x[3]=0.6e-3

yvec.play("forall g_pas = \$1",tvec,1)``````
Tue Feb 07, 2017 12:28 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Hi Ted, You mentioned using vector class play method, and actually that is precisely what I want to do now. I have an imported vector which has the same time-step dt as that set in my hoc code: chdir("C:/models/") objref f f = new File("ramp_g_pas.txt") f.ropen() objectvar vectv[j] for i=0,j-1 {acce...
Thu Jan 26, 2017 4:20 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Hi Ted,

Yes that is right.

Thanks.
Wed Jan 25, 2017 12:42 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Hi Ted, OK that's great. I'm having trouble implementing this... If I have a variable that is being generated from a run (soma.T_rel) and I want to force another variable in the simulation (gbar_irk) with this value, at each time step, do I simply write: objectvar vsrc vsrc = new Vector() vsrc = som...
Wed Jan 25, 2017 7:42 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Hi Ted, This is great because now I can give step changes to my conductance parameters. What if I want to change a parameter (in my case, the maximal conductance of a channel) continuously at each timestep? In particular I want to model an inwardly rectifying potassium (IRK) channel. The maximal con...
Wed Jan 25, 2017 7:31 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Great, thanks Ted!
Mon Jan 16, 2017 4:26 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

This is the file I have for playing in a time-varying conductance after loading some saved states, but I am not sure how to get it working. I thought maybe have initi() set to cvode.active() and loading the saved states, and then having seti() refer to the 3 different cvode events would work, but it...
Thu Jan 12, 2017 11:53 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Hi Ted, One question: I had some saved states that I opened, to initiate the equations from: objref svstate, f svstate = new SaveState() f = new File("states_Human1-1_1.dat") svstate.fread(f) proc init() { finitialize(v_init) svstate.restore() t = 0 // t is one of the "states" if (cvode.active()) { ...
Thu Jan 12, 2017 10:21 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

So the below seems to be working better, thanks! tstop= 10e3 DUR = 3e3 // ms, duration of each pulse soma.g_pas = 0.5e-3 START = 3e3 // ms, time of first pulse INTERVAL = 6e3 // ms, interval between pulse starts objref fih fih = new FInitializeHandler("initi()") STIMON = 0 proc initi() { STIMON = 0 ...
Thu Jan 12, 2017 10:13 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Code: Select all

`````` stim.amp = 0
``````
There's one!
Thu Jan 12, 2017 9:21 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Time-varying maximal conductance
Replies: 19
Views: 14389

### Re: Time-varying maximal conductance

Thanks for your reply ted. So I've written the following (ammended from ipulse) to give g_pas a jump in its value for DUR = 3e3ms, at START = 3e3ms. I called it g_pas_step.hoc: tstop= 10e3 DUR = 3e3 // ms, duration of each pulse g_pas = 0.5e-3 START = 3e3 // ms, time of first pulse INTERVAL = 4e3 //...