本文整理汇总了Python中neuron.Neuron.create_synapse方法的典型用法代码示例。如果您正苦于以下问题:Python Neuron.create_synapse方法的具体用法?Python Neuron.create_synapse怎么用?Python Neuron.create_synapse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neuron.Neuron
的用法示例。
在下文中一共展示了Neuron.create_synapse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_synapse
# 需要导入模块: from neuron import Neuron [as 别名]
# 或者: from neuron.Neuron import create_synapse [as 别名]
def create_synapse(self, pre_neuron, post_neuron,
transporter=Transporters.GLUTAMATE, receptor=Receptors.AMPA,
enzyme_concentration=1.0, axon_delay=0, dendrite_strength=25):
# If single molecule is true, the synapse will save time and space by
# assuming that only one molecule will move through it. This means
# that the proteins must use the same native molecule, and no
# exogenous molecules can be admitted into the synapse.
# First, we must validate that the proteins use the same molecule.
# Then we ensure that the molecule is in active_molecules.
if transporter.native_mol_id != receptor.native_mol_id:
raise ValueError
# Create synapse.
synapse = Neuron.create_synapse(pre_neuron, post_neuron,
transporter=transporter, receptor=receptor,
enzyme_concentration=enzyme_concentration,
axon_delay=axon_delay, dendrite_strength=dendrite_strength)
self.synapses.append(synapse)
return synapse