Skip to content

Dipole field particle property updates only if an Observable is used #5095

Description

@stekajack

Example

solver = magnetostatics.DipolarDirectSumCpu(prefactor=1,n_replicas=2)
sys.magnetostatics.solver = solver
obs = espressomd.observables.ParticleDipoleFields(ids=[1,])
sys.integrator.run(EQUILIBRATION_INTERVAL)
print(sys.part.by_id(1).dip_fld)
print(obs.calculate())

Problem

  • sys.part.by_id(1).dip_fld always prints zeroes.
  • obs.calculate() prints the correct dipole field.

This behavior is inconsistent with the documentation, and is a regression compared to the initial implementation—where the particle property reflected the correct dipole field.

Expected Behavior

Both of the following:

  • sys.part.by_id(1).dip_fld
  • obs.calculate()

should return the same, correct dipole field value.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions