Skip to content

Commit fda0b7f

Browse files
authored
Merge pull request #624 from MetaCell/feature/604
#604 fix: Fix issue w/ model double instanciation
2 parents c7d781b + 614d1bd commit fda0b7f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

netpyne_ui/netpyne_geppetto.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ def instantiateNetPyNEModelInGeppetto(self, args):
192192
try:
193193
with redirect_stdout(sys.__stdout__):
194194
if not args.get("usePrevInst", False):
195+
if self.doIhaveInstOrSimData()['haveInstance']:
196+
sim.clearAll()
195197
netpyne_model = self.instantiateNetPyNEModel()
196198
self.geppetto_model = self.model_interpreter.getGeppettoModel(netpyne_model)
197199

@@ -259,7 +261,7 @@ def simulate_single_model(self, experiment: model.Experiment = None, use_prev_in
259261
netpyne_model = self.instantiateNetPyNEModel()
260262

261263
self.geppetto_model = self.model_interpreter.getGeppettoModel(netpyne_model)
262-
264+
263265
simulations.run()
264266

265267
if self.geppetto_model:
@@ -374,7 +376,7 @@ def _prepare_simulation_files(self, experiment: model.Experiment = None, use_pre
374376

375377
def _prepare_batch_files(self, experiment: model.Experiment) -> str:
376378
"""Creates template files and netpyne model files in the experiment folder.
377-
379+
378380
Only for an experiment consisting of many trials.
379381
380382
:param experiment: given experiment

0 commit comments

Comments
 (0)