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

Rewrite particle serialization mechanism #4637

Merged
merged 3 commits into from
Dec 23, 2022
Merged

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Dec 21, 2022

Fixes #4633

Release 4.2.0 introduced a regression that causes checkpoint files to overwrite the particle quaternion/director by a unit vector pointing along the z direction, when the DIPOLES feature is part of the myconfig file. This leads to incorrect trajectories when reloading a simulation from a checkpoint file, if the particle director plays a role in the simulation (ex: relative virtual sites, Gay-Berne potential, anisotropic particles, active particles, etc.). Since the default myconfig file contains DIPOLES, most ESPResSo users are affected.

Description of changes:

  • write new checkpointing logic to avoid overwriting the particle director with the particle dipole moment
  • add checks to verify particle properties are correctly reloaded from a checkpoint file
  • fix regressions in the checkpointing tests

The Drude particle parameters were incorrect and created particles
with negative mass, which would produce NaN values during force
calculation, break the LB thermostat, and require workarounds when
setting up the H5MD writer.
@jngrad jngrad requested a review from reinaual December 22, 2022 13:34
@jngrad jngrad added the automerge Merge with kodiak label Dec 23, 2022
@kodiakhq kodiakhq bot merged commit 5284297 into espressomd:python Dec 23, 2022
@jngrad jngrad deleted the fix-4633 branch December 23, 2022 09:04
jngrad pushed a commit to jngrad/espresso that referenced this pull request Dec 23, 2022
Fixes espressomd#4633

Release 4.2.0 introduced a regression that causes checkpoint files to overwrite the particle quaternion/director by a unit vector pointing along the z direction, when the `DIPOLES` feature is part of the myconfig file. This leads to incorrect trajectories when reloading a simulation from a checkpoint file, if the particle director plays a role in the simulation (ex: relative virtual sites, Gay-Berne potential, anisotropic particles, active particles, etc.). Since the default myconfig file contains `DIPOLES`, most ESPResSo users are affected.

Description of changes:
- write new checkpointing logic to avoid overwriting the particle director with the particle dipole moment
- add checks to verify particle properties are correctly reloaded from a checkpoint file
- fix regressions in the checkpointing tests
jngrad pushed a commit to jngrad/espresso that referenced this pull request Dec 23, 2022
Fixes espressomd#4633

Release 4.2.0 introduced a regression that causes checkpoint files to overwrite the particle quaternion/director by a unit vector pointing along the z direction, when the `DIPOLES` feature is part of the myconfig file. This leads to incorrect trajectories when reloading a simulation from a checkpoint file, if the particle director plays a role in the simulation (ex: relative virtual sites, Gay-Berne potential, anisotropic particles, active particles, etc.). Since the default myconfig file contains `DIPOLES`, most ESPResSo users are affected.

Description of changes:
- write new checkpointing logic to avoid overwriting the particle director with the particle dipole moment
- add checks to verify particle properties are correctly reloaded from a checkpoint file
- fix regressions in the checkpointing tests
jngrad pushed a commit to jngrad/espresso that referenced this pull request Dec 23, 2022
Fixes espressomd#4633

Release 4.2.0 introduced a regression that causes checkpoint files to overwrite the particle quaternion/director by a unit vector pointing along the z direction, when the `DIPOLES` feature is part of the myconfig file. This leads to incorrect trajectories when reloading a simulation from a checkpoint file, if the particle director plays a role in the simulation (ex: relative virtual sites, Gay-Berne potential, anisotropic particles, active particles, etc.). Since the default myconfig file contains `DIPOLES`, most ESPResSo users are affected.

Description of changes:
- write new checkpointing logic to avoid overwriting the particle director with the particle dipole moment
- add checks to verify particle properties are correctly reloaded from a checkpoint file
- fix regressions in the checkpointing tests
kodiakhq bot added a commit that referenced this pull request Feb 24, 2023
Partial fix for #4614
Partial fix for #4617
Follow-up to #4637

Description of changes:
- reaction methods are now fully parallel and no longer rely on MpiCallbacks
- reaction methods are no longer entangled with the particle management code
- the Monte Carlo acceptance probability is now implemented in Python
- API changes:
   - it is no longer possible to change the reaction constant of an existing reaction with `gamma <= 0`
   - `ReactionAlgorithm.reaction()` now takes `steps` instead of `reaction_steps` as argument
   - when setting up a MC method with two or more reactions, a runtime error is raised if a reaction accidentally overwrites the default charge of a specific type with a different value
- under-the-hood changes:
   - the `particle_data.cpp` source file was removed
   - the `EspressoSystemStandAlone` class no longer relies on MpiCallbacks
   - frequency of cell system invalidation during Monte Carlo trial moves has been significantly reduced
   - the new Python interface of reaction methods is around 40% slower than the original C++ implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkpointing does not preserve particle director
3 participants