-
Notifications
You must be signed in to change notification settings - Fork 187
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
Refactor bonded interactions storage #4350
Conversation
2a3f144
to
5ebc1aa
Compare
45cde8b
to
23cda43
Compare
Bonded interactions are now instantiated in the script interface. The core accesses these interactions via shared pointers. MPI communication is handled by the script interface. Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
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.
Thanks a lot! From my side, this is ready for merge.
Also fixes #4169 ? |
Thank you, Carl. This is a big step forward. I think we can merge this now, also to unblock related work. However, some improvements should still be considered:
|
Deduce BondedInteraction.valid_keys and BondedInteraction.required_keys from the script interface. Properly serialize IBM bonds. Refactor script interface __richcmp__ method. Remove throw statements in script interface callbacks.
Good point! The
This has to remain so for now, unfortunately. The This is not a good design, because each bond is serialized and deserialized multiple times. There is also the issue of the IBM bonds that are hiding the particles ids, and therefore cannot be checkpointed (this is already an issue in the current python branch). I tried to work around that by re-implementing the script interface hashmap in python (4f509f1), but this adds more complexity and doesn't work anyway, because IBM bonds as a side effect do a particle fetch in the constructor, but there is no guarantee that all particles in an IBM bond have already been loaded by the time the first particle in the bond is being loaded. We can probably revisit this design later, for example in the planned project to store bonds symmetrically on particles. |
Description of changes: - allow `@property`-setters in `ScriptInterfaceHelper` classes instead of silently skipping them - unit test the `ScriptInterfaceHelper` class in python - re-enable benchmark tests - fix regressions introduced by #4350 - store bond objects in the ObjectMap (see #4391 (comment)) - stop using the core global variable `this_node` in the script interface
Fixes #4225
Fixes #4377
Fixes #4169
Description of changes: