Page 1 of 1

### Placing a point process at a known 3D location

Posted: Tue Dec 11, 2018 11:45 am
Using import3D I have created an anatomically detailed model of a cell from an SWC file. I now want to add synapses to this model. I know the 3D location of each synapse and have determined the 3D point from the SWC file that each synapse is closest to. Now, what is the best way to add these synapses? Once I know the section ID, I can use arc3d() to determine how far down the section I want to put my synapse, correct? However, I don't know the best way to determine which section contains my 3D point. Is there a simple command to do this?

### Re: Placing a point process at a known 3D location

Posted: Wed Dec 12, 2018 10:20 am
Everything is not built into NEURON, but NEURON provides simple tools that enable building what you need with hoc and/or Python. For each section whose geometry has been specified using pt3d syntax, NEURON maintains an internal table of x,y,z coordinates and the corresponding diameter. Now would be a good time to read
https://www.neuron.yale.edu/neuron/stat ... metry.html
and especially the part about "3-D specification of geometry".

Here is an algorithm in pseudocode for identifying where to attach synapses:

Code: Select all

``````AFTER the model cell's topology, geometry,
and spatial discretization have been completed--

for each set of xyz coordinates at which a synapse should be located
for each section in the model
look for a point with matching coordinates (i.e. check every x3d, y3d, and z3d that belongs to the section)
when it is found, attach a synapse to this location``````
This algorithm isn't marvellously efficient, but it should work, and it would be easy to implement.

### Re: Placing a point process at a known 3D location

Posted: Tue Dec 18, 2018 3:13 pm
Thanks! I was thinking of doing something like this, but I just thought I would check because I often use way too many for loops to solve simple problems. I did implement the strategy you outlined and it worked great.

### Re: Placing a point process at a known 3D location

Posted: Tue Dec 18, 2018 6:39 pm
Excellent!