diff --git a/doc/running/index.rst b/doc/running/index.rst index 9d5c50305..70a35b302 100644 --- a/doc/running/index.rst +++ b/doc/running/index.rst @@ -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 ------------------------------------ @@ -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") diff --git a/doc/running/running_nest.rst b/doc/running/running_nest.rst index 2edbee3d3..f5b083a5f 100644 --- a/doc/running/running_nest.rst +++ b/doc/running/running_nest.rst @@ -12,6 +12,44 @@ 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"}) + +For more details on how to generate code for synaptic plasticity models, please refer to the section :ref:`Generating code for plastic synapses `. + + Simulation loop ---------------