Cohesive energy curves contain the energetics of atomic interactions in crystalline materials. These can be obtained from density functional theory calculations using in silico lattice expansions. Decomposing these curves into the different interatomic potential energy contributions is valuable to extract pair-potential interactions, which can later be used for molecular mechanics or molecular dynamics simulations. In this work, we present and discuss a generalized method for the extraction of pairwise interaction potentials from the inversion of cohesive energy curves. We use detailed geometrical descriptions of the atomic interactions to construct a list of atomic displacements and degeneracies, which is modified using a Gaussian elimination process to isolate the pairwise interactions. The proposed method provides a more general framework for cohesive energy inversions that is robust and accurate for systems well-described by pairwise potential interactions. Results show very good reproduction of cohesive energies with the same or better accuracy than current approaches. An important advantage of this method is its application to systems with fixed internal constraints such as local rigid body structures. Specific examples for the extraction of heteroatomic interactions in metal hexaboride systems are illustrated.