TheochemUI / atomicDists

A C++ library for distance calculations
MIT License
1 stars 0 forks source link

RFC: Split further #6

Open HaoZeke opened 1 year ago

HaoZeke commented 1 year ago

It seems like there are still too many things in one library. Would be better to focus on a well defined set of atomic primitives, and then keep the distances generic (as here). So instead of special functions or handling here, construct classes with the "natural" difference operator defined such that vec1[i]-vec2[i] gives the right difference which can then be pushed through the relevant Lp norm.

HaoZeke commented 1 year ago

Along a similar line of thought, there is no need here for the matrix types and their helpers.

HaoZeke commented 1 year ago

In essence, a "difference" measure of two atomic configurations should be expressed perhaps as a type with the appropriate operator instead of as free functions operating on "atomic data structures".

This makes more sense in that the types can then be offloaded into more general optimizers which would otherwise need to be specialized to work with the atomic data.