  We present a first-principles atomistic thermodynamics framework to describe
the structure, composition and segregation profile of an alloy surface in
contact with a (reactive) environment. The method is illustrated with the
application to a Ag3Pd(111) surface in an oxygen atmosphere, and we analyze
trends in segregation, adsorption and surface free energies. We observe a wide
range of oxygen adsorption energies on the various alloy surface
configurations, including binding that is stronger than on a Pd(111) surface
and weaker than that on a Ag(111) surface. This and the consideration of even
small amounts of non-stoichiometries in the ordered bulk alloy are found to be
crucial to accurately model the Pd surface segregation occurring in
increasingly O-rich gas phases.
