Density functional study of fluorescent indicators for the intracellular determination of Ca2+ and Mg2+