Skip to content

Commit

Permalink
Moved implicit RxD import to avoid RxD loading if not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Nov 21, 2024
1 parent fb13384 commit c8cd462
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion snudda/neurons/neuron_model_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import bluepyopt.ephys as ephys

from snudda.neurons.neuron_prototype import NeuronPrototype
from snudda.neurons.neuron_modulation import NeuronModulation


class NeuronModel(ephys.models.CellModel):
Expand Down Expand Up @@ -123,6 +122,9 @@ def __init__(self,
mechs=mechs, params=params)

if reaction_diffusion_file and self.use_rxd_neuromodulation:
# Only load the module if actually used, this avoids weird RxD stuff happening in NEURON when not needed
from snudda.neurons.neuron_modulation import NeuronModulation

self.modulation = NeuronModulation(neuron=self)
self.modulation.config_file = reaction_diffusion_file
else:
Expand Down

0 comments on commit c8cd462

Please sign in to comment.