Inelastic collisions between atoms I. General theoretical considerations