How can I create a synapse in the NEURON simulator using its Python interface? I would like to create 2 Sections and connect them with a synapse, but there aren't any functions for it on the Section API or in the Section docs:
from neuron import h
src = h.Section(name="source")
dest = h.Section(name="destination")
In NEURON synapses are of the family of
PointProcesses. You can insert aPointProcessinto aSectionby accessing it on theHocInterpreterand giving it aSegmenton theSection. You then have to create aNetConfrom a voltage pointer on the presynaptic Section (src(x)._ref_v) to the target point process:Make sure to keep references to each piece around or they get garbage collected. Also make sure that you set the proper
connection.weight(it's an array, so usuallyconnection.weight[0]) and that you set the proper attributes on the point process for it to function as well.