I have a molecular dynamics code and I want to model the reaction of O with Mg to form MgO at arbitrary temperatures. I am a little confused, however, because oxygen will exist as the diatomic molecule O2. This seems to mean that O2 molecules will have one type of interaction with a bonded oxygen, and another type of interaction with surrounding oxygens. In terms of interatomic potentials, how can both of these interactions be described, and how are they different? Is there a completely unique interatomic potential for the bonded oxygen and the non-bonded oxygens? I want to be able to consistently model O2 gas, breakup of O2, and interaction with Mg by incorporation of O into an MgO lattice.