Skip to content

Commit

Permalink
Merge branch 'python' into lb_force_density
Browse files Browse the repository at this point in the history
  • Loading branch information
RudolfWeeber committed Sep 11, 2019
2 parents 62c2432 + 5c69842 commit 583da85
Show file tree
Hide file tree
Showing 92 changed files with 968 additions and 3,373 deletions.
10 changes: 0 additions & 10 deletions .gitlab-ci.yml
Expand Up @@ -123,16 +123,6 @@ no_rotation:
- docker - docker
- linux - 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 ### Builds with different Distributions


#debian:8 removed: similar to ubuntu:1404 #debian:8 removed: similar to ubuntu:1404
Expand Down
40 changes: 1 addition & 39 deletions doc/sphinx/installation.rst
Expand Up @@ -405,8 +405,6 @@ General features
- ``COMFIXED`` Allows to fix the center of mass of all particles of a certain type. - ``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 - ``BOND_CONSTRAINT`` Turns on the RATTLE integrator which allows for fixed lengths bonds
between particles. between particles.
Expand Down Expand Up @@ -537,48 +535,12 @@ Some of the short-range interactions have additional features:
Debug messages Debug messages
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
Finally, there are a number of flags for debugging. The most important Finally, there is a flag for debugging:
one are
- ``ADDITIONAL_CHECKS`` Enables numerous additional checks which can detect inconsistencies - ``ADDITIONAL_CHECKS`` Enables numerous additional checks which can detect inconsistencies
especially in the cell systems. These checks are however too slow to especially in the cell systems. These checks are however too slow to
be enabled in production runs. 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 Features marked as experimental
Expand Down
1 change: 1 addition & 0 deletions doc/sphinx/introduction.rst
Expand Up @@ -299,6 +299,7 @@ Currently, the following tutorials are available:
* :file:`08-visualization`: Using the online visualizers of |es|. * :file:`08-visualization`: Using the online visualizers of |es|.
* :file:`10-reaction_ensemble`: Modelling chemical reactions by means of the reaction ensemble. * :file:`10-reaction_ensemble`: Modelling chemical reactions by means of the reaction ensemble.
* :file:`11-ferrofluid`: Modelling a colloidal suspension of magnetic particles. * :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: .. _Sample scripts:


Expand Down
20 changes: 5 additions & 15 deletions doc/sphinx/particles.rst
Expand Up @@ -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 The behavior of virtual sites can be fine-tuned with the following
switches in :file:`myconfig.hpp`. 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 - ``THERMOSTAT_IGNORE_NON_VIRTUAL`` specifies that the thermostat does not act on non-virtual particles


.. _Particle number counting feature: .. _Particle number counting feature:
Expand All @@ -529,16 +524,13 @@ Particle number counting feature






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


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


If you want to keep track of particle ids of a certain type you have to If you want to keep track of particle ids of a certain type you have to
Expand All @@ -547,9 +539,7 @@ initialize the method by calling ::
system.setup_type_map([_type]) 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. 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 The keyword
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
``number_of_particles`` as argument will return the number of ``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` :: 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` ::


Expand All @@ -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)) 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: .. _Self-propelled swimmers:


Expand Down
6 changes: 3 additions & 3 deletions doc/tutorials/01-lennard_jones/01-lennard_jones.ipynb
Expand Up @@ -522,13 +522,13 @@
"_uncorrelated_ samples:\n", "_uncorrelated_ samples:\n",
"\n", "\n",
"\\begin{equation}\n", "\\begin{equation}\n",
" SE = \\sqrt{\\frac{\\sigma}{N}},\n", " SE = \\sqrt{\\frac{\\sigma^2}{N}},\n",
"\\end{equation}\n", "\\end{equation}\n",
"\n", "\n",
"where $\\sigma$ is the standard deviation\n", "where $\\sigma^2$ is the variance\n",
"\n", "\n",
"\\begin{equation}\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}" "\\end{equation}"
] ]
}, },
Expand Down
Expand Up @@ -92,7 +92,7 @@ \subsection{Constant pH method}
In the constant pH method, the acceptance probability for a reaction is In the constant pH method, the acceptance probability for a reaction is


\begin{equation} \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} \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$): 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} \begin{equation}
Expand Down

0 comments on commit 583da85

Please sign in to comment.