setting seed in a Distributed Mechanism

NMODL and the Channel Builder.
Post Reply
patoorio
Posts: 81
Joined: Wed Jan 30, 2008 12:46 pm

setting seed in a Distributed Mechanism

Post by patoorio »

Hi,

I'm using a distributed mechanism with the scop_rand() function for the simulation of stochastic ion channels. I want to set the seed, otherwise I'm getting the same results every time I run the simulation from the beggining.
I have seen the use of set_seed() in the context of Point Processes and is easy to call the function as 'name.seed(seed)'. But how do I do it with a distributed mechanism? Using the suffix didn't work, at least in several ways I tried (section(0.5).seed_mech(), section.seed_mech(), etc). What is the correct way?
Do I have to declare the function as GLOBAL, RANGE, or none of them? How do I deal with the multiple 'instances' of the distributed mechanism in a multi-compartment model?

Thanks and best Regards
regger
Posts: 21
Joined: Sun Apr 22, 2012 9:49 pm

Re: setting seed in a Distributed Mechanism

Post by regger »

Hi,

I tried to do the same thing at some point and I think I did it with help of the init block and declaring a RANGE variable that was then used to call set_seed(RANGE var) from the init block of the mechanism. Don't remember exactly though.
Also, I think I remember there was only one scop RNG instance, so whatever seed you set last will be the one used.
I hope this makes some sense, and as I said, it was some time ago, so don't take this for granted please.

Best,
Robert
Post Reply