Search found 6305 matches

by ted
Fri Jun 14, 2024 10:24 am
Forum: NEURON + Python
Topic: Loading a Linear Circuit Mechanism in Python
Replies: 1
Views: 164

Re: Loading a Linear Circuit Mechanism in Python

This example of how to develop and use a Linear Circuit implementation of a gap junction via Python https://www.neuron.yale.edu/ftp/ted/neu ... cirgap.zip might provide some useful hints.
by ted
Thu Jun 13, 2024 10:51 am
Forum: OS X
Topic: NEURON-nightly and compiling mod files
Replies: 1
Views: 124

Re: NEURON-nightly and compiling mod files

Interesting. Needs to be brought to the attention of the NEURON development team. Regarding what you should do, if your goal is to do science, decide what's most important to you--cosmetics, or results; spending time trying to work around problems in development code, or addressing scientific proble...
by ted
Fri May 24, 2024 12:02 pm
Forum: NEURON + Python
Topic: Can't we write tautable.hoc in Python?
Replies: 1
Views: 196

Re: Can't we write tautable.hoc in Python?

Sure, if you want to rewrite those statements in Python, go ahead. Here's a seed to get you started. I have even corrected the comment in the second statement.

Code: Select all

vecv_KIR = h.Vector()
vecv_KIR.indgen(-100, 0, 10) # -100 to 0 with steps of 10
by ted
Tue May 21, 2024 12:41 pm
Forum: Getting started
Topic: square in soma in plotshape
Replies: 1
Views: 599

Re: square in soma in plotshape

If a section's geometry is specified with the "stylized" method (assigning values to L and diam), the section will be a cylinder of length L and diameter diam, and it will look like a cylinder in graphical renderings that show diameter. If the geometry is specified with the pt3d method (a ...
by ted
Wed Apr 24, 2024 2:35 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Recording variables from ARTIFICIAL_CELL
Replies: 14
Views: 1523

Re: Recording variables from ARTIFICIAL_CELL

There are two problems. First is accessing the values of the variables that you want. Second is accessing them at the times that you want. Typically you want to capture these variables at fixed intervals, not just when the ARTIFICIAL_CELL receives an event. The easiest case is when the variables are...
by ted
Mon Apr 15, 2024 11:59 am
Forum: Getting started
Topic: Section-relative location of a segment
Replies: 3
Views: 1269

Re: Section-relative location of a segment

Around here we all have egg on our faces.
by ted
Mon Apr 15, 2024 9:43 am
Forum: Getting started
Topic: Section-relative location of a segment
Replies: 3
Views: 1269

Re: Section-relative location of a segment

Given all that beautiful documentation at nrn.readthedocs.io I find it even more surprising that it is so difficult to discover the answer to your question. One would expect it to be with the other documentation about Section, but it isn't. But wait, there's a Search feature . . . which isn't very h...
by ted
Sat Apr 13, 2024 3:45 pm
Forum: NEURON + Python
Topic: NetStim causes SaveState crash
Replies: 6
Views: 1533

Re: NetStim causes SaveState crash

Good questions. tstop and continuerun are part of NEURON's standard run system, much of which is implemented in hoc. You'll find the hoc component of the standard run system in a file called stdrun.hoc. You can learn a lot by finding and browsing through stdrun.hoc (hints: use your OS's file search ...
by ted
Tue Apr 09, 2024 1:27 am
Forum: NEURON + Python
Topic: NetStim causes SaveState crash
Replies: 6
Views: 1533

Re: NetStim causes SaveState crash

Sure, everything can be done entirely by writing code--hoc or Python or some combination of both--but NEURON's InterViews-based GUI provides many powerful tools for getting a lot done with little or no programming effort. And these tools give you immediate access to key parameters. Very useful for i...
by ted
Mon Apr 08, 2024 1:32 pm
Forum: Hot tips
Topic: Extracellular stimulation and recording
Replies: 10
Views: 108702

Re: Extracellular stimulation and recording

I'm sure that some modelers have implemented python code based on the hoc example, but I don't know of any sources that are available online. Maybe it's time for there to be an "official" example (well, one from a "trusted source" or at least a source that is willing to support i...
by ted
Mon Apr 08, 2024 12:34 pm
Forum: NEURON + Python
Topic: NetStim causes SaveState crash
Replies: 6
Views: 1533

Re: NetStim causes SaveState crash

I don't think you have to do SaveState. I just uploaded

Code: Select all

https://www.neuron.yale.edu/ftp/ted/neuron/segmentedrun.zip
which contains hoc and python examples that include event-driven synaptic transmission. Try either one by executing
nrngui demo.hoc
or
python -i demo.py
by ted
Thu Apr 04, 2024 8:15 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: "xtra is not a mechanism"
Replies: 7
Views: 959

Re: "xtra is not a mechanism"

The problem isn't your files. NEURON and Windows have changed a lot since 2021. Uninstall NEURON, then download and install the latest version from nrn.readthedocs.io. Then delete the nrnmech.dll file, run nrnivmodl, and see what works.
by ted
Thu Apr 04, 2024 11:00 am
Forum: Adding new mechanisms and functions to NEURON
Topic: "xtra is not a mechanism"
Replies: 7
Views: 959

Re: "xtra is not a mechanism"

(I split these posts from the thread that they were part of, because these have nothing to do with extracellular stimulation and everything to do with adding new mechanisms to NEURON) In the directory where you ran nrnivmodl execute this command nrngui NEURON will print several lines of messages to ...
by ted
Wed Apr 03, 2024 2:05 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: "xtra is not a mechanism"
Replies: 7
Views: 959

Re: Extracellular stimulation and recording

An error message of the form foo is not a mechanism means that your hoc or python file uses a mechanism called foo, but either 1. you haven't compiled the mod file that defines the properties of foo or 2. if you did compile it, the results of compilation were written in some directory where NEURON d...
by ted
Tue Apr 02, 2024 11:52 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: "xtra is not a mechanism"
Replies: 7
Views: 959

Re: Extracellular stimulation and recording

Hi, firoozeh. Open a terminal and cd into the directory that contains the py, hoc, ses, and mod files. At the system prompt execute nrngui stimsphere.hoc Did that work? What did NEURON print to the terminal? Exit NEURON and try python -i stimsphere.py (or maybe you have to execute python3 -i stimsph...