Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoming0625 committed Jul 9, 2024
1 parent f6afb3f commit 25e25a7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
23 changes: 21 additions & 2 deletions dendritex/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,22 @@ def add_elem(self, *elems, **elements):


class IonChannel(DendriticDynamics, TreeNode):
"""
The base class for ion channel modeling.
:py:class:`IonChannel` can be used to model the dynamics of an ion (instance of :py:class:`Ion`), or
a mixture of ions (instance of :py:class:`MixIons`), or a channel (instance of :py:class:`Channel`).
Particularly, an implementation of a :py:class:`IonChannel` should implement the following methods:
- :py:meth:`current`: Calculate the current of the ion channel.
- :py:meth:`before_integral`: Calculate the state variables before the integral.
- :py:meth:`compute_derivative`: Calculate the derivative of the state variables.
- :py:meth:`after_integral`: Calculate the state variables after the integral.
- :py:meth:`init_state`: Initialize the state variables.
- :py:meth:`reset_state`: Reset the state variables.
"""
__module__ = 'dentritex'

def current(self, *args, **kwargs):
Expand Down Expand Up @@ -315,7 +331,8 @@ class IonInfo(NamedTuple):


class Ion(IonChannel, Container):
"""The brainpy_object calcium dynamics.
"""
The base class for modeling the Ion dynamics.
Args:
size: The size of the simulation target.
Expand Down Expand Up @@ -577,5 +594,7 @@ def mix_ions(*ions) -> MixIons:


class Channel(IonChannel):
"""Base class for ion channels."""
"""
The base class for modeling channel dynamics.
"""
__module__ = 'dentritex'
15 changes: 15 additions & 0 deletions docs/apis/dendritex.neurons.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
``dendritex.neurons`` module
============================

.. currentmodule:: dendritex.neurons
.. automodule:: dendritex.neurons


.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

SingleCompartment
MultiCompartment

16 changes: 3 additions & 13 deletions docs/apis/dendritex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,22 @@ Base Classes
:template: classtemplate.rst

HHTypedNeuron
State4Integral
IonChannel
Ion
IonInfo
MixIons
Channel


Helper Classes
--------------

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

IonInfo


Integrator Methods
Integration Methods
--------------------

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

State4Integral
euler_step
rk2_step
rk3_step
Expand Down

0 comments on commit 25e25a7

Please sign in to comment.