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

Decide api for system-wide propagation setup #4953

Open
RudolfWeeber opened this issue Jul 16, 2024 · 0 comments
Open

Decide api for system-wide propagation setup #4953

RudolfWeeber opened this issue Jul 16, 2024 · 0 comments

Comments

@RudolfWeeber
Copy link
Contributor

Background

  • introduce better control over propagation in ESPResSo
  • avoid the currently somewhat arbitrary split of funcitonality between integrators and theremostats. In the end, users need to control the "equation of motion"
  • the first part of this was to allow a per-particle override of the system-wide default. This was merged end of 2023.
  • now, per-particle selection of propagation is quite different from system wide setup.
  • the goal is to have a consistent API for system-wide setup of propagation, i.e., the default that applies to all particles that do not explicitly override it.

Possible API

These are examples for a suggested API for system wide propagation setup, using the same Propagation objects that would be used to control propagation on the particle level.

from espressomd import Propagation

# Langevin for translation and rotation
system.propagation.set_params(
    default=Propagation.TRANS_LANGVEVIN || Propagation.ROT_LANGEVIN,
    kT=1,
    gamma_trans = 1,
    gamma_rot=2)

# LB coupling for translation and Langevin for rotation
system.propagation.set_params(
    default=Propagation.TRANS_LB || Propagation.ROT_LANGEVIN,
    kT=1,
    gamma_trans = 1,
    gamma_rot=2)

# ovverride for an individual particle

system.lb = LBFluidWalberla(...)
lb_tracer = system.part.add(pos=..., propagation=Propagation.LB_TRACER)

system.propagation.run(10)

One drawback is that it is necessary to import the Propagation class in all simulation scripts. On the other hand, then, the API for indidividual particles and the system-default are consistent.

@RudolfWeeber RudolfWeeber added this to the ESPResSo 4.3.0 milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants