Adsorption of oxygen on Cu(100). I. Local structure and dynamics for two atomic chemisorption states