Skip to content

Commit

Permalink
docs: Document reaction attributes constant_pH and gamma
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Feb 17, 2022
1 parent 00e55ec commit ab619bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 5 additions & 4 deletions doc/sphinx/advanced_methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,7 @@ In the *forward* reaction, the appropriate number of reactants (given by
:math:`\nu_i`) is removed from the system, and the concomitant number of
products is inserted into the system. In the *backward* reaction,
reactants and products exchange their roles. The acceptance probability
:math:`P^{\xi}` for move from state :math:`o` to :math:`n` reaction
:math:`P^{\xi}` for a move from state :math:`o` to :math:`n` in the reaction
ensemble is given by the criterion :cite:`smith94c`

.. math::
Expand All @@ -1718,10 +1718,11 @@ ensemble is given by the criterion :cite:`smith94c`
where :math:`\Delta E=E_\mathrm{new}-E_\mathrm{old}` is the change in potential energy,
:math:`V` is the simulation box volume,
and :math:`\beta=1/k_\mathrm{B}T`.
The extent of reaction, :math:`\xi=1` for the forward, and
:math:`\beta=1/k_\mathrm{B}T` is the Boltzmann factor, and
:math:`\xi` is the extent of reaction, with :math:`\xi=1` for the forward and
:math:`\xi=-1` for the backward direction.
The parameter :math:`\Gamma` proportional to the reaction constant. It is defined as

:math:`\Gamma` is proportional to the reaction constant. It is defined as

.. math::
Expand Down
9 changes: 7 additions & 2 deletions src/python/espressomd/reaction_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ def add_reaction(self, **kwargs):
Parameters
----------
gamma : :obj:`float`
Equilibrium constant of the reaction in simulation units, :math:`\\gamma` (see the User
guide, section 16.7.1. for the definition and further details).
Equilibrium constant :math:`\\Gamma` of the reaction in simulation
units (see section :ref:`Reaction Ensemble` for its definition).
reactant_types : list of :obj:`int`
List of particle types of reactants in the reaction.
reactant_coefficients : list of :obj:`int`
Expand Down Expand Up @@ -398,6 +398,11 @@ class ConstantpHEnsemble(ReactionAlgorithm):
are always assumed to be at index 0 of the lists passed to arguments
``reactant_types`` and ``product_types``.
Attributes
----------
constant_pH : :obj:`float`
Constant pH value.
"""
_so_name = "ReactionMethods::ConstantpHEnsemble"
_so_creation_policy = "LOCAL"
Expand Down

0 comments on commit ab619bd

Please sign in to comment.