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

Allow for several systems in a single Python instance #4613

Open
5 tasks
RudolfWeeber opened this issue Nov 26, 2022 · 0 comments
Open
5 tasks

Allow for several systems in a single Python instance #4613

RudolfWeeber opened this issue Nov 26, 2022 · 0 comments

Comments

@RudolfWeeber
Copy link
Contributor

Goal

Several instances of espressomd.system should be createable in a single Python script.

Benefits

  • The ML group needs this for optimizatnio tasks
  • Stuff like Gibbs ensemble or replica exchange could be written down with standard Python theading and without a contorl script talking to two or more other scripts
  • The test suite would run much faster, since a lot of the runtime is consumed by the numpy/scipy modules being loaded over and over again
  • Getting rid of the globals in the core, which prevent this at present, is a goal in it self

Steps

  • Introduce a system class in the core mirroring espressomd.System

    Note: This can initially be made globally accessible to ease the transition

  • Bundle the remaining "clusters of globals" into strucutes. These are mainly a bunch of globals relating to propagation and equaiton of motion (thermostat)

  • Get rid of mpi callbacks, by moving the functionality to the script interface.

    The big ones are:

    • Setting/getting particle properties (this is in script interface, but uses the mpi callbacks)
    • The reaction methods, which make use of mpi callbacks. They have to be either fully parallelized or moved to Python
kodiakhq bot added a commit that referenced this issue Nov 20, 2023
Description of changes:
- encapsulate several global variables inside the `System` class
   - new members: cell_system, integrator, electrostatics, magnetostatics, analysis, comfixed, galilei, bond_breakage
   - required for #4613
   - partial fix for #2628
- make energy/pressure/force calculation functions members of the `System` class
- fully encapsulate event hooks in the `System` class
- simplify checkpointing of the `System` class
- remove `EspressoSystemStandAlone` class
- API changes:
   - `espressomd.galilei.GalileiTransform` is now a member of the `System` class, accessible via `system.galilei`
@RudolfWeeber RudolfWeeber added this to the ESPResSo 4.3.0 milestone Jul 16, 2024
kodiakhq bot added a commit that referenced this issue Aug 1, 2024
Fixes #4821
Partial fix for #2628
Partial fix for #4613

Description of changes:
- encapsulate non-bonded interactions, bonded interactions, collision detection, particle list, cluster structure analysis, object-in-fluid, immersed boundaries, auto-update accumulators, constraints, MPI-IO, MMM1D
- API changes:
   - `Mpiio` and `ClusterStructure` now take a system object as argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant