import neuroml.loaders as loaders from neuroml import Cell cell_doc = loaders.NeuroMLLoader.load("SingleCompMuscle.cell.nml") cell = cell_doc.cells[0] print('Loaded cell: %s'%cell.id) segment = cell.morphology.segments[0] p = segment.proximal d = segment.distal print('Cell has a single segment (id: %s, name: %s) consisting of a cylinder from (%s, %s, %s) to (%s, %s, %s)' % (segment.id, segment.name, p.x, p.y, p.z, d.x, d.y, d.z)) membrane_properties = cell.biophysical_properties.membrane_properties reversal_potentials = {} densities = {} for chan_dens in membrane_properties.channel_densities: reversal_potentials[chan_dens.id] = chan_dens.erev densities[chan_dens.id] = chan_dens.cond_density print("Reversal potentials: %s"%reversal_potentials) print("Channel densities: %s"%densities) k_slow = loaders.NeuroMLLoader.load("k_slow.channel.nml").ion_channel[0] k_fast = loaders.NeuroMLLoader.load("k_fast.channel.nml").ion_channel[0] ca_boyle = loaders.NeuroMLLoader.load("ca_boyle.channel.nml").ion_channel[0] for chan in [k_slow, k_fast, ca_boyle]: print('Loaded channel: %s'%chan.id) for g in chan.gate_hh_tau_infs: print(" Gate %s present, instances %i"%(g.id,g.instances)) if g.time_course: print(" Time course: %s, tau: %s"%(g.time_course.type, g.time_course.tau)) if g.steady_state: print(" Steady state: %s, rate: %s, scale: %s, midpoint: %s"%(g.steady_state.type, g.steady_state.rate, g.steady_state.scale, g.steady_state.midpoint))