Dear Sock Ching,

When you say "I would like to save the network", could you elaborate on what exact part of the state you want to save and recall? For instance, in case of simulating plasticity, all the weights can be (re)set by calling SetStatus() on each connection object. The same goes for neuronal state variables. There are a few things that cannot be reset at the time of writing, such at the random number generators, but this is only an issue if you try to reproduce the same run *exactly*, multiple times in a row. The biggest issue might be that spike buffers (spikes in transit) cannot be reset. Potentially, you could work around this by allowing a small "startup transient", i.e. ignoring whatever your network produces in the first few hundred or so milliseconds after starting simulation. If this startup transient is causing you trouble, however, please feel invited to submit a feature request on our GitHub repository for spike buffer reset functionality. (Please provide as much technical detail as possible.)

There is already some prior discussion on this topic at, where it was decided that just having a global "ResetNetwork()" function was not feasible, because it is not clear for the general case what this function would do. So in case you open a new GitHub issue, please try to specify as precisely as possible what parts of your network state need to be (re)set.

Hope this helps, please don't hesitate to share your further experiences.

Best regards,

On Mon, Aug 3, 2020, at 19:19, LOW, SOCK CHING wrote:

I am new to pynest and am using it to implement a liquid state machine. It works marvelously for generating the network. My workflow is as follows:
- Initialise kernel
- Get stimulation episodes
- Create neurons (including spike generators)
- Connect neurons
- nest.Simulate()
- nest.GetStatus(recording_neurons) for readout at relevant timepoints

I would like to save the network so I can run nest.Simulate() on other episodes in a real-time application, is there a straight-forward way to do so?

I have tried pickling

conn = nest.GetConnections()

but to my knowledge that does not include a lot of details about the connection, like the weight. It also does not return where there is no connections, which means simply using


prior to nest.Simulate() will not work to reproduce the previously generated network even if I initialise with all the same variables. I have found the functions GetNetwork() and GetNodes() but I'm not sure how I can use them, or if they are even useful for what I need.

Sock Ching
NEST Users mailing list --
To unsubscribe send an email to