-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add thermostat/integrator compatibility checks #3880
Conversation
@@ -709,6 +710,7 @@ cdef class Thermostat: | |||
mpi_bcast_parameter(FIELD_TEMPERATURE) | |||
|
|||
IF STOKESIAN_DYNAMICS: | |||
@AssertThermostatType(THERMO_SD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is no combination of SD with any other thermostat allowed?
is no combination of SD with any other thermostat allowed?
I think so.
|
and why? |
That's how SD works. It puts Brownian fluctuations on all particles because it's not only a hydrodynamics solver, but also a momentum-conserving thermostat. Just like you wouldn't put a Langevin thermostat on particles coupled to a thermalized LB, you shouldn't combine SD with other thermostats. |
yeah, but you can for example combine LB + DPD because both conserve momentum and add fluctuations on the particles |
The SD integrator choses velocities randomly from the Maxwell distribution. I don’t see how this interacts safely with anything else which is based on an equation of motion including inertia.
That aside: safety first. If someone convinces us of a safe combination, it can be enabled then.
|
well, it should be documented then. we have to tell the user why we do not allow the combination (even if the reason is that we don't know if works). |
Thanks JN. This fixes that both thermostats could be enabled, which is not known to correctly work (yet). However, I still can combine the SD integrator and the Langevin thermostat (and possibly other thermostats, too). Should this be allowed? I think that maybe, the SD integrator should only be allowed to work with the SD thermostat (and the other way round is obvious, because the SD thermostat depends on the SD intergator). |
Thanks JN. This fixes that both thermostats could be enabled, which is not known to correctly work (yet). However, I still can combine the SD integrator and the >Langevin thermostat (and possibly other thermostats, too). Should this be allowed?
No, it shoudn’t. That should probably be checked in on_integration_start().
The underlying issue is that in Espresso, thermostats and integrators are independent, whereas that’s not so in physics…
|
It would be an odd combination, but probably not outright wrong. It's somewhat like combining an unthermalized LB with a Langevin thermostat -- do we currently disallow that? |
AFAIK the integrator and thermostat classes don't know about each other in the python interface. |
Currently none of the combination restrictions are documented. This is essentially an allowlist of combinations that are known to work together, which gets expanded whenever we have hard data confirming that two thermostats work together, in opposition to a denylist that would prevent specific combinations for which we can justify they produce wrong physics. I'll write something in the docs to explain this policy. |
Yes. It needs to be done in the core, e.g., in |
There are more issues:
|
The Brownian integrator cannot run without the Brownian thermostat.
Fixes espressomd#3850 Description of changes: - add missing thermostat combination decorators - document policy on allowed thermostat combinations
Fixes #3850
Description of changes: