Ok, I got something working.  I’m using the iaf_cond_exp_neuron model, not the iaf_psc_exp_neuron.  I just renamed it to chris_iaf_cond_exp_neuron.  Now when I create it in pynest, I use chris_iaf_cond_exp_neuron__with_stp_synapse.  Similarly, the connect uses stp_synapse__with_chris_iaf_cond_exp_neuron.

 

For completeness, I generate using

 

generate_target(input_path=["/home/chris/CAs/sep24/nestML8_models/chris_iaf_cond_exp_neuron.nestml","/home/chris/CAs/sep24/nestML8_models/stp_synapse.nestml"],target_platform="NEST",target_path="/home/chris/CAs/sep24/nestML8_models/targetdir",codegen_opts={"neuron_synapse_pairs":[{"neuron":"chris_iaf_cond_exp_neuron","synapse":"stp_synapse","post_ports":["post_spikes","chris_iaf_cond_exp_neuron"]}],"delay_variable":{"stp_synapse":"d"},"weight_variable":{"stp_synapse":"w"}})

 

 

Thanks for the support.

-Chris

 

From: Charl Linssen <nest-users@turingbirds.com>
Sent: 18 September 2024 14:16
To: users@nest-simulator.org
Subject: [NEST Users] Re: stp synapse nestml errror

 

Hi,

 

Thanks for the clarifications! This looks like it might be a naming issue. Because there is already a NEST built-in "iaf_cond_exp" neuron, we append a suffix to it (typically "_nestml", although you can change this in the call to generate_code()). Additionally, when you generate the code for a neuron in combination with a synapse, the model names will be appended to one another, resulting in somewhat awkwardly long names, like "iaf_psc_exp_neuron_nestml__with_stp_synapse_nestml" and "stp_synapse_nestml__with_iaf_psc_exp_neuron_nestml". You should be able to instantiate these after generating the code, more or less as follows:

 

        nest.Install("nestmlmodule")

        n = nest.Create("iaf_psc_exp_neuron_nestml__with_stp_synapse_nestml", 2)

        nest.Connect(n[0], n[1], syn_spec={"synapse_model": "stp_synapse_nestml__with_iaf_psc_exp_neuron_nestml"})

        nest.Simulate(100)

 

Hope this helps,

Kind regards,

Charl

 

On Wed, Sep 18, 2024, at 14:32, Chris Huyck wrote:

I run it from python.  After I import generate_target I use

generate_target(input_path=["/home/chris/CAs/sep24/nestML8_models/iaf_cond_exp_neuron.nestml","/home/chris/CAs/sep24/nestML8_models/stp_synapse.nestml"],target_platform="NEST",target_path="/home/chris/CAs/sep24/nestML8_models/targetdir",codegen_opts={"neuron_synapse_pairs":[{"neuron":"iaf_cond_exp_neuron","synapse":"stp_synapse","post_ports":["post_spikes","iaf_cond_exp_neuron"]}],"delay_variable":{"stp_synapse":"d"},"weight_variable":{"stp_synapse":"w"}})

 

(I’m obliged too.  Thanks for the quick response.)

-Chris

 

From: Charl Linssen <nest-users@turingbirds.com>
Sent: 18 September 2024 13:27
To: users@nest-simulator.org
Subject: [NEST Users] Re: stp synapse nestml errror

 

Hi Chris,

 

Thank you for the report! That shouldn't be the case; could you perhaps send your invocation to generate_code() so we can double-check the parameters? It works for me when I use the following:

 

       codegen_opts = {"neuron_synapse_pairs": [{"neuron": "iaf_psc_exp_neuron",

                                                     "synapse": "stp_synapse",

                                                     "post_ports": ["post_spikes"]}],

                           "delay_variable": {"stp_synapse": "d"},

                           "weight_variable": {"stp_synapse": "w"}}

       input_path = [os.path.join("models", "neurons", "iaf_psc_exp_neuron.nestml"),

                     os.path.join("models", "synapses", "stp_synapse.nestml")]

       generate_nest_target(input_path=input_path,

                            logging_level="DEBUG",

                            suffix="_nestml",

                            codegen_opts=codegen_opts)

 

I am looking into your PyNN issue and will try to report back on that as soon as I can.

 

Much obliged,

Charl

 

On Wed, Sep 18, 2024, at 11:46, Chris Huyck wrote:

I’m trying to make a Hebbian Short Term plasticity model.  I got the stdp_synapse working, and then tried to change that to stp.  I kept getting the error stp_synapse not found in pynest.  So, I just started from the static synapse, and modified that to get an stp_synapse that wasn’t Hebbian.  When I introduced the post_synaptic neuron into the model, the stp_synapse not found error returns.  Oddly, in the generated files (.h, .cpp, in stp_synapse__with_iaf_cond_exp_neuron and iaf_cond_exp_neuron__with_stp_synapse) there is a function for register stdp_synapse.  (If you want to duplicate this, just change the stdp_synapse model name to stp_synapse).

-Chris

_______________________________________________

NEST Users mailing list -- users@nest-simulator.org

To unsubscribe send an email to users-leave@nest-simulator.org

 

 

_______________________________________________

NEST Users mailing list -- users@nest-simulator.org

To unsubscribe send an email to users-leave@nest-simulator.org