Thermodynamics of tetravalent thorium and uranium complexes from first-principles calculations.