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

Update docs 4.1 #3244

Merged
merged 7 commits into from
Oct 15, 2019
Merged
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
20 changes: 10 additions & 10 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ Interface changes
number generation. For the following individual methods a random
number seed has to be passed using the keyword argument ``seed``:

* [Langevin thermostat](http://espressomd.org/html/doc/espressomd.html?#espressomd.thermostat.Thermostat.set_langevin)
* [DPD thermostat](http://espressomd.org/html/doc/espressomd.html?#espressomd.thermostat.Thermostat.set_dpd)
* [LB Thermostat](http://espressomd.org/html/doc/espressomd.html?#espressomd.thermostat.Thermostat.set_lb)
* [Thermalized bond](http://espressomd.org/html/doc/espressomd.html?#espressomd.interactions.ThermalizedBond)
* [Wang-Landau reaction ensemble](http://espressomd.org/html/doc/espressomd.html?#module-espressomd.reaction_ensemble)
* [Constant pH ensemble](http://espressomd.org/html/doc/espressomd.html?#espressomd.reaction_ensemble.ConstantpHEnsemble)
* [Widom insertion method](http://espressomd.org/html/doc/espressomd.html?#espressomd.reaction_ensemble.WidomInsertion)
* [Langevin thermostat](http://espressomd.org/html/doc4.1.0/espressomd.html?#espressomd.thermostat.Thermostat.set_langevin)
* [DPD thermostat](http://espressomd.org/html/doc4.1.0/espressomd.html?#espressomd.thermostat.Thermostat.set_dpd)
* [LB Thermostat](http://espressomd.org/html/doc4.1.0/espressomd.html?#espressomd.thermostat.Thermostat.set_lb)
* [Thermalized bond](http://espressomd.org/html/doc4.1.0/espressomd.html?#espressomd.interactions.ThermalizedBond)
* [Wang-Landau reaction ensemble](http://espressomd.org/html/doc4.1.0/espressomd.html?#module-espressomd.reaction_ensemble)
* [Constant pH ensemble](http://espressomd.org/html/doc4.1.0/espressomd.html?#espressomd.reaction_ensemble.ConstantpHEnsemble)
* [Widom insertion method](http://espressomd.org/html/doc4.1.0/espressomd.html?#espressomd.reaction_ensemble.WidomInsertion)

* Changes in the lattice-Boltzmann (LB) interface:

Expand All @@ -143,13 +143,13 @@ Interface changes
parameter of the LB thermostat.

For more detailed information on how to set up a LB fluid and
thermostat, please see http://espressomd.org/html/doc/lb.html.
thermostat, please see http://espressomd.org/html/doc4.1.0/lb.html.

* The method for polymer creation has been replaced. Now
``espressomd.polymer.positions()`` can be used to obtain particle
positions for one or more polymer chains. Based on these positions,
polymers can be created. For an example please see
http://espressomd.org/html/doc/particles.html#setting-up-polymer-chains.
http://espressomd.org/html/doc4.1.0/particles.html#setting-up-polymer-chains.


Changed and removed functionality
Expand Down Expand Up @@ -368,7 +368,7 @@ Physics related corrections:
module did not get assigned a random velocity. This was not a problem if you were looking at observables
which do not depend on velocity.

* Particles which were created in the Reaction Ensemble module were assigned a random velocity which was not distributed according to the Maxwell-Boltzmann distribution. This was not a problem if you were looking at observables which do not depend on velocity. If you looked at velocity dependent observables but used a thermostat for thermalization before taking a sample you are also fine. (#2377).
* Particles which were created in the Reaction Ensemble module were assigned a random velocity which was not distributed according to the Maxwell-Boltzmann distribution. This was not a problem if you were looking at observables which do not depend on velocity. If you looked at velocity-dependent observables but used a thermostat for thermalization before taking a sample you are also fine. (#2377).

* Under some conditions, the torque on self-propelled particles
in a lattice-Boltzmann fluid was incorrect due to a sign error in the
Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx/analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,16 @@ The instantaneous pressure is calculated (if there are no electrostatic interact
by the volume averaged, direction averaged instantaneous virial pressure

.. math::
p = \frac{2E_{kinetic}}{Vf} + \frac{\sum_{j>i} {F_{ij}r_{ij}}}{3V}
p = \frac{2E_{\text{kinetic}}}{Vf} + \frac{\sum_{j>i} {F_{ij}r_{ij}}}{3V}
:label: eqptens

where :math:`f=3` is the number of translational degrees of freedom of
each particle, :math:`V` is the volume of the system,
:math:`E_{kinetic}` is the kinetic energy, :math:`F_{ij}` the force
:math:`E_{\text{kinetic}}` is the kinetic energy, :math:`F_{ij}` the force
between particles i and j, and :math:`r_{ij}` is the distance between
them. The kinetic energy divided by the degrees of freedom is

.. math:: \frac{2E_{kinetic}}{f} = \frac{1}{3}\sum_{i} {m_{i}v_{i}^{2}}.
.. math:: \frac{2E_{\text{kinetic}}}{f} = \frac{1}{3}\sum_{i} {m_{i}v_{i}^{2}}.

Note that Equation :eq:`eqptens` can only be applied to pair potentials and
central forces. Description of how contributions from other interactions
Expand Down
31 changes: 23 additions & 8 deletions doc/sphinx/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ Cython
At least version 0.23 is required.


.. _Installing Requirements on Ubuntu Linux:
.. _Installing requirements on Ubuntu Linux:

Installing Requirements on Ubuntu Linux
Installing requirements on Ubuntu Linux
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To make |es| run on 18.04 LTS, its dependencies can be installed with:
Expand Down Expand Up @@ -117,9 +117,24 @@ ROCm SDK to make use of GPU computation:

After installing the ROCm SDK, please reboot your computer.

.. _Installing Requirements on Mac OS X:

Installing Requirements on Mac OS X
.. _Installing requirements on other Linux distributions:

Installing requirements on other Linux distributions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please refer to the following Dockerfiles to find the minimum set of packages
required to compile |es| on other Linux distributions:

* `CentOS 7 <https://github.com/espressomd/docker/blob/master/docker/centos-python3/Dockerfile-7>`_
* `Fedora 30 <https://github.com/espressomd/docker/blob/master/docker/centos-python3/Dockerfile-next>`_
* `Debian 10 <https://github.com/espressomd/docker/blob/master/docker/debian-python3/Dockerfile-10>`_
* `OpenSUSE Leap 15.1 <https://github.com/espressomd/docker/blob/master/docker/opensuse/Dockerfile-15.1>`_


.. _Installing requirements on Mac OS X:

Installing requirements on Mac OS X
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Preparation
Expand Down Expand Up @@ -172,9 +187,9 @@ If you want to install Homebrew, use the following commands.
sudo xcodebuild -license accept
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installing Packages using MacPorts
Installing packages using MacPorts
""""""""""""""""""""""""""""""""""

Run the following commands:

.. code-block:: bash
Expand All @@ -191,7 +206,7 @@ Run the following commands:
sudo port select --set mpi openmpi-mp


Installing Packages using Homebrew
Installing packages using Homebrew
""""""""""""""""""""""""""""""""""

.. code-block:: bash
Expand Down Expand Up @@ -312,7 +327,7 @@ different configuration headers:
.. code-block:: c++

#define ELECTROSTATICS
#define LENNARD-JONES
#define LENNARD_JONES

* :file:`$builddir2/myconfig.hpp`:

Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/lb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Electrohydrodynamics
.. note::
This needs the feature ``LB_ELECTROHYDRODYNAMICS``.

If the feature is activated, the Lattice Boltzmann Code can be
If the feature is activated, the lattice-Boltzmann code can be
used to implicitly model surrounding salt ions in an external electric
field by having the charged particles create flow.

Expand Down
20 changes: 10 additions & 10 deletions doc/sphinx/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ would like to recompute the forces, despite the fact that they are
already correctly calculated. To this aim, the option ``recalc_forces`` can be used to
enforce force recalculation.

.. _Isotropic NPT thermostat integrator:
.. _Isotropic NPT integrator:

Isotropic NPT thermostat
Isotropic NPT integrator
------------------------

:py:func:`~espressomd.integrate.Integrator.set_isotropic_npt`
Expand All @@ -90,16 +90,16 @@ discussed here and only a brief summary is given in :ref:`Thermostats`.
To activate the NPT integrator, use :py:func:`~espressomd.integrate.Integrator.set_isotropic_npt`
with parameters:

* ``ext_pressure``: (float) The external pressure as float variable.
* ``piston``: (float) The mass of the applied piston as float variable.
* ``direction``: [int, int, int] Flags to enable/disable box dimensions to be subject to fluctuations. By default, all directions are enabled.
* ``ext_pressure``: The external pressure
* ``piston``: The mass of the applied piston
* ``direction``: Flags to enable/disable box dimensions to be subject to fluctuations. By default, all directions are enabled.

Additionally, a NPT thermostat has to be set by :py:func:`~espressomd.thermostat.Thermostat.set_npt()`
with parameters:

* ``kT``: (float) Thermal energy of the heat bath
* ``gamma0``: (float) Friction coefficient of the bath
* ``gammav``: (float) Artificial friction coefficient for the volume fluctuations.
* ``kT``: Thermal energy of the heat bath
* ``gamma0``: Friction coefficient of the bath
* ``gammav``: Artificial friction coefficient for the volume fluctuations.

A code snippet would look like::

Expand Down Expand Up @@ -129,7 +129,7 @@ where
Here :math:`\mathcal{P}` is the instantaneous pressure, :math:`d` the dimension of the system (number of flags set by ``direction``), :math:`f_{ij}` the short range interaction force between particles :math:`i` and :math:`j` and :math:`x_{ij}= x_j - x_i`.

In addition to this deterministic force, a friction :math:`-\frac{\gamma^V}{Q}\Pi(t)` and noise :math:`\sqrt{k_B T \gamma^V} \eta(t)` are added for the box
volume dynamics and the particle dynamics. . This introduces three new parameters:
volume dynamics and the particle dynamics. This introduces three new parameters:
The friction coefficient for the box :math:`\gamma^V` (parameter ``gammav``), the friction coefficient of the particles :math:`\gamma^0` (parameter ``gamma0``) and the thermal energy :math:`k_BT` (parameter ``kT``).
For a discussion of these terms and their discretisation, see :ref:`Langevin thermostat`, which uses the same approach, but only for particles.
As a result of box geometry changes, the particle positions and velocities have to be rescaled
Expand Down Expand Up @@ -172,7 +172,7 @@ Notes:

* The NPT algorithm is only tested for all 3 directions enabled for scaling. Usage of ``direction`` is considered an experimental feature.
* In step 4, only those coordinates are scaled for which ``direction`` is set.
* The for the instantaneous pressure the same limitations of applicability hold as described in :ref:`Pressure`.
* For the instantaneous pressure, the same limitations of applicability hold as described in :ref:`Pressure`.
* The particle forces :math:`F` include interactions as well as a friction and noise term analogous to the terms in the :ref:`Langevin thermostat`.
* The particle forces are only calculated in step 5 and then reused in step 1 of the next iteration. See :ref:`Velocity Verlet Algorithm` for the implications of that.

Expand Down
18 changes: 4 additions & 14 deletions doc/sphinx/system_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ at temperature :math:`T` and satisfies
In the |es| implementation of the Langevin thermostat,
the additional terms only enter in the force calculation.
This reduces the accuracy of the Velocity Verlet integrator
by one order in :math:`dt` because forces are now velocity dependent.
by one order in :math:`dt` because forces are now velocity-dependent.

The random process :math:`\eta(t)` is discretized by drawing an uncorrelated random number
:math:`\overline{\eta}` for each component of all the particle forces.
Expand Down Expand Up @@ -380,7 +380,7 @@ The friction coefficients and cutoff are controlled via the
see there.

The friction (dissipative) and noise (random) term are coupled via the
fluctuation- dissipation theorem. The friction term is a function of the
fluctuation-dissipation theorem. The friction term is a function of the
relative velocity of particle pairs. The DPD thermostat is better for
dynamics than the Langevin thermostat, since it mimics hydrodynamics in
the system.
Expand Down Expand Up @@ -412,17 +412,7 @@ Isotropic NPT thermostat
This feature allows to simulate an (on average) homogeneous and isotropic system in the NPT ensemble.
In order to use this feature, ``NPT`` has to be defined in the :file:`myconfig.hpp`.
Activate the NPT thermostat with the command :py:func:`~espressomd.thermostat.Thermostat.set_npt`
and set the following parameters:

* ``kT``: (float) Thermal energy of the heat bath
* ``gamma0``: (float) Friction coefficient of the bath
* ``gammav``: (float) Artificial friction coefficient for the volume fluctuations.

Also, setup the integrator for the NPT ensemble with :py:func:`~espressomd.integrate.Integrator.set_isotropic_npt`
and the parameters:

* ``ext_pressure``: (float) The external pressure.
* ``piston``: (float) The mass of the applied piston.
and setup the integrator for the NPT ensemble with :py:func:`~espressomd.integrate.Integrator.set_isotropic_npt`.

For example::

Expand All @@ -432,7 +422,7 @@ For example::
system.thermostat.set_npt(kT=1.0, gamma0=1.0, gammav=1.0)
system.integrator.set_isotropic_npt(ext_pressure=1.0, piston=1.0)

For an explanation of the algorithm involved, see :ref:`Isotropic NPT thermostat`
For an explanation of the algorithm involved, see :ref:`Isotropic NPT integrator`.

Be aware that this feature is neither properly examined for all systems
nor is it maintained regularly. If you use it and notice strange
Expand Down
4 changes: 3 additions & 1 deletion src/python/espressomd/integrate.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ cdef class Integrator:
piston : :obj:`float`
The mass of the applied piston.
direction : (3,) array_like of :obj:`int`, optional
Set the box geometry for non-cubic boxes.
Select which dimensions are allowed to fluctuate by assigning
them to ``1``. In the special case where all dimensions are set
to ``0`` (default), they are all set to ``1`` in the core.
cubic_box : :obj:`bool`, optional
If this optional parameter is true, a cubic box is assumed.

Expand Down
1 change: 0 additions & 1 deletion src/python/espressomd/thermostat.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ cdef class Thermostat:
Friction coefficient of the bath
gammav : :obj:`float`
Artificial friction coefficient for the volume fluctuations.
Mass of the artificial piston.

"""

Expand Down