Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions doc/running/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,38 +172,6 @@ The following default values are used, corresponding to the command line default

For a detailed description of all the arguments of ``generate_target()``, see :func:`pynestml.frontend.pynestml_frontend.generate_target`.

A typical script for the NEST Simulator target could look like the following. First, import the function:

.. code-block:: python

from pynestml.frontend.pynestml_frontend import generate_target

generate_target(input_path="/home/nest/work/pynestml/models",
target_platform="NEST",
target_path="/tmp/nestml_target")

We can also use a shorthand function for each supported target platform (here, NEST):

.. code-block:: python

from pynestml.frontend.pynestml_frontend import generate_nest_target

generate_nest_target(input_path="/home/nest/work/pynestml/models",
target_path="/tmp/nestml_target")

To dynamically load a module with ``module_name`` equal to ``nestmlmodule`` (the default) in PyNEST can be done as follows:

.. code-block:: python

nest.Install("nestmlmodule")

The NESTML models are then available for instantiation, for example as:

.. code-block:: python

pre, post = nest.Create("neuron_nestml", 2)
nest.Connect(pre, post, "one_to_one", syn_spec={"synapse_model": "synapse_nestml"})


Running NESTML from the command line
------------------------------------
Expand Down Expand Up @@ -245,17 +213,3 @@ This will generate, compile, build, and install the code for a set of specified
* - ``--codegen_opts``
- (Optional) Path to a JSON file containing additional options for the target platform code generator. A list of available options can be found under the section "Code generation options" for your intended target platform on the page :ref:`Running NESTML`.

NEST Desktop target
~~~~~~~~~~~~~~~~~~~

The aim of the NEST Desktop as target is to generate ``json`` files for the neuron models. The resulting file contains details about the state variables, parameters and their initial values defined in their respective ``.nestml`` files. The ``json`` files are used to load them in the NEST Desktop user interface.

For example, for the neuron model ``iaf_psc_exp``, the ``json`` file will be generated by running the ``generate_target`` function with ``target_platform`` option set to ``NEST_DESKTOP``.

.. code-block:: python

from pynestml.frontend.pynestml_frontend import generate_target

generate_target(input_path="/home/nest/work/pynestml/models/neurons/iaf_psc_exp.nestml",
target_platform="NEST_DESKTOP",
target_path="/tmp/nestml_target")
36 changes: 36 additions & 0 deletions doc/running/running_nest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,42 @@ After NESTML completes, the NEST extension module (by default called ``"nestmlmo
Several code generator options are available; for an overview see :class:`pynestml.codegeneration.nest_code_generator.NESTCodeGenerator`.


NEST workflow example
---------------------

A typical script for the NEST Simulator target could look like the following. First, import the function:

.. code-block:: python

from pynestml.frontend.pynestml_frontend import generate_target

generate_target(input_path="/home/nest/work/pynestml/models",
target_platform="NEST",
target_path="/tmp/nestml_target")

We can also use a shorthand function for each supported target platform (here, NEST):

.. code-block:: python

from pynestml.frontend.pynestml_frontend import generate_nest_target

generate_nest_target(input_path="/home/nest/work/pynestml/models",
target_path="/tmp/nestml_target")

To dynamically load a module with ``module_name`` equal to ``nestmlmodule`` (the default) in PyNEST can be done as follows:

.. code-block:: python

nest.Install("nestmlmodule")

The NESTML models are then available for instantiation, for example as:

.. code-block:: python

pre, post = nest.Create("neuron_nestml", 2)
nest.Connect(pre, post, "one_to_one", syn_spec={"synapse_model": "synapse_nestml"})


Simulation loop
---------------

Expand Down
Loading