Skip to content

Commit

Permalink
Fix broken Sphinx formatting
Browse files Browse the repository at this point in the history
Inconsistent indentation can cause issues in recent Sphinx versions
(2.4.0+), e.g. `"""Line1\n  Line2"""` (with 2 leading spaces) can
cause an `Unexpected section title` error; correct formats are
`"""Line1\nLine2"""` and `"""\nLine1\nLine2"""` (numpydoc).

Bullet lists must have the same level of indentation as the
preceding paragraph. Adding one extra indentation on a bullet
list causes it to be wrapped inside a <blockquote> HTML tag.
  • Loading branch information
jngrad committed Mar 6, 2020
1 parent 22646ed commit 65274a5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
14 changes: 7 additions & 7 deletions src/python/espressomd/cluster_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ class Clusters:

"""Access to the clusters in the cluster structure.
Access is as follows:
Access is as follows:
* Number of clusters: len(clusters)
* Access a cluster via its id: clusters[id]
* Iterate over clusters::
* Number of clusters: len(clusters)
* Access a cluster via its id: clusters[id]
* Iterate over clusters::
for c in clusters:
for c in clusters:
where c will be a tuple containing the cluster id and the cluster object
"""
where c will be a tuple containing the cluster id and the cluster object
"""

def __init__(self, cluster_structure):
self.cluster_structure = cluster_structure
Expand Down
16 changes: 8 additions & 8 deletions src/python/espressomd/io/mpiio.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def write(self, prefix=None, positions=False, velocities=False,
Outputs binary data using MPI-IO to several files starting with prefix.
Suffixes are:
- head: Information about fields that are dumped,
- pref: Information about processes: 1 int per process,
- id: Particle ids: 1 int per particle,
- pos: Position information (if dumped): 3 doubles per particle,
- vel: Velocity information (if dumped): 3 doubles per particle,
- typ: Type information (if dumped): 1 int per particle,
- bond: Bond information (if dumped): variable amount of data,
- boff: Bond offset information (if bonds are dumped): 1 int per particle.
- head: Information about fields that are dumped,
- pref: Information about processes: 1 int per process,
- id: Particle ids: 1 int per particle,
- pos: Position information (if dumped): 3 doubles per particle,
- vel: Velocity information (if dumped): 3 doubles per particle,
- typ: Type information (if dumped): 1 int per particle,
- bond: Bond information (if dumped): variable amount of data,
- boff: Bond offset information (if bonds are dumped): 1 int per particle.
.. note::
Do not read the files on a machine with a different architecture!
Expand Down
30 changes: 15 additions & 15 deletions src/python/espressomd/pair_criteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def decide(self, p1, p2):
class DistanceCriterion(_PairCriterion):

"""Pair criterion returning true, if particles are closer than a cutoff.
Periodic boundaries are treated via minimum image convention.
Periodic boundaries are treated via minimum image convention.
The following parameters can be passed to the constructor, changed via set_params()
and retrieved via get_params()
The following parameters can be passed to the constructor, changed via set_params()
and retrieved via get_params()
cut_off : :obj:`float`
distance cut off for the criterion
cut_off : :obj:`float`
distance cut off for the criterion
"""
_so_name = "PairCriteria::DistanceCriterion"
_so_creation_policy = "LOCAL"
Expand All @@ -63,14 +63,14 @@ class EnergyCriterion(_PairCriterion):

"""Pair criterion returning true, if the short range energy between the particles is >= the cutoff
Be aware that the short range energy contains the short range part of dipolar and electrostatic interactions,
but not the long range part.
Be aware that the short range energy contains the short range part of dipolar and electrostatic interactions,
but not the long range part.
The following parameters can be passed to the constructor, changed via set_params()
and retrieved via get_params()
The following parameters can be passed to the constructor, changed via set_params()
and retrieved via get_params()
cut_off : :obj:`float`
energy cut off for the criterion
cut_off : :obj:`float`
energy cut off for the criterion
"""
_so_name = "PairCriteria::EnergyCriterion"
_so_creation_policy = "LOCAL"
Expand All @@ -81,11 +81,11 @@ class BondCriterion(_PairCriterion):

"""Pair criterion returning true, if a pair bond of given type exists between them
The following parameters can be passed to the constructor, changed via set_params()
and retrieved via get_params()
The following parameters can be passed to the constructor, changed via set_params()
and retrieved via get_params()
bond_type : :obj:`int`
numeric type of the bond
bond_type : :obj:`int`
numeric type of the bond
"""
_so_name = "PairCriteria::BondCriterion"
_so_creation_policy = "LOCAL"
10 changes: 5 additions & 5 deletions src/python/espressomd/particle_data.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1315,11 +1315,11 @@ cdef class ParticleHandle:
"""
Checks the validity of the given bond:
- If the bondtype is given as an object or a numerical id
- If all partners are of type :obj:`int`
- If the number of partners satisfies the bond
- If the bond type used exists (is lower than ``n_bonded_ia``)
- If the number of bond partners fits the bond type
- If the bondtype is given as an object or a numerical id
- If all partners are of type :obj:`int`
- If the number of partners satisfies the bond
- If the bond type used exists (is lower than ``n_bonded_ia``)
- If the number of bond partners fits the bond type
Throws an exception if any of these are not met.
Expand Down

0 comments on commit 65274a5

Please sign in to comment.