Search found 6290 matches

by ted
Tue Nov 14, 2023 3:50 pm
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 71698

Re: Conditional termination of simulation

Good try. There is no need to write any NMODL code--everything can be done with hoc or Python or a combination of the two. Here's an example that assumes the existence of a section called soma with 100 um2 surface area and hh membrane properties. Omitted is the "from neuron import h, gui" ...
by ted
Tue Nov 14, 2023 11:36 am
Forum: Other questions
Topic: Applying Sinusoidal Voltage to Membrane
Replies: 6
Views: 39099

Re: Applying Sinusoidal Voltage to Membrane

First you need to decide exactly what you are trying to do. This "apply a sinusoidal voltage to vary the membrane potential over time" means you want to force membrane potential to follow a specific time course. That is best done with a voltage clamp--specifically, an instance of NEURON's ...
by ted
Fri Nov 10, 2023 12:48 pm
Forum: Modeling networks
Topic: neuronal response to magnetically induced electric fields
Replies: 4
Views: 26775

Re: neuronal response to magnetically induced electric fields

So changes to nrnivmodl since NEURON 7.8 have interfered with NEMO. Where did you find NEMO and what is the paper that presents this tool? I wonder if its developers would be interested in making it work under the latest version of NEURON, if that doesn't require too much of their effort.
by ted
Sun Nov 05, 2023 1:18 am
Forum: NEURON hacks
Topic: Conditional termination of simulation
Replies: 10
Views: 71698

Re: Conditional termination of simulation

Use events. Specifically, 1. use an FInitializeHandler to set the spike count to 0 at the start of the simulation 2. usethe NetCon class's record() method to call a function every time the cell spikes. This function should do the following: increase the spike count by 1 if spike count == 1 tnow = t ...
by ted
Sun Nov 05, 2023 1:00 am
Forum: Modeling networks
Topic: neuronal response to magnetically induced electric fields
Replies: 4
Views: 26775

Re: neuronal response to magnetically induced electric fields

if there is some function implemented in NEURON to simulate the characteristics of magnetically induced electric fields That is not included with NEURON. However, there are a lot of smart NEURON users who are interested in related problems, so maybe one or more of them has already implemented their...
by ted
Fri Oct 27, 2023 9:48 am
Forum: NEURON + Python
Topic: Dealing with objects defined in functions
Replies: 1
Views: 8786

Re: Dealing with objects defined in functions

Here's an implementation that does almost everything via procedures, and contains some (not so) latent hints. Imports and definitions first from neuron import h, gui ### Model and simulation parameters # KISS when developing/debugging # this means small nets, short run times, few spikes # make symbo...
by ted
Mon Oct 23, 2023 11:44 am
Forum: NEURON + Python
Topic: CoreNeuron verbose output
Replies: 3
Views: 8203

Re: CoreNeuron verbose output

Actually, h.verbose could be an interesting feature.

Just out of curiosity: what performance boost are you getting?
by ted
Sat Oct 21, 2023 10:56 pm
Forum: NEURON + Python
Topic: CoreNeuron verbose output
Replies: 3
Views: 8203

Re: CoreNeuron verbose output

Try inserting
coreneuron.verbose = 0
after
coreneuron.enable = True

You might glean some other useful stuff from
https://github.com/neuronsimulator/nrn/ ... _direct.py
by ted
Mon Oct 16, 2023 12:51 pm
Forum: Other questions
Topic: Implementing extracellular stimulation
Replies: 14
Views: 54877

Re: Extracellular stimulation and recording

I am assuming I should proceed with that first part of your reply?
Please do.
by ted
Mon Oct 16, 2023 12:36 pm
Forum: Modeling networks
Topic: Accessing tpre and tpost from STDP mod file
Replies: 5
Views: 9492

Re: Accessing tpre and tpost from STDP mod file

I forgot to mention that the NetCon that monitors the postsynaptic potential should have the same threshold as is specified in the NMODL's WATCH statement. For STDPE2, that would be the value of the RANGE variable thresh. For a synaptic mechanism S that can handle multiple input streams, the cleanes...
by ted
Mon Oct 16, 2023 12:13 pm
Forum: NEURON + Python
Topic: h.parallelContext in a model being simulated on a cluster
Replies: 3
Views: 7924

Re: h.parallelContext in a model being simulated on a cluster

Interesting problem. Just in case you ran into a NEURON bug: what version of NEURON is running on your Mac, and what version is the cluster using?
by ted
Fri Oct 13, 2023 1:17 pm
Forum: Other questions
Topic: Implementing extracellular stimulation
Replies: 14
Views: 54877

Re: Extracellular stimulation and recording

Yow, instead of quoting your message and replying to it, in a hurry I made the mistake of editing your message. At least I captured your questions so we can continue the discussion.
by ted
Wed Oct 11, 2023 4:20 pm
Forum: Modeling networks
Topic: Accessing tpre and tpost from STDP mod file
Replies: 5
Views: 9492

Re: Accessing tpre and tpost from STDP mod file

The easy way to discover tpost is to attach a NetCon to the segment that has the instance of the STDPE2 class, and use that NetCon's record() method to capture local postsynaptic "spike times" to a Vector. What's not so clear to me is how you are capturing the tpre values. Are you recordin...
by ted
Fri Oct 06, 2023 1:01 pm
Forum: MSWin
Topic: New installation of NEURON + Python
Replies: 4
Views: 31322

Re: New installation of NEURON + Python

I've noticed the installer from https://www.neuron.yale.edu/neuron/download is version 8.2.0, and it kept giving one of my students a "no module named hoc" error. They eventually used the installer found on nrn.readthedocs.io and it is version 8.2.3 and this works fine. Just thought I sho...
by ted
Wed Oct 04, 2023 11:44 am
Forum: Modeling networks
Topic: Accessing tpre and tpost from STDP mod file
Replies: 5
Views: 9492

Re: Accessing tpre and tpost from STDP mod file

The first step is for you to disclose the code of the mod file that you are actually using (either include it in your next post, or better yet provide a URL to where you found it). Statements like
"the STDP mod file created by so and so"
mean almost nothing because text files are fungible.