Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'Current' observable. #3973

Merged
merged 1 commit into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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