Comments (7)
So
DERIVATIVE states {
if (enable) {
m' = (1.0 - m) * 0.1
}
}
translates to correct c syntax.
from nrn.
I will try to fix that , but it still won't be a valid model unless the states block is written
DERIVATIVE states {
if (enable == 1) {
m' = (mInf-m)/mTau
h' = (hInf-h)/hTau
}else{
m' = 0
h' = 0
}
}
from nrn.
There does not seem to be any easy way to fix this internally. I recommend you use the style
DERIVATIVE states {
LOCAL mt, ht
if (enable == 1) {
mt = 1/mTau
ht = 1/hTau
}else{
mt = 0
ht = 0
}
m' = (mInf-m)*mt
h' = (hInf-h)*ht
}
from nrn.
Hi Michael,
This was asked by Giuseppe for structural plasticity simulation. What we would like to do is:
- there are lot of potential synapses in structural circuit
- there is a flag (range variable) that indicate whether synapse is active or not
- depending on flag, we want to completely skip execution of DERIVATIVE and BREAKPOINT block to reduce computation cost
Is there any way to achieve this? The suggestion you mentioned above wouldn't solve computational cost.
from nrn.
The following removes most of the computational cost of the cnexp method but at the cost of disallowing
cvode for the model. You may wish to introduce an if statement to surround the i=m*v in the BREAKPOINT to set i=0.
NEURON {
SUFFIX temp
NONSPECIFIC_CURRENT i
RANGE enable
}
PARAMETER {
enable = 1
}
ASSIGNED {
v
i
}
STATE {
m
}
INITIAL {
m = 0
}
BREAKPOINT {
SOLVE proc
i = m*v
}
PROCEDURE proc() {
if (enable) {
SOLVE states METHOD cnexp
}
}
DERIVATIVE states {
m' = (1.0 - m) * 0.1
}
from nrn.
-
Is it possible to have a fix that does not disable CVODE?
-
I believe Giuseppe mentioned that changing all mod files with an
if
statement wouldnt be ideal because whoever would take over after his departure wouldn't understand the rationale.
from nrn.
A fix is pushed for missing trailing tokens (when they exist) when _ode_matsol%d functions are generateed
from nrn.
Related Issues (20)
- Windows CI silent failure to compile. HOT 1
- Cython <3 not found HOT 14
- Vector.`as_numpy` is unsafe HOT 1
- Building NEURON with GPU support fails on linking HOT 1
- Don't run most CI jobs for draft PRs
- Issue with GPU build using latest NVHPC compilers HOT 13
- CoreNEURON fails to cleanup `NewtonSpace`.
- always use standard C++ regex HOT 3
- Windows CIs failing (again) HOT 1
- segfault with test_version_macros.py HOT 17
- Silence Eigen related warnings with NVHPC?
- Different behaviours from loading an ascii morphology file in hoc and in python HOT 2
- nocmodl: leak and infinite loop in `massagederiv`
- ReadTheDocs: setup integration with a secret - deadline 31/01/2024
- Rewrite nonlinz to use std::complex instead of 2 vectors
- rxd.Rate requires h.finitialize() to be called before it has an effect
- rxd.cpp get_reaction_rates and solve_reaction possibly repeatedly mallocing. HOT 2
- The novel method called "Dendritic Hierarchical Scheduling" (DHS) from the paper of Zhang, He 2023
- Add hook for external `nmodl` executable in `nrnivmodl`
- Releases with Python 3.12 support HOT 1
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.