Work function variation in metallic atom chemisorption