Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add introductory text for models in documentation #2416

Merged
merged 28 commits into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
35f206c
update text, add table
jessica-mitchell Jun 20, 2022
37b0ecc
add text to model directory
jessica-mitchell Jun 21, 2022
82709bc
modify text, change link ref
jessica-mitchell Jun 21, 2022
165e833
remove superfluous exp
jessica-mitchell Jun 21, 2022
fc491eb
Apply suggestions from code review
jessica-mitchell Jul 4, 2022
36ff05b
add installation about nestml
jessica-mitchell Jul 4, 2022
2aec0c0
apply suggestions from review, add link to install nestml, fix up text
jessica-mitchell Jul 4, 2022
5efc6d7
apply suggestion from review - hint
jessica-mitchell Jul 4, 2022
53cf44b
Merge branch 'master' into add-intro-models
jessica-mitchell Aug 5, 2022
1def7e0
fix admonition
jessica-mitchell Aug 20, 2022
bf14add
Merge branch 'master' into add-intro-models
jessica-mitchell Aug 20, 2022
50c1be3
remove some table items, change index
jessica-mitchell Sep 19, 2022
5a69797
small fix
jessica-mitchell Sep 20, 2022
12da9f6
Merge branch 'master' into add-intro-models
jessica-mitchell Oct 14, 2022
cfefae5
link to glossary, reorganize so model abbrev in subsection, fix links…
jessica-mitchell Oct 17, 2022
9e5b40f
fixed installation nestml path, add examples
jessica-mitchell Oct 18, 2022
ed5df76
Apply suggestions from code review
jessica-mitchell Nov 11, 2022
07acc09
add note about nestml
jessica-mitchell Nov 16, 2022
ea59c75
Merge branch 'add-intro-models' of github.com:jessica-mitchell/nest-s…
jessica-mitchell Nov 16, 2022
6d3f745
rmeove spike response model
jessica-mitchell Nov 18, 2022
e3dcccb
Apply suggestions from code review
jessica-mitchell Dec 5, 2022
741d408
change wording model generation
jessica-mitchell Dec 5, 2022
43e44f9
Update doc/htmldoc/ref_material/glossary.rst
jessica-mitchell Dec 5, 2022
093016d
adjust text
jessica-mitchell Dec 5, 2022
f544796
Merge branch 'add-intro-models' of github.com:jessica-mitchell/nest-s…
jessica-mitchell Dec 5, 2022
4827d08
remove duplicate text
jessica-mitchell Dec 5, 2022
bcff8fd
Update doc/htmldoc/models/models-main.rst
jessica-mitchell Dec 6, 2022
cd4a49f
Merge branch 'master' into add-intro-models
jessica-mitchell Dec 6, 2022
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
12 changes: 9 additions & 3 deletions doc/extractor_userdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def UserDocExtractor(
try:
doc = rewrite_see_also(doc, filename, tags)
except ValueError as e:
log.warning("Failed to rebuild 'See also' section: %s", e)
log.info("Failed to rebuild 'See also' section: %s", e)
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
write_rst_files(doc, tags, outdir, outname)

log.info("%4d tags found:\n%s", len(tagdict), pformat(list(tagdict.keys())))
Expand Down Expand Up @@ -239,7 +239,7 @@ def rightcase(text):
secend = nexttitle.start()
original = doc[secstart:secend].strip().replace('\n', ' ')
if original:
log.warning("dropping manual 'see also' list in %s user docs: '%s'", filename, original)
log.info("dropping manual 'see also' list in %s user docs: '%s'", filename, original)
return (
doc[:secstart] +
"\n" + ", ".join([":doc:`{taglabel} <index_{tag}>`".format(tag=tag, taglabel=rightcase(tag))
Expand Down Expand Up @@ -344,11 +344,17 @@ def mkitem(t):

output = list()
if top:
page_title = "Model Directory"
page_title = "Model directory"
description = """
The models are organized and autogenerated by keywords (e.g., adaptive threshold,
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
conductance-based etc.). Models that contain a specific keyword will be listed under that word.
For more information on models, see our :ref:`intro to NEST models <modelsmain>`.
"""
if len(hierarchy.keys()) == 1:
page_title += ": " + ", ".join(current_tags)
output.append(page_title)
output.append(underlines[0]*len(page_title)+"\n")
output.append(description + "\n")
if len(hierarchy.keys()) != 1:
underlines = underlines[1:]

Expand Down
8 changes: 8 additions & 0 deletions doc/htmldoc/installation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ Install NEST

I'm a developer who wants to :ref:`do development in NEST <dev_install>`

|

Install NESTML + NEST
---------------------

|nestml| I'm a user who wants to :ref:`create or customize models <nestml>`
clinssen marked this conversation as resolved.
Show resolved Hide resolved

----


If installation didn't work, see the :ref:`troubleshooting section <troubleshooting>`.


Expand Down
27 changes: 27 additions & 0 deletions doc/htmldoc/installation/nestml.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _nestml:

Install NESTML
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
--------------


Docker
~~~~~~

NESTML is available as part of NEST's official :ref:`docker image <docker>`


pip
~~~

You can also install NESTML with pip.
Make sure it's installed in the same environment as NEST:


.. code-block:: bash

pip install --pre nestml

.. note::

Vist the :doc:`installation page for NESTML <nestml:installation>`

135 changes: 132 additions & 3 deletions doc/htmldoc/models/models-main.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,141 @@
.. _modelsmain:

Models in NEST
==============


What we mean by `models`
------------------------

Models in the context of NEST are C++ implementations of mathematical equations that describe the characteristics and behavior of
different types of neurons and synapses, based on the relevant peer-reviewed publications for the model.

We also use the term model in relation to network models (e.g., :ref:`microcircuit <toc_microcircuit>` and `multi-area model <https://inm-6.github.io/multi-area-model/>`_). These network models
can be considered a level of complexity higher than the neuron or synapse model. We do not focus on network models here.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

Find a model
------------

NEST provides a ton of models! Textbook standards like integrate-and-fire and Hodgkin-Huxley type models are available
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
alongside high quality implementations of models published by the neuroscience community.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
The models are organized and autogenerated by keywords (e.g., :doc:`adaptive threshold <index_adaptive threshold>`, :doc:`conductance-based <index_conductance-based>` etc) in our directory.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
Models that contain a specific keyword will be listed under that word.

.. seealso::

Discover :doc:`all the models in our directory <index>`.

Create and customize models with NESTML
---------------------------------------

Check out :doc:`NESTML <nestml:index>`, a domain-specific language for neuron and synapse models.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
NESTML enables fast prototyping of new models using an easy to understand, yet powerful syntax, and combines
this with high simulation performance through the automated generation of C++ code, suitable for use in NEST Simulator.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

NESTML combines:

* fast prototyping
* an easy to understand, yet powerful syntax;
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
* a flexible processing toolchain, written in Python;
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
* good simulation performance by means of code generation (C++ for NEST Simulator).
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

.. seealso::

:ref:`Install NESTML with NEST <nestml>`



Model naming
------------

Neuron models
~~~~~~~~~~~~~

Neuron model names in NEST combine abbreviations that describe the dynamics and synapse specifications for that model.
They may also include author's name of a model based on a specific paper.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

Example neuron model name
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

``iaf_cond_beta``

an implementation of a spiking neuron using integrate and fire dynamics with
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
conductance-based synapses. Incoming spike events induce a postsynaptic change
of conductance modelled by a beta function.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

Example neuron model name based on specific paper
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

``hh_cond_exp_traub``


a modified version of the Hodgkin Huxley neuron model based on Traub and Miles (1991)
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

Synapse models
~~~~~~~~~~~~~~

Synapse models include the word synapse as last word in the model name.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

Synapse models may begin with author name (e.g., ``clopath_synapsae``) or process (e.g., ``stdp_synase``).
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved

Devices
~~~~~~~

A device name should represent its physical counter point - like a multimeter is ``multimeter``. In general, the term ``recorder`` is used for devices
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved
that store or generate output. The term ``generator`` is used for devices that provide input into the simulation.
jessica-mitchell marked this conversation as resolved.
Show resolved Hide resolved


Table of model terms
~~~~~~~~~~~~~~~~~~~~~

The following table provides the NEST term used for a specific descriptor of a model along with commonly used alternative terms you may find in the literature.
Additional terms may be used to help differentiate models not included in the list below.
See the the :doc:`model directory <index>` to access the full description of each model.

clinssen marked this conversation as resolved.
Show resolved Hide resolved
.. list-table:: Common model terms
:widths: 50 25 25
:header-rows: 1

* - Model description
- NEST term
- Alternative terms
* - Integrate and fire
- iaf
- IF
* - Adaptive exponential integrate and fire
- aeif
- AdEx
* - Hodgkin Huxley
- hh
-
* - Generalized integrate and fire (Spike response model)
- gif
- SRM
* - Generalized leaky integrate and fire
- glif
-
* -
- amat / mat
-
* - Conductance based
- cond
- COBA
* - Current based
- psc
- CUBA
* - Hill Tononi
- ht
-
* - Point process
- pp
-
* - spike timing dependent plasticity
- stdp
-
* - Compartmental model
- cm
-
* - precise spike timing
- ps
-

* Discover :doc:`all the models in our directory <index>`

Need to create your own?

* Check out :doc:`NESTML <nestml:index>`, a domain-specific language supporting neuron and synapse models with a code generation backend that generates model code in C++ for NEST.
1 change: 0 additions & 1 deletion doc/htmldoc/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ div.sd-card-title.sd-font-weight-bold.sd-d-flex-row.docutils a.reference.interna
}

.md-typeset .admonition {
background-color: var(--nest-blue);
border-left: .2rem solid var(--nest-blue);
border-radius: 5px;
}
Expand Down
Binary file added doc/htmldoc/static/img/nestml-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions doc/htmldoc/understand_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Here you can dive into various topics about NEST.

.. grid-item-card:: |math| Models in NEST
:class-title: sd-d-flex-row sd-align-minor-center
:link: models_contents
:link: modelsmain
:link-type: ref

.. grid:: 1 1 2 3
Expand Down Expand Up @@ -102,7 +102,7 @@ Here you can dive into various topics about NEST.
Synapses and connections <synapses/index>
Devices <devices/index>
Spatially-structured networks <networks/spatially_structured_networks>
NEST models <models/index>
NEST models <models/models-main>
Simulation behavior <nest_behavior/running_simulations>
Randomness in NEST <nest_behavior/random_numbers>
Built-in timers <nest_behavior/built-in_timers>
Expand Down