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.
Example
Problem
sys.part.by_id(1).dip_fldalways 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_fldobs.calculate()should return the same, correct dipole field value.