Search found 5 matches
- Wed May 07, 2025 6:28 pm
- Forum: NEURON + Python
- Topic: Changing parameters in NMODL files from within a Python script?
- Replies: 2
- Views: 32525
Re: Changing parameters in NMODL files from within a Python script?
Here's an example of some code which changes the amplitude of a current to see the change in the mean firing frequency. It sets up only one object for the soma and current clamp, and loops through different values of the amplitude of injected current. from neuron import h import numpy as np import m...
- Thu Sep 26, 2024 10:31 pm
- Forum: Adding new mechanisms and functions to NEURON
- Topic: Updating the derivative in a NET_RECEIVE block
- Replies: 1
- Views: 25299
Updating the derivative in a NET_RECEIVE block
Hi, I am writing a mod file for a custom synapse that requires updating the derivative of a STATE variable whenever the synapse is turned on and off. The code looks something like this (abstracted). This code works in the case where I am not updating the derivative during a synaptic event, but rathe...
- Mon Sep 16, 2024 2:01 pm
- Forum: Adding new mechanisms and functions to NEURON
- Topic: Conditionally Using Ions for Ion Pool Regulation
- Replies: 3
- Views: 34031
Re: Conditionally Using Ions for Ion Pool Regulation
Thanks for the quick reply, that makes a lot of sense!
- Fri Sep 13, 2024 2:01 pm
- Forum: Adding new mechanisms and functions to NEURON
- Topic: Conditionally Using Ions for Ion Pool Regulation
- Replies: 3
- Views: 34031
Conditionally Using Ions for Ion Pool Regulation
Hi, I am fairly new to using NEURON (via Python), and I am trying to create a mechanism in which the conductance can be optionally regulated by an ion pool. If a Ca pool, say, writes to cai, and if a mechanism was inhibited by cai, then I would need to have the line USEION ca READ cai in the NEURON ...
- Mon Sep 09, 2024 2:07 pm
- Forum: NEURON + Python
- Topic: Type annotation of NEURON objects
- Replies: 3
- Views: 44387
Re: Type annotation of NEURON objects
If you type the following: from neuron import nrn dir(nrn) you can see which objects have their own classes. From this we can see that you can annotate the following types: sections, segments, and density mechanisms. All of the other types will show up as hoc.HocObject because Python is just a wrapp...