An atoms-in-molecules model of bond energy distributions in polyatomic molecules