diff --git a/NEWS b/NEWS index 88aa923adac..b4d57163690 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,98 @@ = ESPRESSO NEWS = ================= +ESPResSo 4.1.2 +============== + +This release provides a number of corrections for the ESPResSo 4.1 line. +We recommend that this release be used for all production simulations. +The interface has not been changed between ESPResSo 4.1.1 and 4.1.2. +However, some bugs were discovered which can affect simulation results. +Below, please find the list of changes. The numbers in brackets refer to +ticket numbers on https://github.com/espressomd/espresso + +General corrections and improvements: + +* Remove correlation between the rotational noise and translational + noise in the Langevin thermostat (#3355) + +* Fix a bug that may cause the wrong temperature to be set by the + Langevin and DPD thermostats in the first time step after the system + was altered from the Python level, e.g., by changing particles or + interactions (#3341) + +* Fix a bug that caused the DPD thermostat to generate an incorrect + velocity distribution when used together with the Langevin thermostat + (#3352) + +* Fix a bug in MMM2D and ELC with potential boundary conditions, where + one of the correction factors was over-counted resulting in wrong + energies (#3310) + +* Fix a bug that caused the wrong bonds to be deleted when removing + particles from the system (#3356) + +* Fix an ambiguity in `ParticleSlice`: the values in the square brackets + refer to particle ids, not array indices (#3367). This means the + ill-defined syntax `system.part[0:-1]` is no longer valid. See the + User Guide section on Setting up particles for more information. + +* Remove the mass prefactor in the `ComForce` observable and use + the correct Particle ids in the `ParticleAngularVelocities` + and `ParticleBodyVelocities` observables (#3380) + +* Fix a rounding error that caused debug builds of ESPResSo running with + multiple MPI threads to crash when a particle was placed exactly on + the boundary between two cells (#3377) + +* Fix `espressomd.has_features()` for the corner case where the list of + all compiled-in features is passed as argument, returning ``False`` + instead of ``True`` (#3318) + +* Refactor the random number generator code (#3349) + +* Minor fixes (#3351, #3336) + +Documentation and tutorials corrections and improvements: + +* Improve documentation of Monte Carlo methods (#3254, #3330) + +* Minor fixes (#3342, #3334) + +Build system and platform-related corrections and improvements: + +* List all Python dependencies in `requirements.txt` with the supported + version numbers (#3300). Please note that most of them are optional. + +* Add `MPIEXEC_PREFLAGS` and `MPIEXEC_POSTFLAGS` to the command lines of + parallel tests (#3221) + +* Add the `-oversubscribe` flag to the command lines of parallel tests + running with OpenMPI v2.X to avoid exiting early from a Python test + configured without `MAX_NUM_PROC` on a machine with a hyperthreaded + CPU where OpenMPI is configured such that the number of threads cannot + exceed the number of cores (#3335) + +* Refactor the CI, maintainer, Doxygen and pypresso shell scripts to + make them more portable and support filepaths containing whitespaces + (#3326, #3373) + +* Fix a nvcc compiler warning on the empty config (#3329) + +Improved testing: + +* Add a test for ELC and MMM2D using analytic expressions of the force + and energy (#3331) + +* Sped-up seven Python tests (#3319) + +* Fix a test that broke on s390x architectures with Fedora 31 (#3312) + +* Fix tests that broke on i586 architectures with OpenSUSE Tumbleweed + (#3327, #3358) + + + ESPResSo 4.1.1 ============== diff --git a/doc/doxygen/main.dox b/doc/doxygen/main.dox index a93f2c11681..6aa09b990ef 100644 --- a/doc/doxygen/main.dox +++ b/doc/doxygen/main.dox @@ -1,24 +1,23 @@ /* - Copyright (C) 2010-2019 The ESPResSo project - Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 - Max-Planck-Institute for Polymer Research, Theory Group - - This file is part of ESPResSo. - - ESPResSo is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ESPResSo is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -*/ + * Copyright (C) 2010-2019 The ESPResSo project + * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 + * Max-Planck-Institute for Polymer Research, Theory Group + * + * This file is part of ESPResSo. + * + * ESPResSo is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * ESPResSo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** @mainpage ESPResSo code documentation diff --git a/doc/sphinx/advanced_methods.rst b/doc/sphinx/advanced_methods.rst index 75536c02699..9b17f6e531b 100644 --- a/doc/sphinx/advanced_methods.rst +++ b/doc/sphinx/advanced_methods.rst @@ -1958,7 +1958,7 @@ For this one has to provide the following reaction to the Widom method: The call of ``add_reaction`` define the insertion :math:`\mathrm{\emptyset \to type_B}` (which is the 0th defined reaction). Multiple reactions for the insertions of different types can be added to the same ``WidomInsertion`` instance. Measuring the excess chemical potential using the insertion method is done via calling ``widom.measure_excess_chemical_potential(0)``. -If another particle isertion is defined, then the excess chemical potential for this insertion can be measured by calling ``widom.measure_excess_chemical_potential(1)``. +If another particle insertion is defined, then the excess chemical potential for this insertion can be measured by calling ``widom.measure_excess_chemical_potential(1)``. Be aware that the implemented method only works for the canonical ensemble. If the numbers of particles fluctuate (i.e. in a semi grand canonical simulation) one has to adapt the formulas from which the excess chemical potential is calculated! This is not implemented. Also in a isobaric-isothermal simulation (NPT) the corresponding formulas for the excess chemical potentials need to be adapted. This is not implemented. The implementation can also deal with the simultaneous insertion of multiple particles and can therefore measure the change of excess free energy of multiple particles like e.g.: diff --git a/doc/sphinx/io.rst b/doc/sphinx/io.rst index 4ae91fc4a66..893ce3ff794 100644 --- a/doc/sphinx/io.rst +++ b/doc/sphinx/io.rst @@ -21,7 +21,7 @@ simulation. Scripts sometimes use variables that contain essential information about a simulation: the stored values of an observable that was computed in previous time steps, counters, etc. These would have to be contained in a checkpoint. However, not all -variables are of interest. +variables are of interest. Another problem with a generic checkpoint would be the control flow of the script. In principle, the checkpoint would have to store where in @@ -43,7 +43,7 @@ It is strongly recommended to keep track of the times in the simulation run wher Moreover, please carefully read the limitations mentioned below. Checkpointing is implemented by the :class:`espressomd.checkpointing.Checkpoint` class. It is instanced as follows:: - + from espressomd import checkpointing checkpoint = checkpointing.Checkpoint(checkpoint_id="mycheckpoint", checkpoint_path=".") @@ -78,8 +78,8 @@ To trigger the checkpoint when Ctrl+C is pressed during a running simulation, th # signal.SIGINT: signal 2, is sent when ctrl+c is pressed checkpoint.register_signal(signal.SIGINT) -In the above example checkpointing is triggered, when the user -interrupts by pressing Ctrl+C. In this case a new checkpoint is written and the simulation +In the above example checkpointing is triggered, when the user interrupts by +pressing Ctrl+C. In this case a new checkpoint is written and the simulation quits. An existing checkpoint can be loaded with:: @@ -94,23 +94,23 @@ An existing checkpoint can be loaded with:: This will restore the state of the objects registered for checkpointing. The checkpointing instance itself will also be restored. I.e., the same variables will be registered for the next checkpoint and the same system signals will be caught as in the initial setup of the checkpointing. -Be aware of the following limitations: +Be aware of the following limitations: * Checkpointing makes use of the ``pickle`` python package. Objects will only be restored as far as they support pickling. This is the case for Python's basic data types, ``numpy`` arrays and many other objects. Still, pickling support cannot be taken for granted. * Pickling support of the :class:`espressomd.system.System` instance and contained objects such as bonded and non-bonded interactions and electrostatics methods. However, there are many more combinations of active interactions and algorithms then can be tested. - * The active actors, i.e., the content of ``system.actors``, are checkpointed. For lattice-Boltzmann fluids, this only includes the parameters such as the lattice constant (``agrid``). The actual flow field has to be saved separately with the lattice-Boltzmann specific methods + * The active actors, i.e., the content of ``system.actors``, are checkpointed. For lattice-Boltzmann fluids, this only includes the parameters such as the lattice constant (``agrid``). The actual flow field has to be saved separately with the lattice-Boltzmann specific methods :meth:`espressomd.lb.HydrodynamicInteraction.save_checkpoint` and loaded via :meth:`espressomd.lb.HydrodynamicInteraction.load_checkpoint` after restoring the checkpoint * References between Python objects are not maintained during checkpointing. For example, if an instance of a shape and an instance of a constraint containing the shape are checkpointed, these two objects are equal before checkpointing but independent copies which have the same parameters after restoring the checkpoint. Changing one will no longer affect the other. - + * The state of the cell system as well as the MPI node grid are checkpointed. Therefore, checkpoints can only be loaded, when the script runs on the same number of MPI ranks. * Checkpoints are not compatible between different |es| versions. - * Checkpoints may depend on the presence of other Python modules at specific versions. It may therefore not be possible to load a checkpoint in a different environment than where it was loaded. + * Checkpoints may depend on the presence of other Python modules at specific versions. It may therefore not be possible to load a checkpoint in a different environment than where it was loaded. For additional methods of the checkpointing class, see :class:`espressomd.checkpointing.Checkpoint`. @@ -183,12 +183,12 @@ documentation see `h5py `_). For example, all positions stored in the file called "h5mdfile.h5" can be read using: .. code:: python - + import h5py h5file = h5py.File("h5mdfile.h5", 'r') positions = h5file['particles/atoms/position/value'] -Furthermore, the files can be inspected with the GUI tool hdfview or visually with the +Furthermore, the files can be inspected with the GUI tool hdfview or visually with the H5MD VMD plugin (see `H5MD plugin `_). For other examples, see :file:`/samples/h5md.py` diff --git a/doc/sphinx/particles.rst b/doc/sphinx/particles.rst index 9ff99e6ec4a..c4033d5b8cb 100644 --- a/doc/sphinx/particles.rst +++ b/doc/sphinx/particles.rst @@ -264,7 +264,7 @@ Setting up diamond polymer networks Creates a diamond-structured polymer network with 8 tetra-functional nodes connected by :math:`2*8` polymer chains of length (MPC) in a unit cell -of length :math:`a`. The diamond command creates 16*MPC+8 many particles +of length :math:`a`. The diamond command creates 16*MPC+8 many particles which are connected via the provided bond type (the term plus 8 stems from adding 8 nodes which are connecting the chains). Chain monomers are placed at a mutual distance along the vector connecting network nodes. The polymer is created starting from @@ -280,7 +280,7 @@ interaction :math:`0` is taken which must be a two-particle bond. Diamond-like polymer network with MPC=15. -See :class:`espressomd.diamond.Diamond` for more details. For simulating compressed or stretched gels the function +See :class:`espressomd.diamond.Diamond` for more details. For simulating compressed or stretched gels the function :meth:`espressomd.system.System.change_volume_and_rescale_particles` may be used. .. diff --git a/doc/tutorials/06-active_matter/CMakeLists.txt b/doc/tutorials/06-active_matter/CMakeLists.txt index 1f24e54a82d..9c21b211704 100644 --- a/doc/tutorials/06-active_matter/CMakeLists.txt +++ b/doc/tutorials/06-active_matter/CMakeLists.txt @@ -3,7 +3,7 @@ file(COPY "SOLUTIONS" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) get_filename_component(BASENAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) -add_custom_command( +add_custom_command( OUTPUT ${BASENAME}.pdf COMMAND sh ../../latexit.sh ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/doc/tutorials/06-active_matter/EXERCISES/enhanced_diffusion.py b/doc/tutorials/06-active_matter/EXERCISES/enhanced_diffusion.py index af496e3c280..7050edecb0e 100644 --- a/doc/tutorials/06-active_matter/EXERCISES/enhanced_diffusion.py +++ b/doc/tutorials/06-active_matter/EXERCISES/enhanced_diffusion.py @@ -73,11 +73,11 @@ # Use the Langevin thermostat (no hydrodynamics) # Set up a random seed (a new one for each run) - system.thermostat.set_langevin(kT=1.0, gamma=1.0, + system.thermostat.set_langevin(kT=1.0, gamma=1.0, seed=np.random.randint(0, 1000)) # Place a single active particle that can rotate in all 3 dimensions. - # Set mass and rotational inertia to separate the timescales for + # Set mass and rotational inertia to separate the timescales for # translational and rotational diffusion. system.part.add(pos=[5.0, 5.0, 5.0], swimming={'v_swim': vel}, mass=0.1, rotation=3 * [True], rinertia=3 * [1.]) @@ -125,6 +125,6 @@ ## Exercise 3 ## # Once you have tested the routine for a single run, # loop over 5 runs. -# Use a program of your choice to visualize the mean and -# standard error of the three correlations for a passive (vel = 0) +# Use a program of your choice to visualize the mean and +# standard error of the three correlations for a passive (vel = 0) # and an active (vel != 0) particle diff --git a/doc/tutorials/06-active_matter/SOLUTIONS/enhanced_diffusion.py b/doc/tutorials/06-active_matter/SOLUTIONS/enhanced_diffusion.py index 0a7caa8419e..607e79f99e6 100644 --- a/doc/tutorials/06-active_matter/SOLUTIONS/enhanced_diffusion.py +++ b/doc/tutorials/06-active_matter/SOLUTIONS/enhanced_diffusion.py @@ -73,7 +73,7 @@ seed=np.random.randint(0, 1000)) # Place a single active particle that can rotate in all 3 dimensions. - # Set mass and rotational inertia to separate the timescales for + # Set mass and rotational inertia to separate the timescales for # translational and rotational diffusion. system.part.add(pos=[5.0, 5.0, 5.0], swimming={'v_swim': vel}, mass=0.1, rotation=3 * [True], rinertia=3 * [1.]) diff --git a/doc/tutorials/07-electrokinetics/07-electrokinetics.ipynb b/doc/tutorials/07-electrokinetics/07-electrokinetics.ipynb index 8e5e467e412..bfa35b65d27 100644 --- a/doc/tutorials/07-electrokinetics/07-electrokinetics.ipynb +++ b/doc/tutorials/07-electrokinetics/07-electrokinetics.ipynb @@ -243,8 +243,8 @@ "\\end{align}\n", "where $d$ denotes the distance between the plates and $\\sigma$ their (constant) surface charge density.\n", "\n", - "Applying an electrical field along one of the directions parallel to the plates does not influence the charge distribution in the normal direction, which allows us to write down the hydrodynamic equations for the parallel direction.\n", - "After eliminating all terms from the Navier-Stokes Equations which vanish due to symmetry, we are left with\n", + "Applying an electric field along one of the directions parallel to the plates does not influence the charge distribution in the normal direction, which allows us to write down the hydrodynamic equations for the parallel direction.\n", + "After eliminating all terms from the Navier-Stokes Equations, which vanish due to symmetry, we are left with\n", "\\begin{align}\n", " \\frac{\\partial_x^2 v_y(x)}{\\partial x^2} = -\\frac{q E C^2}{8 \\, k_\\mathrm{B}T \\, l_\\mathrm{B} \\, \\eta} \\cdot \\cos^{-2} \\left( \\frac{qC}{2 k_\\mathrm{B}T} \\cdot x \\right) \\; ,\n", "\\end{align}\n", @@ -284,7 +284,7 @@ "\t\n", "Important to note is that ESPResSo's unit system is nothing more than a rescaled variant of the SI system.\n", "All physical formulas you are used to in the SI system remain valid and you can use them to find relations between your units.\n", - "Lets start by choosing a unit of length.\n", + "Let's start by choosing a unit of length.\n", "Since we are going to deal with Debye layers with extensions of nanometers, a sensible choice is\n", "\n", "\\begin{align*}\n", @@ -325,7 +325,7 @@ "[q]=e\\approx 1.60\\cdot 10^{-19}\\mathrm{C}.\n", "\\end{align*}\n", "\n", - "We now have all the units necessary to convert out simulation parameters." + "We now have all the units necessary to convert our simulation parameters." ] }, { @@ -340,8 +340,8 @@ "|counterion charge $q$ | $1e$ | $1\\mathrm{[q]}$|\n", "|counterion diffusion coefficient $D$ | $2.0\\cdot 10^{-9}\\mathrm{m^2/s}$ | $0.006075\\mathrm{[x]^2/[t]}$|\n", "|solvent density $\\rho$ | $1.0\\cdot 10^{3}\\mathrm{kg/m^3}$ | $26.18\\mathrm{[m]/[x]^3}$|\n", - "|dynamic solvent viscosity $\\eta$ | $1.0\\cdot 10^{-3}\\mathrm{Pa}\\mathrm{s}$ | $79.53\\mathrm{[m]/([x][t])}$|\n", - "|external electrical field $E$ | $2.585\\cdot 10^{6}\\mathrm{V/m}$ | $0.1\\mathrm{[E]/[q][x]}$|\n" + "|solvent dynamic viscosity $\\eta$ | $1.0\\cdot 10^{-3}\\mathrm{Pa}\\mathrm{s}$ | $79.53\\mathrm{[m]/([x][t])}$|\n", + "|external electric field $E$ | $2.585\\cdot 10^{6}\\mathrm{V/m}$ | $0.1\\mathrm{[E]/([q][x])}$|\n" ] }, { @@ -392,7 +392,7 @@ "width = 50\n", "\n", "padding = 1\n", - "box_x = width + 2*padding\n", + "box_x = width + 2 * padding\n", "\n", "system = System(box_l = [box_x, box_y, box_z])" ] @@ -423,7 +423,7 @@ "viscosity_dynamic = 79.53\n", "density_water = 26.15\n", "sigma = -0.05\n", - "ext_force_density = [0.0,0.1,0.0]" + "ext_force_density = [0.0, 0.1, 0.0]" ] }, { @@ -465,12 +465,12 @@ "source": [ "# Set up the (LB) electrokinetics fluid\n", "viscosity_kinematic = viscosity_dynamic / density_water\n", - "ek = electrokinetics.Electrokinetics(agrid = agrid,\n", - " lb_density = density_water,\n", - " viscosity = viscosity_kinematic,\n", - " friction = 1.0,\n", - " T = kT,\n", - " prefactor = bjerrum_length)" + "ek = electrokinetics.Electrokinetics(agrid=agrid,\n", + " lb_density=density_water,\n", + " viscosity=viscosity_kinematic,\n", + " friction=1.0,\n", + " T=kT,\n", + " prefactor=bjerrum_length)" ] }, { @@ -492,7 +492,7 @@ "outputs": [], "source": [ "# Set up the charged and neutral species\n", - "density_counterions = -2.0 * sigma / width\n", + "density_counterions = -2.0 * sigma / width\n", "counterions = electrokinetics.Species(density=density_counterions,\n", " D=D,\n", " valency=valency,\n", @@ -519,10 +519,10 @@ "outputs": [], "source": [ "# Set up the walls confining the fluid\n", - "ek_wall_left = ekboundaries.EKBoundary(charge_density=sigma/agrid,\n", + "ek_wall_left = ekboundaries.EKBoundary(charge_density=sigma / agrid,\n", " shape=shapes.Wall(normal=[1, 0, 0], dist=padding)) \n", - "ek_wall_right = ekboundaries.EKBoundary(charge_density=sigma/agrid,\n", - " shape=shapes.Wall(normal=[-1, 0, 0], dist=-(padding+width)))\n", + "ek_wall_right = ekboundaries.EKBoundary(charge_density=sigma / agrid,\n", + " shape=shapes.Wall(normal=[-1, 0, 0], dist=-(padding + width)))\n", "\n", "system.ekboundaries.add(ek_wall_left)\n", "system.ekboundaries.add(ek_wall_right)\n", @@ -561,25 +561,25 @@ "velocity_list = []\n", "pressure_xy_list = []\n", "\n", - "for i in range(int(box_x/agrid)):\n", - " if (i*agrid >= padding) and (i*agrid < box_x - padding):\n", - " position = i*agrid - padding - width/2.0 + agrid/2.0\n", + "for i in range(int(box_x / agrid)):\n", + " if (i * agrid >= padding) and (i*agrid < box_x - padding):\n", + " position = i * agrid - padding - width / 2.0 + agrid / 2.0\n", " position_list.append(position)\n", "\n", " # density\n", " density_list.append(counterions[i,\n", - " box_y/(2*agrid),\n", - " box_z/(2*agrid)].density)\n", + " box_y/(2 * agrid),\n", + " box_z/(2 * agrid)].density)\n", "\n", " # velocity\n", " velocity_list.append(ek[i ,\n", - " box_y/(2*agrid),\n", - " box_z/(2*agrid)].velocity[1])\n", + " box_y/(2 * agrid),\n", + " box_z/(2 * agrid)].velocity[1])\n", "\n", " # xz component pressure tensor\n", " pressure_xy_list.append(ek[i,\n", - " box_y/(2*agrid),\n", - " box_z/(2*agrid)].pressure[0,1])\n", + " box_y/(2 * agrid),\n", + " box_z/(2 * agrid)].pressure[0, 1])\n", "\n", "np.savetxt(\"eof_electrokinetics.dat\",\n", " np.column_stack((position_list,\n", diff --git a/maintainer/find_potentially_missing_authors.sh b/maintainer/find_potentially_missing_authors.sh index a0c9d87f9a8..58bb32393f7 100755 --- a/maintainer/find_potentially_missing_authors.sh +++ b/maintainer/find_potentially_missing_authors.sh @@ -24,7 +24,7 @@ cd "$(git rev-parse --show-toplevel)" git shortlog -s | - sed -r 's/^ *[0-9]+\t//' | + cut -f 2 | sort | while read author; do grep -iF "${author}" AUTHORS >/dev/null || echo "Missing: ${author}" diff --git a/maintainer/update_header.sh b/maintainer/update_header.sh index 5ae57bef308..28d1104007f 100755 --- a/maintainer/update_header.sh +++ b/maintainer/update_header.sh @@ -30,6 +30,8 @@ # To review the diff: # $> git diff --word-diff-regex=. -U0 | grep -Po 'Copyright.+' | sort | uniq +cd "$(git rev-parse --show-toplevel)" + files=$(maintainer/files_with_header.sh) num_files=$(echo ${files} | wc -w) current_year=$(date +%Y) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 23d7e01b1e4..60549ecc3a7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2009-2019 The ESPResSo project -# Copyright (C) 2009,2010 +# Copyright (C) 2009,2010 # Max-Planck-Institute for Polymer Research, Theory Group # # This file is part of ESPResSo. diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index e86f46f4424..ebb2b6002db 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -27,8 +27,8 @@ add_custom_target(check_myconfig myconfig ) -execute_process(COMMAND ${PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/gen_sampleconfig.py +execute_process(COMMAND ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/gen_sampleconfig.py ${CMAKE_CURRENT_SOURCE_DIR}/features.def OUTPUT_FILE ${CMAKE_BINARY_DIR}/myconfig-sample.hpp ) diff --git a/src/config/features.def b/src/config/features.def index e554af14f6d..e6256e3e5b0 100644 --- a/src/config/features.def +++ b/src/config/features.def @@ -46,7 +46,7 @@ DIPOLAR_BARNES_HUT requires CUDA DIPOLAR_BARNES_HUT equals DIPOLES and ROTATION and CUDA /* Virtual sites features */ -VIRTUAL_SITES +VIRTUAL_SITES VIRTUAL_SITES_RELATIVE implies VIRTUAL_SITES VIRTUAL_SITES_RELATIVE implies ROTATION diff --git a/src/core/MpiCallbacks.hpp b/src/core/MpiCallbacks.hpp index f1d2e9ed622..89e3f0b34f2 100644 --- a/src/core/MpiCallbacks.hpp +++ b/src/core/MpiCallbacks.hpp @@ -179,7 +179,7 @@ struct callback_one_rank_t final : public callback_concept_t { * * This is an implementation of a callback for a specific callable * @p F and a set of arguments to call it with, where the return - * value if reduced over the communicator. + * value is reduced over the communicator. */ template struct callback_reduce_t final : public callback_concept_t { diff --git a/src/core/accumulators/Correlator.cpp b/src/core/accumulators/Correlator.cpp index c2051701e7c..58a33d7b665 100644 --- a/src/core/accumulators/Correlator.cpp +++ b/src/core/accumulators/Correlator.cpp @@ -377,8 +377,8 @@ void Correlator::update() { "No data can be added after finalize() was called."); } // We must now go through the hierarchy and make sure there is space for the - // new datapoint. For every hierarchy level we have to decide if it necessary - // to move something + // new datapoint. For every hierarchy level we have to decide if it is + // necessary to move something int highest_level_to_compress = -1; t++; @@ -474,8 +474,8 @@ int Correlator::finalize() { throw std::runtime_error("Correlator::finalize() can only be called once."); } // We must now go through the hierarchy and make sure there is space for the - // new datapoint. For every hierarchy level we have to decide if it necessary - // to move something + // new datapoint. For every hierarchy level we have to decide if it is + // necessary to move something int highest_level_to_compress; // mark the correlation as finalized diff --git a/src/core/io/writer/h5md_core.cpp b/src/core/io/writer/h5md_core.cpp index 590ac16cb5b..fb9cf48cf98 100644 --- a/src/core/io/writer/h5md_core.cpp +++ b/src/core/io/writer/h5md_core.cpp @@ -116,7 +116,7 @@ void File::InitFile() { if (file_exists) { if (check_for_H5MD_structure(m_filename)) { /* - * If the file exists and has a valid H5MD structure, lets create a + * If the file exists and has a valid H5MD structure, let's create a * backup of it. This has the advantage, that the new file can * just be deleted if the simulation crashes at some point and we * still have a valid trajectory, we can start from. diff --git a/src/core/observables/ParticleBodyAngularVelocities.hpp b/src/core/observables/ParticleBodyAngularVelocities.hpp index 505d7884cd8..f068c55e827 100644 --- a/src/core/observables/ParticleBodyAngularVelocities.hpp +++ b/src/core/observables/ParticleBodyAngularVelocities.hpp @@ -31,13 +31,13 @@ class ParticleBodyAngularVelocities : public PidObservable { using PidObservable::PidObservable; std::vector evaluate(PartCfg &partCfg) const override { std::vector res(n_values()); - for (int i = 0; i < ids().size(); i++) { #ifdef ROTATION + for (int i = 0; i < ids().size(); i++) { res[3 * i + 0] = partCfg[ids()[i]].m.omega[0]; res[3 * i + 1] = partCfg[ids()[i]].m.omega[1]; res[3 * i + 2] = partCfg[ids()[i]].m.omega[2]; -#endif } +#endif return res; } int n_values() const override { return 3 * ids().size(); } diff --git a/src/core/unit_tests/CMakeLists.txt b/src/core/unit_tests/CMakeLists.txt index 5bb596cd31a..ef897bb3c92 100644 --- a/src/core/unit_tests/CMakeLists.txt +++ b/src/core/unit_tests/CMakeLists.txt @@ -1,5 +1,5 @@ # Copyright (C) 2010-2019 The ESPResSo project -# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 +# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 # Max-Planck-Institute for Polymer Research, Theory Group # This file is part of ESPResSo. @@ -15,7 +15,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . include(unit_test) diff --git a/src/python/espressomd/analyze.pyx b/src/python/espressomd/analyze.pyx index e32b435ebd0..6bc6018f77f 100644 --- a/src/python/espressomd/analyze.pyx +++ b/src/python/espressomd/analyze.pyx @@ -322,7 +322,7 @@ class Analysis: check_type_or_throw_except( length, 1, float, "length has to be a float") check_type_or_throw_except( - radius, 1, float, "radius has to be a floats") + radius, 1, float, "radius has to be a float") check_type_or_throw_except( bins_axial, 1, int, "bins_axial has to be an int") check_type_or_throw_except( diff --git a/src/python/espressomd/electrokinetics.pyx b/src/python/espressomd/electrokinetics.pyx index bdfecc1206a..120be571be3 100644 --- a/src/python/espressomd/electrokinetics.pyx +++ b/src/python/espressomd/electrokinetics.pyx @@ -267,7 +267,7 @@ IF ELECTROKINETICS: Parameters ---------- path : :obj:`str` - The path and vtk-file name the boundary is written to. + Path of the .vtk file the boundary is written to. """ lb_lbfluid_print_vtk_boundary(utils.to_char_pointer(path)) @@ -279,7 +279,7 @@ IF ELECTROKINETICS: Parameters ---------- path : :obj:`str` - The path and vtk-file name the velocity is written to. + Path of the .vtk file the velocity is written to. """ ek_lb_print_vtk_velocity(utils.to_char_pointer(path)) @@ -291,7 +291,7 @@ IF ELECTROKINETICS: Parameters ---------- path : :obj:`str` - The path and vtk-file name the LB density is written to. + Path of the .vtk file the LB density is written to. """ ek_lb_print_vtk_density(utils.to_char_pointer(path)) @@ -303,7 +303,7 @@ IF ELECTROKINETICS: Parameters ---------- path : :obj:`str` - The path and vtk-file name the electrostatic potential is written to. + Path of the .vtk file the electrostatic potential is written to. """ ek_print_vtk_potential(utils.to_char_pointer(path)) @@ -315,7 +315,7 @@ IF ELECTROKINETICS: Parameters ---------- path : :obj:`str` - The path and vtk-file name the LB force is written to. + Path of the .vtk file the LB force is written to. """ ek_print_vtk_lbforce_density(utils.to_char_pointer(path)) @@ -329,7 +329,7 @@ IF ELECTROKINETICS: Parameters ---------- path : :obj:`str` - The path and vtk-file name the electrostatic potential is written to. + Path of the .vtk file the electrostatic potential is written to. """ @@ -512,7 +512,7 @@ IF ELECTROKINETICS: Parameters ---------- path : :obj:`str` - The path and vtk-file name the species density is written to. + Path of the .vtk file the species density is written to. """ ek_print_vtk_density(self.id, utils.to_char_pointer(path)) @@ -524,7 +524,7 @@ IF ELECTROKINETICS: Parameters ---------- path : :obj:`str` - The path and vtk-file name the species flux is written to. + Path of the .vtk file the species flux is written to. """ ek_print_vtk_flux(self.id, utils.to_char_pointer(path)) diff --git a/src/python/espressomd/particle_data.pyx b/src/python/espressomd/particle_data.pyx index 78fad640b13..3ab03f7d85a 100644 --- a/src/python/espressomd/particle_data.pyx +++ b/src/python/espressomd/particle_data.pyx @@ -354,7 +354,7 @@ cdef class ParticleHandle: def __set__(self, _mass): IF MASS == 1: check_type_or_throw_except( - _mass, 1, float, "Mass has to be 1 floats") + _mass, 1, float, "Mass has to be 1 float") set_particle_mass(self._id, _mass) ELSE: raise AttributeError("You are trying to set the particle mass \ @@ -554,7 +554,7 @@ cdef class ParticleHandle: _out_direction, 3, float, "out_direction has to be 3 floats") for i in range(3): out_direction[i] = _out_direction[i] - set_particle_out_direction(self.id, out_direction) + set_particle_out_direction(self.id, out_direction) def __get__(self): self.update_particle_data() @@ -580,7 +580,7 @@ cdef class ParticleHandle: check_type_or_throw_except( _q, 1, float, "Charge has to be floats.") myq = _q - set_particle_q(self._id, myq) + set_particle_q(self._id, myq) def __get__(self): self.update_particle_data() @@ -758,7 +758,7 @@ cdef class ParticleHandle: _q, 3, float, "Dipole moment vector has to be 3 floats.") for i in range(3): myq[i] = _q[i] - set_particle_dip(self._id, myq) + set_particle_dip(self._id, myq) def __get__(self): self.update_particle_data() @@ -779,8 +779,8 @@ cdef class ParticleHandle: def __set__(self, _q): check_type_or_throw_except( - _q, 1, float, "Magnitude of dipole moment has to be 1 floats.") - set_particle_dipm(self._id, _q) + _q, 1, float, "Magnitude of dipole moment has to be 1 float.") + set_particle_dipm(self._id, _q) def __get__(self): self.update_particle_data() @@ -807,7 +807,7 @@ cdef class ParticleHandle: for i in range(3): ext_f[i] = _ext_f[i] - set_particle_ext_force(self._id, ext_f) + set_particle_ext_force(self._id, ext_f) def __get__(self): self.update_particle_data() @@ -842,7 +842,7 @@ cdef class ParticleHandle: for i in map(long, range(3)): if _fixed_coord_flag[i]: ext_flag |= _COORD_FIXED(i) - set_particle_fix(self._id, ext_flag) + set_particle_fix(self._id, ext_flag) def __get__(self): self.update_particle_data() @@ -874,7 +874,7 @@ cdef class ParticleHandle: for i in range(3): ext_t[i] = _ext_t[i] - set_particle_ext_torque(self._id, ext_t) + set_particle_ext_torque(self._id, ext_t) def __get__(self): self.update_particle_data() @@ -912,7 +912,7 @@ cdef class ParticleHandle: _gamma, 3, float, "Friction has to be 3 floats.") for i in range(3): gamma[i] = _gamma[i] - set_particle_gamma(self._id, gamma) + set_particle_gamma(self._id, gamma) def __get__(self): self.update_particle_data() @@ -940,7 +940,7 @@ cdef class ParticleHandle: def __set__(self, _gamma): check_type_or_throw_except( _gamma, 1, float, "Gamma has to be a float.") - set_particle_gamma(self._id, _gamma) + set_particle_gamma(self._id, _gamma) def __get__(self): self.update_particle_data() @@ -970,7 +970,7 @@ cdef class ParticleHandle: _gamma_rot, 3, float, "Rotational friction has to be 3 floats.") for i in range(3): gamma_rot[i] = _gamma_rot[i] - set_particle_gamma_rot(self._id, gamma_rot) + set_particle_gamma_rot(self._id, gamma_rot) def __get__(self): self.update_particle_data() @@ -991,7 +991,7 @@ cdef class ParticleHandle: def __set__(self, _gamma_rot): check_type_or_throw_except( _gamma_rot, 1, float, "gamma_rot has to be a float.") - set_particle_gamma_rot(self._id, _gamma_rot) + set_particle_gamma_rot(self._id, _gamma_rot) def __get__(self): self.update_particle_data() @@ -1014,7 +1014,7 @@ cdef class ParticleHandle: def __set__(self, _temp): check_type_or_throw_except( _temp, 1, float, "temp has to be a float.") - set_particle_temperature(self._id, _temp) + set_particle_temperature(self._id, _temp) def __get__(self): self.update_particle_data() @@ -1051,7 +1051,7 @@ cdef class ParticleHandle: rot += ROTATION_Y if _rot[2]: rot += ROTATION_Z - set_particle_rotation(self._id, rot) + set_particle_rotation(self._id, rot) def __get__(self): self.update_particle_data() @@ -1247,7 +1247,7 @@ cdef class ParticleHandle: swimming_particles_exist = True mpi_bcast_parameter(FIELD_SWIMMING_PARTICLES_EXIST) - set_particle_swimming(self._id, swim) + set_particle_swimming(self._id, swim) def __get__(self): self.update_particle_data() @@ -1583,7 +1583,7 @@ cdef class _ParticleSliceImpl: raise IndexError( "Negative start and end ids are not supported on ParticleSlice") - # We start with a full list of possible particle ids and then + # We start with a full list of possible particle ids and then # remove ids of non-existing particles id_list = np.arange(max_seen_particle + 1, dtype=int) id_list = id_list[slice_] diff --git a/src/python/espressomd/reaction_ensemble.pyx b/src/python/espressomd/reaction_ensemble.pyx index cc6c4f01471..64c7cd5c23b 100644 --- a/src/python/espressomd/reaction_ensemble.pyx +++ b/src/python/espressomd/reaction_ensemble.pyx @@ -358,12 +358,12 @@ cdef class ReactionAlgorithm: def change_reaction_constant(self, reaction_id, gamma): """ - Changes the reaction constant of a given reaction - (for the forward and backward reaction). - The reaction_id which is assigned to a reaction - depends on the order in which add_reaction() was called. - The 0th reaction has reaction_id 0, - the next added reaction needs to be adressed with reaction_id=1, etc. + Changes the reaction constant of a given reaction + (for the forward and backward reaction). + The ``reaction_id`` which is assigned to a reaction + depends on the order in which :meth:`add_reaction` was called. + The 0th reaction has ``reaction_id=0``, the next added + reaction needs to be addressed with ``reaction_id=1``, etc. Parameters ---------- @@ -384,14 +384,14 @@ cdef class ReactionAlgorithm: def delete_reaction(self, reaction_id): """ - Delete a reaction from the set of used reactions - (the forward and backward reaction). - The reaction_id which is assigned to a reaction - depends on the order in which add_reaction() was called. - The 0th reaction has reaction_id 0, - the next added reaction needs to be adressed with reaction_id=1, etc. - After the deletion of a reaction subsequent reactions - take the reaction_id of the deleted reaction. + Delete a reaction from the set of used reactions + (the forward and backward reaction). + The ``reaction_id`` which is assigned to a reaction + depends on the order in which :meth:`add_reaction` was called. + The 0th reaction has ``reaction_id=0``, the next added + reaction needs to be addressed with ``reaction_id=1``, etc. + After the deletion of a reaction subsequent reactions + take the ``reaction_id`` of the deleted reaction. Parameters ---------- @@ -434,7 +434,7 @@ cdef class ReactionEnsemble(ReactionAlgorithm): self._set_params_in_es_core() cdef class ConstantpHEnsemble(ReactionAlgorithm): - cdef unique_ptr[CConstantpHEnsemble] constpHptr + cdef unique_ptr[CConstantpHEnsemble] constpHptr def __init__(self, *args, **kwargs): self._params = {"temperature": 1, @@ -703,17 +703,17 @@ cdef class WangLandauReactionEnsemble(ReactionAlgorithm): def displacement_mc_move_for_particles_of_type(self, type_mc, particle_number_to_be_changed=1): """ - Performs an MC (Monte Carlo) move for particle_number_to_be_changed - particle of type type_mc. Positions for the particles are drawn - uniformly random within the box. The command takes into account the - Wang-Landau terms in the acceptance probability. + Performs an MC (Monte Carlo) move for ``particle_number_to_be_changed`` + particle of type ``type_mc``. Positions for the particles are drawn + uniformly and randomly within the box. The command takes into account + the Wang-Landau terms in the acceptance probability. If there are multiple types, that need to be moved, make sure to move them in a random order to avoid artefacts. For the Wang-Landau algorithm in the case of energy reweighting you would also need to move the monomers of the polymer with special moves for the MC part. Those - polymer configuration changing moves need to be implemented in the + polymer configuration-changing moves need to be implemented in the case of using Wang-Landau with energy reweighting and a polymer in the - system. Polymer configuration changing moves had been implemented + system. Polymer configuration-changing moves had been implemented before but were removed from ESPResSo. """ @@ -769,11 +769,13 @@ cdef class WidomInsertion(ReactionAlgorithm): def measure_excess_chemical_potential(self, reaction_id=0): """ - Measures the excess chemical potential in a homogeneous system for the provided reaction_id. - Please define the insertion moves first via calling the method add_reaction (with only product types specified). - Returns the excess chemical potential and the standard error for the - excess chemical potential. The error estimate assumes that your samples are - uncorrelated. + Measures the excess chemical potential in a homogeneous system for + the provided ``reaction_id``. Please define the insertion moves + first by calling the method :meth:`~ReactionAlgorithm.add_reaction` + (with only product types specified). + Returns the excess chemical potential and the standard error for + the excess chemical potential. The error estimate assumes that + your samples are uncorrelated. """ if(reaction_id < 0 or reaction_id > (deref(self.WidomInsertionPtr).reactions.size() + 1) / 2): # make inverse widom scheme (deletion of particles) inaccessible diff --git a/src/python/espressomd/script_interface.pyx b/src/python/espressomd/script_interface.pyx index 3eef2819c7f..693711188b1 100644 --- a/src/python/espressomd/script_interface.pyx +++ b/src/python/espressomd/script_interface.pyx @@ -368,7 +368,7 @@ def _unpickle_script_object_registry(so_name, params, items): so = _python_class_by_so_name[so_name](**params) for item in items: so.add(item) - return so + return so # Map from script object names to their corresponding python classes diff --git a/src/python/espressomd/system.pyx b/src/python/espressomd/system.pyx index cbcd31dd35c..e87f2932db6 100644 --- a/src/python/espressomd/system.pyx +++ b/src/python/espressomd/system.pyx @@ -194,7 +194,7 @@ cdef class System: odict['minimize_energy'] = System.__getattribute__( self, "minimize_energy") odict['thermostat'] = System.__getattribute__(self, "thermostat") - IF COLLISION_DETECTION: + IF COLLISION_DETECTION: odict['collision_detection'] = System.__getattribute__( self, "collision_detection") return odict diff --git a/src/python/espressomd/utils.pyx b/src/python/espressomd/utils.pyx index 960675dbbd8..22724a70801 100644 --- a/src/python/espressomd/utils.pyx +++ b/src/python/espressomd/utils.pyx @@ -317,6 +317,6 @@ def requires_experimental_features(reason): IF not EXPERIMENTAL_FEATURES: return modifier - ELSE: + ELSE: # Return original class return lambda x: x diff --git a/src/python/object_in_fluid/CMakeLists.txt b/src/python/object_in_fluid/CMakeLists.txt index 61f402195cd..367f505e8d9 100644 --- a/src/python/object_in_fluid/CMakeLists.txt +++ b/src/python/object_in_fluid/CMakeLists.txt @@ -27,7 +27,7 @@ foreach(auxfile ${python_AUX}) file(RELATIVE_PATH relpath ${CMAKE_CURRENT_SOURCE_DIR} ${auxfile}) get_filename_component(relpath ${relpath} DIRECTORY) string(CONCAT outputpath ${CMAKE_CURRENT_BINARY_DIR} "/" ${relpath} "/" ${filename}) - add_custom_command(TARGET object_in_fluid + add_custom_command(TARGET object_in_fluid COMMAND ${CMAKE_COMMAND} -E copy ${auxfile} ${outputpath} ) diff --git a/src/python/pypresso.cmakein b/src/python/pypresso.cmakein index fd074dc98ba..f3def790e36 100755 --- a/src/python/pypresso.cmakein +++ b/src/python/pypresso.cmakein @@ -1,6 +1,6 @@ #!/usr/bin/env sh # Copyright (C) 2010-2019 The ESPResSo project -# +# # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, diff --git a/testsuite/python/analyze_mass_related.py b/testsuite/python/analyze_mass_related.py index 3c38fdb855d..22643682d81 100644 --- a/testsuite/python/analyze_mass_related.py +++ b/testsuite/python/analyze_mass_related.py @@ -22,8 +22,9 @@ class AnalyzeMassRelated(ut.TestCase): - """Test analysis routines that involve particle mass. E.g., center of mass, inertia tensor, ... - Checks that virtual sites (which do not have meaningful mass, are skipped + """Test analysis routines that involve particle mass. E.g., center of mass, + inertia tensor, ... + Checks that virtual sites (which do not have meaningful mass) are skipped. """ diff --git a/testsuite/python/domain_decomposition.py b/testsuite/python/domain_decomposition.py index 5b3a5951f9a..442946007e7 100644 --- a/testsuite/python/domain_decomposition.py +++ b/testsuite/python/domain_decomposition.py @@ -65,12 +65,12 @@ def test_min_num_cells(self): def test_position_rounding(self): """This places a particle on the box boundary, - with parameteres that could cause problems with + with parameters that could cause problems with rounding.""" self.system.box_l = [50.0, 50.0, 50.0] self.system.cell_system.skin = 0.4 self.system.min_global_cut = 12.0 / 4.25 - self.system.part.add(pos=[25, 25, 0]) + self.system.part.add(pos=[25, 25, 0]) self.assertEqual(1, len(self.system.part)) diff --git a/testsuite/python/lb.py b/testsuite/python/lb.py index f2b7bec0237..b2f8d5c408d 100644 --- a/testsuite/python/lb.py +++ b/testsuite/python/lb.py @@ -245,10 +245,9 @@ def test_lb_node_set_get(self): self.system.actors.add(self.lbf) self.assertEqual(self.lbf.shape, - ( - int(self.system.box_l[0] / self.params["agrid"]), - int(self.system.box_l[1] / self.params["agrid"]), - int(self.system.box_l[2] / self.params["agrid"]))) + (int(self.system.box_l[0] / self.params["agrid"]), + int(self.system.box_l[1] / self.params["agrid"]), + int(self.system.box_l[2] / self.params["agrid"]))) v_fluid = np.array([1.2, 4.3, 0.2]) self.lbf[0, 0, 0].velocity = v_fluid diff --git a/testsuite/python/lb_boundary_volume_force.py b/testsuite/python/lb_boundary_volume_force.py index ab0b3fb3235..79f4c009730 100644 --- a/testsuite/python/lb_boundary_volume_force.py +++ b/testsuite/python/lb_boundary_volume_force.py @@ -30,10 +30,10 @@ """ -AGRID = 0.5 +AGRID = 0.5 EXT_FORCE = np.array([-.01, 0.02, 0.03]) VISC = 3.5 -DENS = 1.5 +DENS = 1.5 TIME_STEP = 0.05 LB_PARAMS = {'agrid': AGRID, 'dens': DENS, diff --git a/testsuite/python/lb_buoyancy_force.py b/testsuite/python/lb_buoyancy_force.py index 434814a3160..f6d5d2e0ad4 100644 --- a/testsuite/python/lb_buoyancy_force.py +++ b/testsuite/python/lb_buoyancy_force.py @@ -25,8 +25,8 @@ # Define the LB Parameters TIME_STEP = 0.01 -AGRID = 0.5 -KVISC = 4 +AGRID = 0.5 +KVISC = 4 DENS = 2 G = 0.08 BOX_SIZE = 18 * AGRID @@ -37,12 +37,12 @@ 'tau': TIME_STEP, 'ext_force_density': [0, DENS * G, 0]} # System setup -RADIUS = 6 * AGRID +RADIUS = 6 * AGRID class Buoyancy(object): """ - Tests buoyancy force on a sphere in a closed box of lb fluid and + Tests buoyancy force on a sphere in a closed box of lb fluid and the overall force balance """ @@ -91,7 +91,7 @@ def test(self): for b in self.system.lbboundaries: boundary_force += b.get_force() - fluid_nodes = count_fluid_nodes(self.lbf) + fluid_nodes = count_fluid_nodes(self.lbf) fluid_volume = fluid_nodes * AGRID**3 applied_force = fluid_volume * np.array(LB_PARAMS['ext_force_density']) diff --git a/testsuite/python/lb_momentum_conservation.py b/testsuite/python/lb_momentum_conservation.py index 87fef085918..f83ea4cfc49 100644 --- a/testsuite/python/lb_momentum_conservation.py +++ b/testsuite/python/lb_momentum_conservation.py @@ -21,9 +21,9 @@ # Define the LB Parameters TIME_STEP = 0.1 -AGRID = 1.0 +AGRID = 1.0 KVISC = 5 -DENS = 1 +DENS = 1 BOX_SIZE = 6 * AGRID F = 1. / BOX_SIZE**3 GAMMA = 15 @@ -37,7 +37,7 @@ class Momentum(object): """ - Tests momentum conservatoin for an LB coupled to a particle, where opposing + Tests momentum conservation for an LB coupled to a particle, where opposing forces are applied to LB and particle. The test should uncover issues with boundary and ghost layer handling. diff --git a/testsuite/python/lb_stokes_sphere.py b/testsuite/python/lb_stokes_sphere.py index f17c4b233d3..4386e416b5c 100644 --- a/testsuite/python/lb_stokes_sphere.py +++ b/testsuite/python/lb_stokes_sphere.py @@ -35,7 +35,7 @@ # Define the LB Parameters TIME_STEP = 0.5 AGRID = 0.6 -KVISC = 6 +KVISC = 6 DENS = 2.3 LB_PARAMS = {'agrid': AGRID, 'dens': DENS, diff --git a/testsuite/python/observables.py b/testsuite/python/observables.py index 40bbcb8d55f..b2822bfbb6c 100644 --- a/testsuite/python/observables.py +++ b/testsuite/python/observables.py @@ -38,7 +38,7 @@ def calc_com_x(system, x, id_list): class Observables(ut.TestCase): - N_PART = 200 + N_PART = 200 # Handle for espresso system system = espressomd.System(box_l=[10.0, 10.0, 10.0]) system.part.add( diff --git a/testsuite/python/p3m_electrostatic_pressure.py b/testsuite/python/p3m_electrostatic_pressure.py index c409d67299b..5e4c60036d9 100644 --- a/testsuite/python/p3m_electrostatic_pressure.py +++ b/testsuite/python/p3m_electrostatic_pressure.py @@ -125,7 +125,7 @@ def test_p3m_pressure(self): print("Tune skin: {}".format(self.system.cell_system.tune_skin( min_skin=0.0, max_skin=2.5, tol=0.05, int_steps=100))) - num_samples = 25 + num_samples = 25 pressure_via_volume_scaling = pressureViaVolumeScaling( self.system, self.kT) for _ in range(num_samples): diff --git a/testsuite/python/particle.py b/testsuite/python/particle.py index 621093f5f50..cf56ce1df22 100644 --- a/testsuite/python/particle.py +++ b/testsuite/python/particle.py @@ -365,7 +365,7 @@ def test_particle_slice(self): # Setting particle properties on a slice system.part[:5].pos = 0, 0, 0 - np.testing.assert_equal(system.part[:].pos, + np.testing.assert_equal(system.part[:].pos, [pos[i] if ids[i] >= 5 else [0, 0, 0] for i in np.argsort(ids)]) # Slice access via explicit list of ids diff --git a/testsuite/python/reaction_ensemble.py b/testsuite/python/reaction_ensemble.py index 848dad893df..bc88ad42813 100644 --- a/testsuite/python/reaction_ensemble.py +++ b/testsuite/python/reaction_ensemble.py @@ -191,7 +191,7 @@ def test_delete_reaction(self): RE = ReactionEnsembleTest.RE RE.add_reaction( gamma=1, - reactant_types=[5], + reactant_types=[5], reactant_coefficients=[1], product_types=[2, 3, 4], product_coefficients=[1, 4, 3], @@ -201,7 +201,7 @@ def test_delete_reaction(self): nr_reactions_after_deletion = len(RE.get_status()["reactions"]) self.assertEqual( 2, - nr_reactions_after_addition - nr_reactions_after_deletion, + nr_reactions_after_addition - nr_reactions_after_deletion, msg="the difference in single reactions does not match,\ deleting a full reaction (back and forward direction)\ should result in deleting two single reactions.") diff --git a/testsuite/python/tests_common.py b/testsuite/python/tests_common.py index 53b6fe5d8cb..9eb601d318e 100644 --- a/testsuite/python/tests_common.py +++ b/testsuite/python/tests_common.py @@ -621,7 +621,7 @@ def count_fluid_nodes(lbf): fluid_nodes = 0 for n in lbf.nodes(): - if not n.boundary: + if not n.boundary: fluid_nodes += 1 return fluid_nodes