Skip to content

Shorten listed_forces call stack by introducing InteractionsManager

Joe Jordan requested to merge shorten-listed-forces-call-stack into master

This change shortens the call stack in listed_forces by completely removing calc_one_bond. In its place an InteractionsManager class is introduced which handles setting up the data for the three functions that were managed by calc_one_bond. This change leads to a small amount of code duplication between calcBondedForces and calc_listed_lambda. In future changes the InteractionsManager object could be extended to allow for unifying these branches. In the meantime, this change will allow for work to proceed semi-independently on unifying these functions and also on simplifying the do_pairs and calculateSimpleBond functions.

This change also increases the const correctness of the global_atom_index used in listed_forces.

Edited by Joe Jordan

Merge request reports