Calculation of spin-Hamiltonian parameters for Gd3+ doping isostructural series of rare-earth metal trichloride hexahydrates and trifluorides