Hi!
First of all, I agree with everything that Charl said.
We are currently in the process of updating, extending and cleaning up our developer level
documentation and I'm afraid it does not currently live up to our standards. That
said, I have attached a tutorial talk I gave some years ago on the topic of developing
neuron and synapse models by hand. Although some of the functions have been renamed since,
it should still give you a good overview of the concepts and most important API functions.
Moreover, you should be able to run `make doc` or `make fulldoc` in the NEST build
directory to get the Doxygen documentation built. That will contain more documentation
about the classes you are asking about.
Cheers,
Jochen!
On 11.12.20 10:36, Cristiano Alessandro wrote:
Dear Charl,
Thank you so much for your kind reply. Could you elaborate a little more regarding the
fact that incoming events (like spikes) are handled in the handle() method, and time
stepping is handled in update()? When are these functions called and at what frequency? My
overall understanding was that spikes are buffered in a RingBuffer, and that the function
update() runs at the end of each time step, when the buffer is full (so that I can read
all the events in the buffer)? What about the handle function?
Would it be possible to know the methods and attributes of the following classes?
nest::RingBuffer
nest::SpikeEvent
nest::Time
Thank you again in advance for your help
Best
Cristiano
On Fri, Dec 11, 2020 at 10:25 AM Charl Linssen
<nest-users@turingbirds.com<mailto:nest-users@turingbirds.com>> wrote:
Hi Cristiano,
Thanks for writing in. Of course, in the ideal case, you would not have to modify the
generated C++ code as everything should be already contained within the NESTML model
itself. So if there's a particular way in which NESTML is incomplete or does not allow
you to express something, please also get back to us about this, we'd be glad to
help.
Of course in practice, it might very well occur during development that you want to modify
the generated code just a little, for example to insert some printf() calls. The way to do
this depends a little on how you are using NESTML. If you are using the API, with
to_nest() and install_nest() and finally nest.Install(), the trick is to skip the
install_nest() step, and run the compilation by hand. In the directory where the C++ code
is generated, run "cmake
-Dwith-nest=/path/to/your/nest-sim/install/bin/nest-config" and then "make
install". The module can then be loaded again using nest.Install() in your Python
script.
To prevent from continuously having to modify generated code, you could also potentially
insert your changes into the templates. These you can find in
pynestml/codegeneration/resources_nest/{NeuronHeader.jinja2, NeuronClass.jinja2}.
As for how the code works, I'm not sure if there's an extended description
anywhere. The gist of it is that incoming events (like spikes) are handled in the handle()
method, and time stepping is handled in update(). Hopefully the rest should speak mostly
for itself, please do not hesitate to get in touch if you have any specific questions or
run into any issues.
Cheers, kind regards,
Charl
On Thu, Dec 10, 2020, at 18:44, Cristiano Alessandro wrote:
Dear all,
I am new to developing NEST neuron models. I am aware I should use NEST-ML and I started
that way, but I now need to modify the (successfully) generated C++ code. To do so, I
would like to understand the details of the C++ implementation, including the overall
logic of the class NEST-ML created (what is the functionality of the methods and
attributes). Where can I find documentation about this? I would also like to take a look
at the description of the NEST C++ developers library. I could not find these aspects in
the Nest Developer Space. Thank you in advance.
Best
Cristiano
_______________________________________________
NEST Users mailing list --
users@nest-simulator.org<mailto:users@nest-simulator.org>
To unsubscribe send an email to
users-leave@nest-simulator.org<mailto:users-leave@nest-simulator.org>
_______________________________________________
NEST Users mailing list --
users@nest-simulator.org<mailto:users@nest-simulator.org>
To unsubscribe send an email to
users-leave@nest-simulator.org<mailto:users-leave@nest-simulator.org>
_______________________________________________
NEST Users mailing list --
users@nest-simulator.org<mailto:users@nest-simulator.org>
To unsubscribe send an email to
users-leave@nest-simulator.org<mailto:users-leave@nest-simulator.org>
--
Dr. Jochen Martin Eppler
Phone: +49(2461)61-96653
----------------------------------
Simulation Laboratory Neuroscience
Jülich Supercomputing Centre
Institute for Advanced Simulation
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Volker Rieke
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------