A theoretical procedure to determine interaction energies in complex systems: application to the oxygen-iron tetraazaporphyrin interaction