Hello,
Is there any way to change membrane resistance/capacitance values during run time? My simple thinking was to add a condition
if (t >= time_of_interest) then
change membrane resistance
end
With my custom NMODL mechanisms I can do that by just adding the condition to MOD file, but what about HOC?
Runtime control of membrane resistance/capacitance
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Runtime control of membrane resistance/capacitance
See the very last item in the Hot tips section of the Forum, called
How to change parameters during a simulation
Thiswon't work because it isn't integrated into the standard run system's main computational loop. Even if it were, it would not work with adaptive integration.
Changing capacitance violates conservation of charge unless you also change membrane potential in the affected segment(s). Specifically: if the new cm in a particular segment is k * the old cm, v in that segment must be changed to v/k.
How to change parameters during a simulation
This
Code: Select all
if (t >= time_of_interest) then
change membrane resistance
end
This also will not work with adaptive integration; events would be necessary to make it compatible with adaptive integration.With my custom NMODL mechanisms I can do that by just adding the condition to MOD file
Changing capacitance violates conservation of charge unless you also change membrane potential in the affected segment(s). Specifically: if the new cm in a particular segment is k * the old cm, v in that segment must be changed to v/k.