How to use the nml.PGGSynapse function in nml

To help you get started, we’ve selected a few nml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neurokernel / neurokernel / neurokernel / neuroml / utils.py View on Github external
Vt=attr_dict['Vt'],
                            R=attr_dict['R'],
                            C=attr_dict['C'])
            module.lif_neurons.append(lif)
    for s in g.edges():
        attr_dict = g.edge[s[0]][s[1]]
        if attr_dict['model'] == 'AlphaSynapse':
            al = AlSynapse(id=attr_dict['name'],
                           class_=attr_dict['class'],
                           ar=attr_dict['ar'],
                           ad=attr_dict['ad'],
                           gmax=attr_dict['gmax'],
                           reverse=attr_dict['reverse'])
            module.al_synapses.append(al)
        elif attr_dict['model'] == 'power_gpot_gpot':
            pgg = PGGSynapse(id=attr_dict['name'],
                             class_=attr_dict['class'],
                             slope=attr_dict['slope'],
                             threshold=attr_dict['threshold'],
                             power=attr_dict['power'],
                             saturation=attr_dict['saturation'],
                             delay=attr_dict['delay'],
                             reverse=attr_dict['reverse'],
                             conductance=attr_dict['conductance'])
            module.pgg_synapses.append(pgg)

    interface = Interface()
    for p in i.nodes():
        attr_dict = i.node[p]
        port = Port(identifier=p,
                    interface=attr_dict['interface'],
                    io=attr_dict['io'],