The presence of divalent cations during the nucleation of barium sulfate can alter the properties of the nucleated material. Here, a computational study of the effect of doping barium sulfate with divalent cations (Ca2+ and Sr2+) is presented. The calculations provide information on the energies and lattice parameter changes involved in the doping process and consequent lattice relaxation. Two methods were used to model the doping process. Firstly, the Mott-Littleton method was used to calculate the solution energy of a single dopant cation in the barite lattice, and secondly, the supercell method was used, which enabled varying dopant concentrations to be modelled. The results were in good agreement with available experimental data.