Skip to content
Permalink
Browse files

Merge branch 'python' into lb_force_density

  • Loading branch information...
RudolfWeeber committed Sep 11, 2019
2 parents 62c2432 + 5c69842 commit 583da85cf909cc2185d64642316977d364291da3
Showing with 968 additions and 3,373 deletions.
  1. +0 −10 .gitlab-ci.yml
  2. +1 −39 doc/sphinx/installation.rst
  3. +1 −0 doc/sphinx/introduction.rst
  4. +5 −15 doc/sphinx/particles.rst
  5. +3 −3 doc/tutorials/01-lennard_jones/01-lennard_jones.ipynb
  6. +1 −1 doc/tutorials/10-reaction_ensemble/10-reaction_ensemble.tex
  7. +359 −0 doc/tutorials/12-constant_pH/12-constant_pH.ipynb
  8. +6 −0 doc/tutorials/12-constant_pH/CMakeLists.txt
  9. +4 −0 doc/tutorials/CMakeLists.txt
  10. +4 −1 doc/tutorials/Readme.rst
  11. +0 −79 maintainer/configs/nocheck-maxset.hpp
  12. +0 −12 src/config/features.def
  13. +0 −2 src/core/EspressoSystemInterface.hpp
  14. +0 −1 src/core/accumulators/Correlator.cpp
  15. +0 −1 src/core/accumulators/Correlator.hpp
  16. +0 −1 src/core/actor/DipolarBarnesHut_cuda.cuh
  17. +2 −11 src/core/cells.cpp
  18. +1 −1 src/core/cells.hpp
  19. +2 −3 src/core/collision.cpp
  20. +0 −3 src/core/collision.hpp
  21. +6 −17 src/core/communication.cpp
  22. +6 −7 src/core/communication.hpp
  23. +0 −6 src/core/cuda_common_cuda.cu
  24. +0 −1 src/core/cuda_interface.cpp
  25. +18 −122 src/core/debug.cpp
  26. +5 −64 src/core/debug.hpp
  27. +0 −3 src/core/diamond.cpp
  28. +2 −25 src/core/domain_decomposition.cpp
  29. +12 −10 src/core/electrostatics_magnetostatics/coulomb.cpp
  30. +9 −9 src/core/electrostatics_magnetostatics/dipole.cpp
  31. +9 −22 src/core/electrostatics_magnetostatics/elc.cpp
  32. +0 −2 src/core/electrostatics_magnetostatics/icc.cpp
  33. +3 −3 src/core/electrostatics_magnetostatics/magnetic_non_p3m_methods.cpp
  34. +4 −3 src/core/electrostatics_magnetostatics/magnetic_non_p3m_methods.hpp
  35. +0 −1 src/core/electrostatics_magnetostatics/mdlc_correction.cpp
  36. +32 −31 src/core/electrostatics_magnetostatics/mmm2d.cpp
  37. +3 −3 src/core/electrostatics_magnetostatics/mmm2d.hpp
  38. +0 −38 src/core/electrostatics_magnetostatics/p3m-common.cpp
  39. +0 −10 src/core/electrostatics_magnetostatics/p3m-common.hpp
  40. +11 −153 src/core/electrostatics_magnetostatics/p3m-dipolar.cpp
  41. +1 −1 src/core/electrostatics_magnetostatics/p3m-dipolar.hpp
  42. +13 −167 src/core/electrostatics_magnetostatics/p3m.cpp
  43. +1 −2 src/core/electrostatics_magnetostatics/p3m.hpp
  44. +32 −43 src/core/event.cpp
  45. +3 −2 src/core/event.hpp
  46. +1 −1 src/core/forces.cpp
  47. +36 −115 src/core/ghosts.cpp
  48. +1 −1 src/core/global.hpp
  49. +0 −6 src/core/grid.cpp
  50. +22 −74 src/core/grid_based_algorithms/halo.cpp
  51. +1 −1 src/core/grid_based_algorithms/halo.hpp
  52. +0 −1 src/core/grid_based_algorithms/lattice.cpp
  53. +0 −2 src/core/grid_based_algorithms/lb.cpp
  54. +3 −3 src/core/grid_based_algorithms/lb_boundaries.cpp
  55. +0 −5 src/core/grid_based_algorithms/lbgpu.cpp
  56. +1 −1 src/core/integrate.cpp
  57. +2 −2 src/core/integrate.hpp
  58. +0 −49 src/core/io/reader/readpdb.cpp
  59. +0 −54 src/core/io/writer/h5md_core.cpp
  60. +10 −72 src/core/layered.cpp
  61. +10 −8 src/core/metadynamics.cpp
  62. +0 −2 src/core/metadynamics.hpp
  63. +0 −7 src/core/nsquare.cpp
  64. +5 −7 src/core/particle_data.cpp
  65. +1 −1 src/core/particle_data.hpp
  66. +0 −4 src/core/polymer.cpp
  67. +0 −1 src/core/pressure_inline.hpp
  68. +2 −3 src/core/random.cpp
  69. +0 −6 src/core/rattle.cpp
  70. +7 −3 src/core/reaction_ensemble.cpp
  71. +6 −0 src/core/reaction_ensemble.hpp
  72. +0 −1 src/core/rotate_system.cpp
  73. +5 −7 src/core/rotation.cpp
  74. +1 −1 src/core/short_range_loop.hpp
  75. +0 −1 src/core/statistics.cpp
  76. +17 −52 src/core/thermostat.cpp
  77. +15 −23 src/core/thermostat.hpp
  78. +1 −1 src/core/virtual_sites.cpp
  79. +0 −1 src/core/virtual_sites/lb_inertialess_tracers_cuda_interface.cpp
  80. +0 −70 src/core/virtual_sites/virtual_sites_com.cpp
  81. +2 −2 src/python/espressomd/integrate.pxd
  82. +0 −1 src/python/espressomd/system.pxd
  83. +0 −10 src/python/espressomd/system.pyx
  84. +2 −4 src/utils/include/utils/constants.hpp
  85. +0 −1,738 testsuite/python/data/engine_lb_2pt.vtk
  86. +188 −102 testsuite/python/engine_lb.py
  87. +10 −0 testsuite/python/icc.py
  88. +5 −1 testsuite/python/unittest_decorators.py
  89. +9 −0 testsuite/python/virtual_sites_relative.py
  90. +1 −1 testsuite/python/wang_landau_reaction_ensemble.py
  91. +1 −0 testsuite/scripts/tutorials/CMakeLists.txt
  92. +44 −0 testsuite/scripts/tutorials/test_12-constant_pH.py
@@ -123,16 +123,6 @@ no_rotation:
- docker
- linux

nocheckmaxset:
<<: *global_job_definition
stage: build
script:
- export with_cuda=false myconfig=nocheck-maxset make_check=false
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux

### Builds with different Distributions

#debian:8 removed: similar to ubuntu:1404
@@ -405,8 +405,6 @@ General features
- ``COMFIXED`` Allows to fix the center of mass of all particles of a certain type.
- ``MOLFORCES`` (EXPERIMENTAL)
- ``BOND_CONSTRAINT`` Turns on the RATTLE integrator which allows for fixed lengths bonds
between particles.
@@ -537,48 +535,12 @@ Some of the short-range interactions have additional features:
Debug messages
^^^^^^^^^^^^^^
Finally, there are a number of flags for debugging. The most important
one are
Finally, there is a flag for debugging:
- ``ADDITIONAL_CHECKS`` Enables numerous additional checks which can detect inconsistencies
especially in the cell systems. These checks are however too slow to
be enabled in production runs.
The following flags control the debug output of various sections of
|es|. You will however understand the output very often only by
looking directly at the code.
- ``COMM_DEBUG`` Output from the asynchronous communication code.
- ``EVENT_DEBUG`` Notifications for event calls, i.e. the ``on_...`` functions in
``initialize.c``. Useful if some module does not correctly respond to
changes of e.g. global variables.
- ``CELL_DEBUG`` Cellsystem output.
- ``GHOST_DEBUG`` Cellsystem output specific to the handling of ghost cells and the
ghost cell communication.
- ``HALO_DEBUG``
- ``P3M_DEBUG``
- ``THERMO_DEBUG`` Output from the thermostats.
- ``VIRTUAL_SITES_DEBUG``
- ``ASYNC_BARRIER`` Introduce a barrier after each asynchronous command completion. Helps
in the detection of mismatching communication.
- ``FORCE_CORE`` Causes |es| to try to provoke a core dump when exiting unexpectedly.
- ``MPI_CORE`` Causes |es| to try this even with MPI errors.
- ``CUDA_DEBUG``
- ``H5MD_DEBUG``
Features marked as experimental
@@ -299,6 +299,7 @@ Currently, the following tutorials are available:
* :file:`08-visualization`: Using the online visualizers of |es|.
* :file:`10-reaction_ensemble`: Modelling chemical reactions by means of the reaction ensemble.
* :file:`11-ferrofluid`: Modelling a colloidal suspension of magnetic particles.
* :file:`12-constant_pH`: Modelling an acid dissociation curve using the constant pH method

.. _Sample scripts:

@@ -510,11 +510,6 @@ Please note that the velocity attribute of the virtual particles does not carry
The behavior of virtual sites can be fine-tuned with the following
switches in :file:`myconfig.hpp`.
- ``VIRTUAL_SITES_NO_VELOCITY`` specifies that the velocity of virtual sites is not computed
- ``VIRTUAL_SITES_THERMOSTAT`` specifies that the Langevin thermostat should also act on virtual
sites
- ``THERMOSTAT_IGNORE_NON_VIRTUAL`` specifies that the thermostat does not act on non-virtual particles
.. _Particle number counting feature:
@@ -529,16 +524,13 @@ Particle number counting feature



Knowing the number of particles of a certain type in simulations in the grand canonical ensemble,
or other purposes, when particles of certain types are created and
deleted frequently is often of interest. Particle ids can be stored in a map for each
individual type and so random ids of particles of a certain type can be
drawn. ::
Knowing the number of particles of a certain type in simulations where particle numbers can fluctuate is of interest.
Particle ids can be stored in a map for each
individual type::

import espressomd
system = espressomd.System()
system.setup_type_map([_type])
system.find_particle(_type)
system.number_of_particles(_type)

If you want to keep track of particle ids of a certain type you have to
@@ -547,9 +539,7 @@ initialize the method by calling ::
system.setup_type_map([_type])

After that will keep track of particle ids of that type. Keeping track of particles of a given type is not enabled by default since it requires memory.
When using the
keyword ``find_particle`` and a particle type, the command will return a randomly
chosen particle id, for a particle of the given type. The keyword
The keyword
``number_of_particles`` as argument will return the number of
particles which have the given type. For counting the number of particles of a given type you could also use :meth:`espressomd.particle_data.ParticleList.select` ::

@@ -558,7 +548,7 @@ particles which have the given type. For counting the number of particles of a g
...
number_of_particles = len(system.part.select(type=type))

However calling ``select(type=type)`` results in looping over all particles. Therefore calling ``select()`` is slow compared to using :meth:`espressomd.system.System.number_of_particles` which directly can return the number of particles with that type.
However calling ``select(type=type)`` results in looping over all particles which is slow. In contrast, :meth:`espressomd.system.System.number_of_particles` directly can return the number of particles with that type.

.. _Self-propelled swimmers:

@@ -522,13 +522,13 @@
"_uncorrelated_ samples:\n",
"\n",
"\\begin{equation}\n",
" SE = \\sqrt{\\frac{\\sigma}{N}},\n",
" SE = \\sqrt{\\frac{\\sigma^2}{N}},\n",
"\\end{equation}\n",
"\n",
"where $\\sigma$ is the standard deviation\n",
"where $\\sigma^2$ is the variance\n",
"\n",
"\\begin{equation}\n",
" \\sigma = \\left\\langle x^2 - \\langle x\\rangle^2 \\right\\rangle\n",
" \\sigma^2 = \\left\\langle x^2 - \\langle x\\rangle^2 \\right\\rangle\n",
"\\end{equation}"
]
},
@@ -92,7 +92,7 @@ \subsection{Constant pH method}
In the constant pH method, the acceptance probability for a reaction is

\begin{equation}
P_{\text{acc}} = \text{min}\left\lbrace 1, e^{\beta \Delta E_\text{pot} \pm \ln{10} (\text{pH - pK}_\text{a})}\right\rbrace \text{,}
P_{\text{acc}} = \text{min}\left\lbrace 1, e^{\beta \Delta E_\text{pot} \pm \ln_{10} (\text{pH - pK}_\text{a})}\right\rbrace \text{,}
\end{equation}
and the acceptance probability of a reaction is $P_\text{acc}=\frac{N_\text{HA}}{N0}$ for a dissociation and $P_\text{acc}=\frac{N_\text{A}}{N0}$ for an association reaction \cite{landsgesell2017simulation}. Here $\Delta E_\text{pot}$ is the potential energy change due to the reaction, while $\text{pH - p}K_\text{a}$ is an input parameter composed by two terms, pH and -p$K_\text{a}$, that represent, respectively, the concentration of \ce{H+} ions in the solution and the logarithm in base 10 of the thermodynamic dissociation constant for HA when the system is approximated as a dilute solution ($\gamma_i \approx 1$):
\begin{equation}

0 comments on commit 583da85

Please sign in to comment.
You can’t perform that action at this time.