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

Abstract particle bond handling #5046

Open
RudolfWeeber opened this issue Feb 18, 2025 · 0 comments
Open

Abstract particle bond handling #5046

RudolfWeeber opened this issue Feb 18, 2025 · 0 comments

Comments

@RudolfWeeber
Copy link
Contributor

Functions that deal with bonds (force/eneryg calculation, bond breakgge, collisin deteciotn, cluster analysis) should not know about how exactly the bond info is stored. See #4390 for background.

We allow for differnet storage formats for pair bonds and multi-partner bonds (#4390)

Steps

Implement storage-agnostic interface functions

in src/core/bonds.cpp/hpp (to be created). All of these are parallel calls. They will

  • for now: create the respective BondView for the primary particle (first particle id in pair or multi-particle bonds) and insert/remove/find it in the Particle.bonds() of the primary particle (which is a BondList, i.e., a container for BondView)

  • in the future: Create approprate bond views (which differ for all involved particles) and add/remove/find tehm on the p.bonds() for all involved particles

    • add_pair_bond(bond_id, p1_id, p2_id)
    • remove_pair_bond()
    • bond pair_bond_exists()
    • `add_multi_particle_bond(int bond_id, vector involved_particle_ids)
    • remove_...
    • ..._exists
    • for_each_bond(particle, pair_bond_kernel, multi_bond_kernel);. where the kernels take
      • for pair bonds: bond_id, p1_id, p2_id
      • for multi particle bonds bond_id, vector<int> involved_particle_ids
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