The structure and phase behavior of electrodeposited halides on single-crystal metal surfaces