Comments (9)
Sorry. That is a case I forgot to handle in the new state discontinuity adjustments in NET_RECEIVE
blocks. A fix should come today.
from nrn.
A new commit with the message
Some kinds of state discontinuity adjustments require cvode.
If that is not available then the adjustment code is not emitted.
A notice is printed.
$ nocmodl ProbAMPANMDA_EMS.mod
Translating ProbAMPANMDA_EMS.mod into ProbAMPANMDA_EMS.c
Notice: This mechanism cannot be used with CVODE
Notice: A_AMPA discontinuity adjustment not available.
Notice: B_AMPA discontinuity adjustment not available.
Notice: A_NMDA discontinuity adjustment not available.
Notice: B_NMDA discontinuity adjustment not available.
Warning: dt undefined. (declared within VERBATIM?)
Thread Safe
from nrn.
I'm leaving it open as to the possibility of emitting proper state discontinuity adjustment code for this case.
from nrn.
Thanks Michael for the fix! New changes allow now to build neurodamus without any issue.
from nrn.
@nrnhines
I'm having the same problem with a version of NEURON I compiled from source (this repository, master branch) today. This was not a problem in previous versions of NEURON.
vI not really a STATE; Ie. No differential equation for it.
Full mod file here:
TITLE Mod file for component: Component(id=RS type=izhikevich2007Cell)
NEURON {
POINT_PROCESS RS
NONSPECIFIC_CURRENT i : To ensure v of section follows vI
RANGE v0 : parameter
RANGE k : parameter
RANGE vr : parameter
RANGE vt : parameter
RANGE vpeak : parameter
RANGE a : parameter
RANGE b : parameter
RANGE c : parameter
RANGE d : parameter
RANGE C : parameter
RANGE iSyn : exposure
RANGE iMemb : exposure
RANGE copy_v : copy of v on section
}
UNITS {
(nA) = (nanoamp)
(uA) = (microamp)
(mA) = (milliamp)
(A) = (amp)
(mV) = (millivolt)
(mS) = (millisiemens)
(uS) = (microsiemens)
(molar) = (1/liter)
(kHz) = (kilohertz)
(mM) = (millimolar)
(um) = (micrometer)
(umol) = (micromole)
(S) = (siemens)
}
PARAMETER {
v0 = -60 (mV)
k = 7.0E-4 (uS / mV)
vr = -60 (mV)
vt = -40 (mV)
vpeak = 35 (mV)
a = 0.030000001 (kHz)
b = -0.002 (uS)
c = -50 (mV)
d = 0.1 (nA)
C = 1.0E-4 (microfarads)
}
ASSIGNED {
v (mV)
i (mA/cm2)
copy_v (mV)
iSyn (nA) : derived variable
iMemb (nA) : derived variable
rate_v (mV/ms)
rate_u (nA/ms)
}
STATE {
vI (nA)
u (nA)
}
INITIAL {
rates()
rates() ? To ensure correct initialisation.
net_send(0, 1) : go to NET_RECEIVE block, flag 1, for initial state
u = 0
}
BREAKPOINT {
SOLVE states METHOD cnexp
copy_v = v
i = vI * C
}
NET_RECEIVE(flag) {
if (flag == 1) { : Setting watch for top level OnCondition...
WATCH (v > vpeak) 1000
}
if (flag == 1000) {
v = c
vI = 0 : Setting rate of change of v to 0
u = u + d
}
if (flag == 1) { : Set initial states
v = v0
}
}
DERIVATIVE states {
rates()
u' = rate_u
}
PROCEDURE rates() {
iSyn = 0
iMemb = k * (v- vr ) * (v- vt ) + iSyn - u
rate_v = iMemb / C
rate_u = a * ( b * (v- vr ) - u )
vI = -1 * rate_v
}
from nrn.
In this case, it really is the case that vI is not a STATE and it should be declared ASSIGNED.
STATE is supposed to be reserved for the case where a variable is not just an assigned value but
a dependent variable of a set of equations. By the way, setting vI in the NET_RECEIVE block and in the rates procedure makes the detailed effect of vI quite obscure since its value is transiently 0 which should
have no real effect since it is immediately replaced by the value of a function of v and u. Choosing a smaller dt will cause the transient 0 to have less and less effect. And what effect it has is only due
to implementation details of the fixed step method. Why do you not call rates() from the NET_RECEIVE
block to set vI to its correct value with respect to the new values of v and u.
from nrn.
This mod file was programatically generated by jNeuromL and was compatible with previous versions of NEURON. If this implementation is not longer permitted, I'll let the jNeuroML developers know that they need to avoid pseudo-states like this.
The source LEMS file was https://github.com/OpenSourceBrain/IzhikevichModel/blob/master/NeuroML2/LEMS_2007One.xml
and I converted it with jnml LEMS_2007One.xml -neuron
)
from nrn.
@pgleeson What do you think?
from nrn.
The reason for the greater strictness is because NET_RECEIVE block state discontinuities can now
be integrated more accurately when the nrn_netrec_state_adjust flag is set. STATE has always been
intended to list the unknown or dependent variables of simultaneous algebraic, ODE, or kinetic scheme
states that need to be managed by blocks called by the "SOLVE" statement.
from nrn.
Related Issues (20)
- Deprecation warning when building wheels on Python 3.12 and above
- ARM64 MacOS nightly wheels missing on PyPI
- Name of `h` is misleading HOT 1
- NEURON 8.2.4 patch release
- Failure to build docs on release 8.2 HOT 1
- Build failure during development. HOT 4
- Allow trivial changes without running CI. HOT 3
- Improve installation tests. HOT 1
- Update Release Documentation after 8.2.4
- Missing dependency between `nocpout.cpp` and `${mod}.cpp`. HOT 1
- Outdated `cfiles` in `nrnivmodl`. HOT 4
- Mechanism Loading Issues: nrn_dll_loaded does not update and Segfaults
- Typo for windows download url at https://nrn.readthedocs.io/en/8.2.4/ HOT 3
- Remove usage of deprecated `pkg_resources` HOT 2
- An Option to Disable Automatic Loading of Mechanisms on Import
- In coreneuron.py : getters of some attributes don't work.
- Python contributing instructions are out of date
- Error with master / upcoming v9.0: "generic_data_handle{raw=..type=void*} cannot be converted to data_handle<double>"
- Higher simulation time in NEURON 9 compared to NEURON 8.2.4 HOT 15
- Investigate memory usage increase with GPU CI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nrn.