Skip to content

Commit

Permalink
Remove 'Current' observable. (#3973)
Browse files Browse the repository at this point in the history
Fixes #3679
  • Loading branch information
kodiakhq[bot] authored Oct 26, 2020
2 parents fbbddd2 + d95baff commit 0156f3d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 80 deletions.
2 changes: 0 additions & 2 deletions doc/sphinx/analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,6 @@ documentation for all available observables in :mod:`espressomd.observables`.

- Observables working on a given set of particles and returning reduced quantities:

- :class:`~espressomd.observables.Current`: Total current of the system

- :class:`~espressomd.observables.DipoleMoment`: Total electric dipole moment of the system obtained based on unfolded positions

- :class:`~espressomd.observables.MagneticDipoleMoment`: Total magnetic dipole moment of the system based on the :attr:`espressomd.particle_data.ParticleHandle.dip` property.
Expand Down
46 changes: 0 additions & 46 deletions src/core/observables/Current.hpp

This file was deleted.

20 changes: 0 additions & 20 deletions src/python/espressomd/observables.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,26 +113,6 @@ class ComVelocity(Observable):
_so_name = "Observables::ComVelocity"


@script_interface_register
class Current(Observable):

"""Calculates the electric current for particles with given ids.
Output format: :math:`\\left(\\sum_i q_i v^x_i, \\sum_i q_i v^y_i, \\sum_i q_i v^z_i, \\right)`
Parameters
----------
ids : array_like of :obj:`int`
The ids of (existing) particles to take into account.
Returns
-------
(3,) :obj:`ndarray` of :obj:`float`
"""
_so_name = "Observables::Current"


@script_interface_register
class DensityProfile(ProfileObservable):

Expand Down
2 changes: 0 additions & 2 deletions src/script_interface/observables/initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "core/observables/ComPosition.hpp"
#include "core/observables/ComVelocity.hpp"
#include "core/observables/CosPersistenceAngles.hpp"
#include "core/observables/Current.hpp"
#include "core/observables/CylindricalDensityProfile.hpp"
#include "core/observables/CylindricalFluxDensityProfile.hpp"
#include "core/observables/CylindricalLBFluxDensityProfileAtParticlePositions.hpp"
Expand Down Expand Up @@ -127,7 +126,6 @@ void initialize(Utils::Factory<ObjectHandle> *om) {
REGISTER_PID_OBS(ParticleAngularVelocities);
REGISTER_PID_OBS(ParticleBodyAngularVelocities);
#endif
REGISTER_PID_OBS(Current);
#ifdef ELECTROSTATICS
REGISTER_PID_OBS(DipoleMoment);
#endif
Expand Down
10 changes: 0 additions & 10 deletions testsuite/python/observables.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,6 @@ def test_pressure_tensor(self):
err_msg="Pressure tensor from analysis and observable did not agree",
decimal=9)

@utx.skipIfMissingFeatures('ELECTROSTATICS')
def test_current(self):
obs_data = espressomd.observables.Current(
ids=self.system.part[:].id).calculate()
part_data = self.system.part[:].q.dot(
self.system.part[:].v)
self.assertEqual(obs_data.shape, part_data.shape)
np.testing.assert_array_almost_equal(
obs_data, np.copy(part_data), err_msg="Data did not agree for observable 'Current'", decimal=9)

@utx.skipIfMissingFeatures('ELECTROSTATICS')
def test_dipolemoment(self):
obs = espressomd.observables.DipoleMoment(ids=self.system.part[:].id)
Expand Down

0 comments on commit 0156f3d

Please sign in to comment.