Skip to content

Commit eea75a3

Browse files
authored
Improve documentation (#5255)
Description of changes: - rewrite changelog based on Keep a Changelog v1.1.0 - move `NotesForTutors.md` to `Readme.md` to make the information more discoverable - add citations and update user guide
1 parent 2de58d7 commit eea75a3

File tree

26 files changed

+623
-1240
lines changed

26 files changed

+623
-1240
lines changed

NEWS renamed to CHANGELOG.md

Lines changed: 465 additions & 1146 deletions
Large diffs are not rendered by default.

ChangeLog

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/bibliography.bib

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,23 @@ @Article{banchio03a
180180
doi = {10.1063/1.1571819},
181181
}
182182

183+
@InProceedings{batatia22a,
184+
author = {Batatia, Ilyes and Kov{\'a}cs, D{\'a}vid P{\'e}ter and Simm, Gregor N. C. and Ortner, Christoph and Cs{\'a}nyi, G{\'a}bor},
185+
title = {{MACE}: higher order equivariant message passing neural networks for fast and accurate force fields},
186+
booktitle = {Advances in Neural Information Processing Systems},
187+
editor = {Koyejo, Sanmi and Mohamed, Shakir and Agarwal, Alekh and Belgrave, Danielle and Cho, Kyunghyun and Oh, Alice},
188+
volume = {35},
189+
year = {2022},
190+
pages = {11423--11436},
191+
eventtitle = {36\textsuperscript{th} Conference on Neural Information Processing Systems ({NeurIPS} 2022)},
192+
eventdate = {2022-11-28/2022-12-09},
193+
venue = {New Orleans Convention Center, Louisiana, USA},
194+
isbn = {978-1-7138-7108-8},
195+
url = {https://proceedings.neurips.cc/paper_files/paper/2022/file/4a36c3c51af11ed9f34615b81edb5bbc-Paper-Conference.pdf},
196+
publisher = {Curran Associates, Inc.},
197+
address={Red Hook, New York, USA},
198+
}
199+
183200
@Article{batatia25a,
184201
author = {Batatia, Ilyes and Benner, Philipp and Chiang, Yuan and Elena, Alin M. and Kov{\'a}cs, D{\'a}vid P. and Riebesell, Janosh and Advincula, Xavier R. and Asta, Mark and Avaylon, Matthew and Baldwin, William J. and Berger, Fabian and Bernstein, Noam and Bhowmik, Arghya and Bigi, Filippo and Blau, Samuel M. and C\{u a}rare, Vlad and Ceriotti, Michele and Chong, Sanggyu and Darby, James P. and De, Sandip and Della Pia, Flaviano and Deringer, Volker L. and Elijo{\v s}ius, Rokas and El-Machachi, Zakariya and Fako, Edvin and Falcioni, Fabio and Ferrari, Andrea C. and Gardner, John L. A. and Gawkowski, Miko{\l}aj J. and Genreith-Schriever, Annalena and George, Janine and Goodall, Rhys E. A. and Grandel, Jonas and Grey, Clare P. and Grigorev, Petr and Han, Shuang and Handley, Will and Heenen, Hendrik H. and Hermansson, Kersti and Ho, Cheuk Hin and Hofmann, Stephan and Holm, Christian and Jaafar, Jad and Jakob, Konstantin S. and Jung, Hyunwook and Kapil, Venkat and Kaplan, Aaron D. and Karimitari, Nima and Kermode, James R. and Kourtis, Panagiotis and Kroupa, Namu and Kullgren, Jolla and Kuner, Matthew C. and Kuryla, Domantas and Liepuoniute, Guoda and Lin, Chen and Margraf, Johannes T. and Magd\{u a}u, Ioan-Bogdan and Michaelides, Angelos and Moore, J. Harry and Naik, Aakash A. and Niblett, Samuel P. and Norwood, Sam Walton and O'Neill, Niamh and Ortner, Christoph and Persson, Kristin A. and Reuter, Karsten and Rosen, Andrew S. and Rosset, Louise A. M. and Schaaf, Lars L. and Schran, Christoph and Shi, Benjamin X. and Sivonxay, Eric and Stenczel, Tam{\'a}s K. and Sutton, Christopher and Svahn, Viktor and Swinburne, Thomas D. and Tilly, Jules and van der Oord, Cas and Vargas, Santiago and Varga-Umbrich, Eszter and Vegge, Tejs and Vondr{\'a}k, Martin and Wang, Yangshuai and Witt, William C. and Wolf, Thomas and Zills, Fabian and Cs{\'a}nyi, G{\'a}bor},
185202
title = {A foundation model for atomistic materials chemistry},
@@ -1484,6 +1501,21 @@ @Article{wang01a
14841501
doi = {10.1063/1.1398588},
14851502
}
14861503

1504+
@InCollection{weeber24a,
1505+
author = {Weeber, Rudolf and Grad, Jean-No\"{e}l and Beyer, David and Blanco, Pablo M. and Kreissl, Patrick and Reinauer, Alexander and Tischler, Ingo and Ko{\v{s}}ovan, Peter and Holm, Christian},
1506+
title = {{ESPResSo}, a Versatile Open-Source Software Package for Simulating Soft Matter Systems},
1507+
booktitle = {Comprehensive Computational Chemistry},
1508+
year = {2024},
1509+
editor = {Y{\'a}{\~n}ez, Manuel and Boyd, Russell J.},
1510+
edition = {1st},
1511+
volume = {3},
1512+
publisher = {Elsevier},
1513+
isbn = {978-0-12-823256-9},
1514+
pages = {578--601},
1515+
doi = {10.1016/B978-0-12-821978-2.00103-3},
1516+
address = {Oxford},
1517+
}
1518+
14871519
@Article{weik19a,
14881520
author = {Weik, Florian and Weeber, Rudolf and Szuttor, Kai and Breitsprecher, Konrad and de Graaf, Joost and Kuron, Michael and Landsgesell, Jonas and Menke, Henri and Sean, David and Holm, Christian},
14891521
title = {{ESPResSo} 4.0 -- An Extensible Software Package for Simulating Soft Matter Systems},

doc/sphinx/integration.rst

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Velocity Verlet algorithm
3535
^^^^^^^^^^^^^^^^^^^^^^^^^
3636

3737
The velocity Verlet integrator is active by default.
38-
If you used a different integrator and want to switch back, use
38+
If you used a different integrator and want to switch back, use
3939
:meth:`system.integrator.set_vv() <espressomd.integrate.IntegratorHandle.set_vv>`.
4040

4141
The Velocity Verlet algorithm is used for equations of motion of the general form
@@ -75,22 +75,25 @@ Read, e.g., :math:`\vec{x}` as the position of all particles.
7575

7676
Note that this implementation of the velocity Verlet algorithm reuses
7777
forces in step 1. That is, they are computed once in step 3,
78-
but used twice, in step 4 and in step 1 of the next iteration.
79-
The first time the integrator is called, there are no forces present yet.
78+
but used twice, in step 4 and in step 1 of the next iteration.
79+
The first time the integrator is called, there are no forces present yet.
8080
Therefore, |es| has
8181
to compute them before the first time step. That has two consequences:
82-
first, if thermostats are active, random forces are computed twice during
82+
first, if thermostats are active, random forces are computed twice during
8383
the first time step, resulting in a narrower distribution of the random forces.
8484
Second,
8585
coupling forces of, e.g., the lattice-Boltzmann fluid cannot be computed
8686
and are therefore lacking in the first half time step. In order to
8787
minimize these effects, |es| has a quite conservative heuristics to decide
88-
whether a change makes it necessary to recompute forces before the first time step.
89-
Therefore, calling
90-
:meth:`espressomd.integrate.Integrator.run` 100 times with ``steps=1`` is equivalent to calling it once with ``steps=100``.
91-
92-
When resuming a simulation, you can either use the forces that are stored on the particles by using the additional parameter ``reuse_forces = True``, or recalculate the forces again from the current configuration ``reuse_forces = False``.
93-
Setting ``reuse_forces = True`` is useful when restarting a simulation from a checkpoint to obtain exactlty the same result as if the integration had continued without interruption.
88+
whether a change makes it necessary to recompute forces before the first time step.
89+
Therefore, calling :meth:`espressomd.integrate.Integrator.run` 100 times
90+
with ``steps=1`` is equivalent to calling it once with ``steps=100``.
91+
92+
When resuming a simulation, you can either use the forces that are stored
93+
on the particles by using the additional parameter ``reuse_forces = True``,
94+
or recalculate the forces again from the current configuration ``reuse_forces = False``.
95+
Setting ``reuse_forces = True`` is useful when restarting a simulation from a checkpoint
96+
to obtain exactly the same result as if the integration had continued without interruption.
9497
You can also use ``recalc_forces = True`` to recalculate forces even if they are already correctly computed.
9598

9699
.. _Isotropic NpT integrator:
@@ -121,7 +124,7 @@ with parameters:
121124
* ``gamma0``: Friction coefficient of the bath
122125
* ``gammav``: Artificial friction coefficient for the volume fluctuations.
123126

124-
The physical meaning of these parameters and the equations of motion are described below.
127+
The physical meaning of these parameters and the equations of motion are described below.
125128
We recommend reading :ref:`Langevin thermostat` before continuing.
126129

127130
The relaxation towards a desired pressure :math:`P` (parameter ``ext_pressure``)
@@ -137,7 +140,7 @@ associated with the volume is postulated. This results in a "force" on the box s
137140

138141
where
139142

140-
.. math:: \mathcal{P} = \frac{1}{Vd} \sum_{i,j} \vec{f}_{ij}\vec{x}_{ij} + \frac{1}{Vd} \sum_i m_i v_i^2 ,
143+
.. math:: \mathcal{P} = \frac{1}{Vd} \sum_{i,j} \vec{f}_{ij}\vec{x}_{ij} + \frac{1}{Vd} \sum_i m_i v_i^2,
141144

142145
is the instantaneous pressure, with :math:`d` the dimension
143146
of the system (number of flags set by ``direction``), :math:`\vec{f}_{ij}` the
@@ -319,8 +322,8 @@ A code snippet could look like::
319322

320323
max_steps = 20 # maximal number of steps
321324
system.integrator.set_steepest_descent(
322-
f_max=0, gamma=0.1, max_displacement=0.1)
323-
system.integrator.run(max_steps)
325+
f_max=0., gamma=0.1, max_displacement=0.1)
326+
system.integrator.run(max_steps)
324327
system.integrator.set_vv() # to switch back to velocity Verlet
325328

326329
The 'equation of motion' in discretised form reads
@@ -335,7 +338,7 @@ This feature is used to propagate each particle by a small distance parallel to
335338
When only conservative forces for which a potential exists are in use, this is equivalent to a steepest descent energy minimization.
336339
A common application is removing overlap between randomly placed particles.
337340
Please note that the behavior is undefined if a thermostat is activated,
338-
in which case the integrator will generate an error.
341+
in which case the integrator will generate an error.
339342

340343
Steepest descent is applied
341344
while the maximal force/torque is bigger than ``f_max``, or for at most ``max_steps`` times. The energy
@@ -357,12 +360,11 @@ The ``f_max`` parameter can be set to zero to prevent the integrator from
357360
halting when a specific force/torque is reached. The integration can then
358361
be carried out in a loop with a custom convergence criterion::
359362

360-
min_dist_target = 1 # minimum distance that all particles should have
361-
362-
system.integrator.set_steepest_descent(f_max=0, gamma=10,
363+
min_dist_target = 1. # minimum distance that all particles should have
364+
system.integrator.set_steepest_descent(f_max=0., gamma=10.,
363365
max_displacement= 0.01)
364366
# gradient descent until particles are separated by at least min_dist_target
365-
min_dist = 0.0
367+
min_dist = 0.
366368
while min_dist < min_dist_target:
367369
min_dist = system.analysis.min_dist()
368370
system.integrator.run(10)
@@ -389,7 +391,7 @@ The correct forces need to be re-calculated after running the integration::
389391
p1 = system.part.add(pos=[0, 0, 0], type=1)
390392
p2 = system.part.add(pos=[0, 0, 0.1], type=1)
391393
p2.vs_auto_relate_to(p1)
392-
system.integrator.set_steepest_descent(f_max=800, gamma=1.0, max_displacement=0.01)
394+
system.integrator.set_steepest_descent(f_max=800., gamma=1., max_displacement=0.01)
393395
while convergence_criterion(system.part.all().f):
394396
system.integrator.run(10)
395397
system.integrator.run(0, recalc_forces=True) # re-calculate forces from virtual sites
@@ -398,7 +400,7 @@ The correct forces need to be re-calculated after running the integration::
398400
The algorithm can also be used for energy minimization::
399401

400402
# minimize until energy difference < 5% or energy < 1e-3
401-
system.integrator.set_steepest_descent(f_max=0, gamma=1.0, max_displacement=0.01)
403+
system.integrator.set_steepest_descent(f_max=0., gamma=1., max_displacement=0.01)
402404
relative_energy_change = float('inf')
403405
relative_energy_change_threshold = 0.05
404406
energy_threshold = 1e-3
@@ -441,7 +443,7 @@ The particle trajectories are governed by
441443

442444
.. math:: \dot{\vec{x}}_i(t) = \gamma^{-1} \vec{F}_i(\{\vec{x}_j\}, \{\vec{v}_j\}, t) + \sqrt{2 k_B T \gamma^{-1}} \vec{\eta}_i(t),
443445

444-
where :math:`\vec{F}_i` are all deterministic forces from interactions and :math:`\vec{\eta}_i`
446+
where :math:`\vec{F}_i` are all deterministic forces from interactions and :math:`\vec{\eta}_i`
445447
are random forces with zero mean and unit variance.
446448
This equation of motion follows from Langevin's equation of motion (see :ref:`Langevin thermostat`)
447449
by setting the mass of the particle to zero.
@@ -452,15 +454,15 @@ and reads
452454
.. math:: \vec{x}(t+ dt) = \gamma^{-1} \vec{F}(\vec{x}(t), \vec{v}(t), t) dt + \sqrt{2 k_B T \gamma^{-1} dt} \vec{\eta}_*(t)
453455

454456
where :math:`\vec{\eta_*}` are pseudo-random numbers with zero mean and unit variance (particle indices are omitted for clarity).
455-
Velocities are obtained directly from
457+
Velocities are obtained directly from
456458

457459
.. math:: \vec{v}(t) = \gamma^{-1} \vec{F} + \sqrt{2 k_B T \gamma^{-1} dt^{-1}} \vec{\eta}_{*}(t)
458460

459461
Be aware that the velocity contains random terms and is therefore not continuous in time.
460462

461463
Rotational motion is implemented analogously.
462464
Note: the rotational Brownian dynamics implementation is only compatible with particles which have
463-
the isotropic moment of inertia tensor.
465+
the isotropic moment of inertia tensor.
464466
Otherwise, the viscous terminal angular velocity
465467
is not defined, i.e., it has no constant direction.
466468

@@ -549,7 +551,7 @@ subsections.
549551

550552
You may combine different thermostats by turning them on sequentially.
551553
Not all combinations of thermostats are sensible, though, and some
552-
thermostats only work with specific integrators.
554+
thermostats only work with specific integrators.
553555
The list of possible combinations of integrators and thermostats is hardcoded and automatically
554556
checked against at the start of integration.
555557
Note that there is only one temperature for all thermostats.
@@ -595,23 +597,22 @@ The friction term accounts for dissipation in a surrounding fluid whereas
595597
the random force mimics collisions of the particle with solvent molecules
596598
at temperature :math:`T` and satisfies
597599

598-
.. math:: <\vec{\eta}(t)> = \vec{0} , <\eta^\alpha_i(t)\eta^\beta_j(t')> = \delta_{\alpha\beta} \delta_{ij}\delta(t-t')
600+
.. math:: \left\langle\vec{\eta}(t)\right\rangle = \vec{0} , \left\langle\eta^\alpha_i(t)\eta^\beta_j(t')\right\rangle = \delta_{\alpha\beta} \delta_{ij}\delta(t-t')
599601

600-
(:math:`<\cdot>` denotes the ensemble average and :math:`\alpha,\beta` are spatial coordinates).
602+
(:math:`\langle\cdot\rangle` denotes the ensemble average and :math:`\alpha,\beta` are spatial coordinates).
601603

602604
In the |es| implementation of the Langevin thermostat,
603605
the additional terms only enter in the force calculation.
604606
The general form of the equation of motion is still the same as
605-
for Newton's equations, therefore the velocity Verlet integrator is
606-
used.
607+
for Newton's equations, therefore the velocity Verlet integrator is used.
607608
The accuracy of the velocity Verlet integrator is reduced by
608609
one order in :math:`dt` because forces are now velocity-dependent.
609610

610611
The random process :math:`\vec{\eta}(t)` is discretized by drawing an uncorrelated random numbers
611612
:math:`\vec{\eta_*}` for each particle.
612613
The distribution of :math:`{\vec{\eta}_*}` is uniform and satisfies
613614

614-
.. math:: <\vec{\eta}_*> = \vec{0} ,\, <\eta_*^\alpha \eta_*^\beta> = \frac{\delta_{\alpha,\beta}}{dt},
615+
.. math:: \left\langle\vec{\eta}_*\right\rangle = \vec{0} ,\, \left\langle\eta_*^\alpha \eta_*^\beta\right\rangle = \frac{\delta_{\alpha,\beta}}{dt},
615616

616617
approximating the delta-correlation of the continuous equation.
617618

@@ -717,7 +718,7 @@ The :ref:`Lattice-Boltzmann` thermostat acts similar to the :ref:`Langevin therm
717718
.. math:: m_i \dot{\vec{v}}_i(t) = \vec{f}_i(\{\vec{x}_j\},\vec{v}_i,t) - \gamma (\vec{v}_i(t)-\vec{u}(\vec{x}_i(t),t)) + \sqrt{2\gamma k_B T} \vec{\eta}_i(t).
718719

719720
where :math:`\vec{u}(\vec{x},t)` is the fluid velocity at position :math:`\vec{x}` and time :math:`t`.
720-
Different from the Langevin thermostat, here, the friction is calculated with respect to a moving fluid.
721+
Different from the Langevin thermostat, here, the friction is calculated with respect to a moving fluid.
721722

722723
An LB fluid must be used to provide the fluid velocity, while also including hydrodynamic interactions between particles.
723724
The LB thermostat expects an instance of :class:`espressomd.lb.LBFluid`.
@@ -750,7 +751,7 @@ according to the given temperature and the relaxation parameters. All
750751
fluctuations can be switched off by setting the temperature to zero.
751752
The deterministic part of the hydrodynamic interaction is then still active.
752753

753-
If the LB thermostat is active, no other thermostatting mechanism is necessary.
754+
If the LB thermostat is active, no other thermostatting mechanism is necessary.
754755
Please switch off any other thermostat before starting the LB
755756
thermostatting mechanism.
756757

doc/sphinx/introduction.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ The following tutorials are available:
320320
* :file:`electrokinetics`: Modelling electrokinetics together with hydrodynamic interactions.
321321
* :file:`constant_pH`: Modelling the titration of a weak acid using the constant pH method
322322
* :file:`widom_insertion`: Measuring the excess chemical potential of a salt solution using the Widom particle insertion method
323-
* :file:`mlip`: Atomistic simulations using machine-learned interatomic potentials and the MACE-MP-0 model :cite:`batatia25a`
323+
* :file:`mlip`: Atomistic simulations using machine-learned interatomic potentials and the MACE-MP-0 model :cite:`batatia22a,batatia25a`
324324
* :file:`mlip-water`: Modelling water using the TIP4P model :cite:`abascal05a` and machine-learning interatomic potentials with Apax :cite:`schafer25a`
325325

326326
The executed notebooks with solutions and plots are periodically deployed
@@ -617,10 +617,13 @@ such as in ``1.1.5-dev`` or ``1.1.5.git8b603b12``, |es| doesn't offer a mechanis
617617
How to cite |es|
618618
^^^^^^^^^^^^^^^^
619619

620-
Please cite :cite:t:`weik19a` (BibTeX key ``weik19a`` in :file:`doc/bibliography.bib`)
620+
Please cite both :cite:t:`weeber24a` and :cite:t:`weik19a`
621+
(BibTeX keys ``weeber24a`` and ``weik19a`` in :file:`doc/bibliography.bib`)
621622
for |es| 4.0 and later, or both :cite:t:`arnold13a` and :cite:t:`limbach06a`
622623
(BibTeX keys ``arnold13a`` and ``limbach06a`` in :file:`doc/bibliography.bib`)
623-
for |es| 2.0 to 3.3. To find the version number, use the following command:
624+
for |es| 2.0 to 3.3.
625+
626+
To find the version number, use the following command:
624627

625628
.. code-block:: bash
626629
@@ -634,11 +637,16 @@ publications, using the BibTeX entries indicated in this user guide.
634637

635638
A complete citation would look like this:
636639

637-
Simulations were carried out with ESPResSo 4.2.2[24] using the ICC\*
640+
Simulations were carried out with ESPResSo 4.2.2[23,24] using the ICC\*
638641
algorithm[25].
639642

640643
| ____________
641644
645+
| [23] R. Weeber, J.-N. Grad, D. Beyer *et al.* ESPResSo, a versatile
646+
open-source software package for simulating soft matter systems.
647+
In M. Yáñez and R. J. Boyd, eds, *Comprehensive Computational Chemistry*,
648+
vol. 3, pages 578--601. Elsevier, Oxford, 1st edition, 2024.
649+
doi:\ `10.1016/B978-0-12-821978-2.00103-3 <https://doi.org/10.1016/B978-0-12-821978-2.00103-3>`_.
642650
| [24] F. Weik, R. Weeber, K. Szuttor *et al.* ESPResSo 4.0 -- an
643651
extensible software package for simulating soft matter systems.
644652
*Eur. Phys. J. Spec. Top.* **227**, 1789--1816 (2019).
@@ -651,18 +659,13 @@ A complete citation would look like this:
651659
If you developed code for |es| and made it available in a publicly accessible repository,
652660
consider providing a permanent URL, such as a commit revision or a git tag:
653661

654-
The method was implemented for ESPResSo 4.2.2[24] and its source code is
662+
The method was implemented for ESPResSo 4.2.2[23,24] and its source code is
655663
available online\ :superscript:`note 1`.
656664

657665
| ____________
658666
659667
| :superscript:`note 1` https://github.com/username/espresso/releases/tag/implemented-algorithm
660668
661-
| [24] F. Weik, R. Weeber, K. Szuttor *et al.* ESPResSo 4.0 -- an
662-
extensible software package for simulating soft matter systems.
663-
*Eur. Phys. J. Spec. Top.* **227**, 1789--1816 (2019).
664-
doi:\ `10.1140/epjst/e2019-800186-9 <https://doi.org/10.1140/epjst/e2019-800186-9>`_.
665-
666669
The URL of a branch can be ambiguous, since extra commits can be pushed in the future,
667670
for example to fix a bug, thus creating confusion as to which commit was actually
668671
used to produce the paper data.

0 commit comments

Comments
 (0)