Skip to content
Permalink
Browse files

Fix issues in docstrings of private members

  • Loading branch information
jngrad committed Feb 13, 2020
1 parent 14b00a8 commit 2080bb93a0787802a90628112f9b943fd8b7ae5c
Showing with 21 additions and 16 deletions.
  1. +1 −1 doc/sphinx/under_the_hood.rst
  2. +2 −2 src/python/espressomd/pair_criteria.py
  3. +18 −13 src/python/espressomd/particle_data.pyx
@@ -104,7 +104,7 @@ particles is fairly random, determined e.g. by the order in which the
particles are set up or have been communicated across the processor
boundaries. The force loop therefore accesses the particle array in
arbitrary order, resulting in a lot of unfavorable page misses. In the
memory organization of , the particles are accessed in a virtually
memory organization of |es|, the particles are accessed in a virtually
linear order. Because the force calculation goes through the cells in a
linear fashion, all accesses to a single cell occur close in time, for
the force calculation of the cell itself as well as for its neighbors.
@@ -25,7 +25,7 @@ def decide(self, p1, p2):
Parameters
----------
p1, p2 : :obj:`ParticleHandle` or :obj:`int` containing the particle id.
p1, p2 : :obj:`espressomd.particle_data.ParticleHandle` or :obj:`int` containing the particle id.
Particle pair.
"""
id1 = None
@@ -45,7 +45,7 @@ def decide(self, p1, p2):
@script_interface_register
class DistanceCriterion(_PairCriterion):

"""Pair criterion returning true, if particles are closer than a cut off.
"""Pair criterion returning true, if particles are closer than a cutoff.
Periodic boundaries are treated via minimum image convention.
The following parameters can be passed to the constructor, changed via set_params()
@@ -1530,8 +1530,8 @@ cdef class _ParticleSliceImpl:
"""Handles slice inputs.
This base class should not be used directly. Use
:class:`espressomd.ParticleSlice` instead, which contains all the particle
properties.
:class:`espressomd.particle_data.ParticleSlice` instead, which contains
all the particle properties.
"""

@@ -1673,7 +1673,7 @@ cdef class _ParticleSliceImpl:
See Also
--------
add
:meth:`espressomd.particle_data.ParticleList.add`
"""
for id in self.id_selection:
@@ -1683,7 +1683,7 @@ cdef class _ParticleSliceImpl:
class ParticleSlice(_ParticleSliceImpl):

"""
Handles slice inputs e.g. part[0:2]. Sets values for selected slices or
Handles slice inputs e.g. ``part[0:2]``. Sets values for selected slices or
returns values as a single list.
"""
@@ -1697,8 +1697,8 @@ class ParticleSlice(_ParticleSliceImpl):

cdef class ParticleList:
"""
Provides access to the particles via [i], where i is the particle id.
Returns a :class:`ParticleHandle` object.
Provides access to the particles via ``[i]``, where ``i`` is the particle
id. Returns a :class:`espressomd.particle_data.ParticleHandle` object.
"""

@@ -1715,13 +1715,18 @@ cdef class ParticleList:
# __getstate__ and __setstate__ define the pickle interaction
def __getstate__(self):
"""Attributes to pickle.
Content of particle_attributes, minus a few exceptions dip, director:
Setting only the director will overwrite the orientation of the
particle around the axis parallel to dipole moment/director.
Quaternions contain the full info id: The particle id is used as the
storage key when pickling all particles via ParticleList, and the
interface (rightly) does not support changing of the id after the
particle was created.
Content of ``particle_attributes``, minus a few exceptions:
- :attr:`~ParticleHandle.dip`, :attr:`~ParticleHandle.director`:
Setting only the director will overwrite the orientation of the
particle around the axis parallel to dipole moment/director.
Quaternions contain the full info.
- :attr:`~ParticleHandle.id`: The particle id is used as the
storage key when pickling all particles via :class:`ParticleList`,
and the interface (rightly) does not support changing of the id
after the particle was created.
- :attr:`~ParticleHandle.image_box`, :attr:`~ParticleHandle.node`
"""

0 comments on commit 2080bb9

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