Error simulating tutorial 3a · Issue #604 · MetaCell/NetPyNE-UI · GitHub
Skip to content

Error simulating tutorial 3a #604

Description

@ddelpiano
  • load tutorial 3a
  • create network
  • back to edit
  • edit the populations number of cells (info provided below).

Only the popParams number of cells have been edited

{E2: {'cellType': 'E', 'yRange': [50, 150], 'numCells': 125}, I2: {'cellType': 'I', 'yRange': [50, 150], 'numCells': 100}, E4: {'cellType': 'E', 'yRange': [150, 300], 'numCells': 20}, I4: {'cellType': 'I', 'yRange': [150, 300], 'numCells': 40}, E5: {'cellType': 'E', 'ynormRange': [0.6, 1.0], 'numCells': 66}, I5: {'cellType': 'I', 'ynormRange': [0.6, 1.0], 'numCells': 77}}
Error while instantiating the NetPyNE model
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
~/git/netpyne-ui/netpyne_ui/netpyne_geppetto.py in instantiateNetPyNEModelInGeppetto(self=<netpyne_ui.netpyne_geppetto.NetPyNEGeppetto object>, args={})
    193             with redirect_stdout(sys.__stdout__):
    194                 if not args.get("usePrevInst", False):
--> 195                     netpyne_model = self.instantiateNetPyNEModel()
        netpyne_model = undefined
        self.instantiateNetPyNEModel = <bound method NetPyNEGeppetto.instantiateNetPyNEModel of <netpyne_ui.netpyne_geppetto.NetPyNEGeppetto object at 0x7fa378da58d0>>
    196                     self.geppetto_model = self.model_interpreter.getGeppettoModel(netpyne_model)
    197 

~/git/netpyne-ui/netpyne_ui/netpyne_geppetto.py in instantiateNetPyNEModel(self=<netpyne_ui.netpyne_geppetto.NetPyNEGeppetto object>)
    665             #netcoded = jsonpickle.encode(self.netParams, unpicklable=False)
    666             #simcoded = jsonpickle.encode(self.simConfig, unpicklable=False)
--> 667             sim.create(self.netParams, self.simConfig)
        global sim.create = <function create at 0x7fa379ce49e0>
        self.netParams = <netpyne.specs.netParams.NetParams object at 0x7fa3149cb5d0>
        self.simConfig = <netpyne.specs.simConfig.SimConfig object at 0x7fa314193f90>
    668             sim.net.defineCellShapes()  # creates 3d pt for cells with stylized geometries
    669             sim.gatherData(gatherLFP=False)

~/git/netpyne-ui/src/netpyne/netpyne/sim/wrappers.py in create(netParams=<netpyne.specs.netParams.NetParams object>, simConfig=<netpyne.specs.simConfig.SimConfig object>, output=False, clearAll=False)
     55     conns = sim.net.connectCells()                # create connections between cells based on params
     56     stims = sim.net.addStims()                    # add external stimulation to cells (IClamps etc)
---> 57     rxd = sim.net.addRxD()                    # add reaction-diffusion (RxD)
        rxd = undefined
        sim.net.addRxD = <bound method addRxD of <netpyne.network.network.Network object at 0x7fa365a42dd0>>
     58     simData = sim.setupRecording()             # setup variables to record for each cell (spikes, V traces, etc)
     59 

~/git/netpyne-ui/src/netpyne/netpyne/network/netrxd.py in addRxD(self=<netpyne.network.network.Network object>, nthreads=None)
     80             self._addExtracellularRegion('extracellular', rxdParams['extracellular'])
     81         if 'species' in rxdParams:
---> 82             self._addSpecies(rxdParams['species'])
        self._addSpecies = <bound method _addSpecies of <netpyne.network.network.Network object at 0x7fa365a42dd0>>
        rxdParams = {constants: {ip3_init: 0.0, caDiff: 0.08, ip3Diff: 1.41, caci_init: 1e-05, caco_init: 2.0, gip3r: 1204000, gserca: 0.3913, gleak: 6.02, kserca: 0.1, kip3: 0.15, kact: 0.4, ip3rtau: 2000, fc: 0.8, fe: 0.2, margin: 20}, regions: {cyt: {'cells': 'all', 'secs': ['all'], 'nrn_region': 'i', 'geometry': {'class': 'FractionalVolume', 'args': {'volume_fraction': 0.8, 'surface_fraction': 1}}, 'dimension': None, 'dx': None}, er: {'cells': 'all', 'secs': ['all'], 'geometry': {'class': 'FractionalVolume', 'args': {'volume_fraction': 0.2}}, 'nrn_region': None, 'dimension': None, 'dx': None}, cyt_er_membrane: {'cells': 'all', 'secs': ['all'], 'geometry': {'class': 'ScalableBorder', 'args': {'scale': 1, 'on_cell_surface': False}}, 'nrn_region': None, 'dimension': None, 'dx': None}, ecs: {'extracellular': True, 'xlo': -20, 'ylo': -520, 'zlo': -20, 'xhi': 120, 'yhi': 20, 'zhi': 120, 'dx': 5, 'volume_fraction': 0.2, 'tortuosity': 1.6}}, species: {ca: {'regions': ['cyt', 'er', 'ecs'], 'd': 0.08, 'charge': 2, 'initial': 'caco_init if isinstance(node,rxd.node.NodeExtracellular) else (0.0017 - caci_init * fc) / fe if node.region == er else caci_init', 'ecs_boundary_conditions': None, 'atolscale': 1}, ip3: {'regions': ['cyt'], 'd': 1.41, 'initial': 0.0, 'charge': 0, 'ecs_boundary_conditions': None, 'atolscale': 1}}, states: {ip3r_gate_state: {'regions': ['cyt_er_membrane'], 'initial': 0.8}}, multicompartmentReactions: {serca: {'reactant': 'ca[cyt]', 'product': 'ca[er]', 'rate_f': 'gserca / ((kserca / (1000. * ca[cyt])) ** 2 + 1)', 'membrane': 'cyt_er_membrane', 'custom_dynamics': True, 'rate_b': None, 'regions': [None], 'membrane_flux': False}, leak: {'reactant': 'ca[er]', 'product': 'ca[cyt]', 'rate_f': 6.02, 'rate_b': 6.02, 'membrane': 'cyt_er_membrane', 'regions': [None], 'custom_dynamics': False, 'membrane_flux': False}, ip3r: {'reactant': 'ca[er]', 'product': 'ca[cyt]', 'rate_f': 'gip3r * (ip3[cyt] * 1000. * ca[cyt] / (ip3[cyt] + kip3) / (1000. * ca[cyt] + kact) * ip3r_gate_state[cyt_er_membrane]) ** 3', 'rate_b': 'gip3r * (ip3[cyt] * 1000. * ca[cyt] / (ip3[cyt] + kip3) / (1000. * ca[cyt] + kact) * ip3r_gate_state[cyt_er_membrane]) ** 3', 'membrane': 'cyt_er_membrane', 'regions': [None], 'custom_dynamics': False, 'membrane_flux': False}}, rates: {ip3rg: {'species': 'ip3r_gate_state[cyt_er_membrane]', 'rate': '(1. / (1 + 1000. * ca[cyt] / (0.3)) - ip3r_gate_state[cyt_er_membrane]) / ip3rtau', 'regions': [], 'membrane_flux': False}}}
     83         if 'states' in rxdParams:
     84             self._addStates(rxdParams['states'])

~/git/netpyne-ui/src/netpyne/netpyne/network/netrxd.py in _addSpecies(self=<netpyne.network.network.Network object>, params={ca: {'regions': ['cyt', 'er', 'ecs'], 'd': 0.08...'ecs_boundary_conditions': None, 'atolscale': 1}})
    283                                                             atolscale=param['atolscale'],
    284                                                             name=name,
--> 285                                                             ecs_boundary_conditions=param['ecs_boundary_conditions'])
        global ecs_boundary_conditions = undefined
        param = {'regions': ['cyt', 'er', 'ecs'], 'd': 0.08, 'charge': 2, 'initial': 'caco_init if isinstance(node,rxd.node.NodeExtracellular) else (0.0017 - caci_init * fc) / fe if node.region == er else caci_init', 'ecs_boundary_conditions': None, 'atolscale': 1}
    286         else: self.rxd['species'][label]['hObj'] = None
    287 

~/miniconda3/envs/netpyne/lib/python3.7/site-packages/neuron/rxd/species.py in __init__(self=Species(regions=[Region(..., nrn_region='i', geo...=2, initial=<function initial at 0x7fa315234e60>), regions=[Region(..., nrn_region='i', geometry=FractionalV...eighbor_areas_fraction=0.8), dx=0.25, name='cyt'), Region(..., nrn_region=None, geometry=Fractional...neighbor_areas_fraction=0.2), dx=0.25, name='er'), Extracellular(xlo=-20, ylo=-520, zlo=-20, xhi=12..., zhi=120.0, tortuosity=1.6, volume_fraction=0.2)], d=0.08, name='ca', charge=2, initial=<function initial>, atolscale=1, ecs_boundary_conditions=None, represents=None)
   1633             if initializer.is_initialized():
   1634                 self._do_init()
-> 1635                 rxd._update_node_data(True, True)
        rxd._update_node_data = <function _update_node_data at 0x7fa379ab8320>
   1636 
   1637     def _do_init(self):

~/miniconda3/envs/netpyne/lib/python3.7/site-packages/neuron/rxd/rxd.py in _update_node_data(force=True, newspecies=True)
    638                 # TODO: separate compiling reactions -- so the indices can be updated without recompiling
    639                 _include_flux(True)
--> 640                 _setup_units(force=True)
        global _setup_units = <function _setup_units at 0x7fa379ab8290>
        force = True
    641 
    642             # end#if

~/miniconda3/envs/netpyne/lib/python3.7/site-packages/neuron/rxd/rxd.py in _setup_units(force=True)
    597             clear_rates()
    598             _setup_memb_currents()
--> 599             _compile_reactions()
        global _compile_reactions = <function _compile_reactions at 0x7fa379ab8560>
    600             if _cvode_object.active():
    601                 _cvode_object.re_init()

~/miniconda3/envs/netpyne/lib/python3.7/site-packages/neuron/rxd/rxd.py in _compile_reactions()
   1141     c_region_list = []
   1142     for sets in matched_regions:
-> 1143         c_region_list.append(_c_region(sets))
        c_region_list.append = <built-in method append of list object at 0x7fa30ef23370>
        _c_region = <class 'neuron.rxd.region._c_region'>
        sets = set()
   1144 
   1145     for rptr in _all_reactions:

~/miniconda3/envs/netpyne/lib/python3.7/site-packages/neuron/rxd/region.py in __init__(self=<neuron.rxd.region._c_region object>, regions=set())
     55         global _c_region_lookup
     56         self._regions = [weakref.ref(r) for r in regions]
---> 57         self._overlap = self._regions[0]()._secs1d
        self._overlap = undefined
        self._regions._secs1d = undefined
     58         self.num_regions = len(self._regions)
     59         self.num_species = 0

IndexError: list index out of range

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions