Effective spin Hamiltonian for magnetic clusters in presence of S mixing