add cpp test, harmonic interaction, energy