Effect of atomic relaxations on magnetic properties of adatoms and small clusters