You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Coulomb/dipoles NpT sanity checks are executed only once, when setting up the NpT integrator. Adding a P3M actor before setting a rectangular NpT integrator fails loudly. But if we add a P3M actor after setting up a rectangular NpT, no error is raised.
box_l: [ 6. 18.34 18.34]
Traceback (most recent call last):
File "npt.py", line 18, in <module>
system.integrator.set_isotropic_npt(**npt_params) # fails
File "integrate.pyx", line 92, in espressomd.integrate.IntegratorHandle.set_isotropic_npt
File "integrate.pyx", line 147, in espressomd.integrate.Integrator.__init__
File "integrate.pyx", line 364, in espressomd.integrate.VelocityVerletIsotropicNPT._set_params_in_es_core
RuntimeError: If electrostatics is being used you must use the cubic box npt.
This can be fixed by moving the sanity checks from the setter to the callback.
The text was updated successfully, but these errors were encountered:
Fixes#4139
Description of changes:
- gather NpT sanity checks in a function that is called at integration start
- the combination P3M + rectangular NpT now generates an exception regardless of the order in which the system is set up
The Coulomb/dipoles NpT sanity checks are executed only once, when setting up the NpT integrator. Adding a P3M actor before setting a rectangular NpT integrator fails loudly. But if we add a P3M actor after setting up a rectangular NpT, no error is raised.
MWE:
Output:
This can be fixed by moving the sanity checks from the setter to the callback.
The text was updated successfully, but these errors were encountered: