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
def create_synapse(self, pre_neuron, post_neuron, transporter=Transporters.GLUTAMATE, receptor=Receptors.AMPA, enzyme_concentration=1.0, axon_delay=None, dendrite_strength=0.05, active_molecules=[Molecule_IDs.GLUTAMATE], axon_probe_name=None, cleft_probe_name=None, dendrite_probe_name=None): # 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 if transporter.native_mol_id not in active_molecules: active_molecules.append(transporter.native_mol_id) # Create synapse. synapse = Neuron.create_synapse(pre_neuron, post_neuron, transporter=transporter, receptor=receptor, active_molecules = active_molecules, enzyme_concentration=enzyme_concentration, axon_delay=axon_delay, dendrite_strength=dendrite_strength) self.synapses.append(synapse) # Set up probes. if axon_probe_name: axon = synapse.axon probe = ConcentrationProbe(axon.native_mol_id) self.concentration_probes[axon] = probe self.probes[axon_probe_name] = probe if cleft_probe_name: cleft = synapse.synaptic_cleft probe = ConcentrationProbe(synapse.axon.native_mol_id) self.concentration_probes[cleft] = probe self.probes[cleft_probe_name] = probe if dendrite_probe_name: dendrite = synapse.dendrites[0] probe = ConcentrationProbe(dendrite.native_mol_id) self.concentration_probes[dendrite] = probe self.probes[dendrite_probe_name] = probe return synapse
def create_synapse(self, pre_neuron, post_neuron, receptor=epsp, delay=0, strength=1): synapse = Neuron.create_synapse(pre_neuron, post_neuron, receptor=receptor, delay=delay, strength=strength) self.synapses.append(synapse) return synapse