-
Notifications
You must be signed in to change notification settings - Fork 203
Description
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_......_existsfor_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
- for pair bonds: