First principles calculations of charge and spin density waves of root 3-adsorbates on semiconductors