Formation and properties of metal–oxygen atomic chains