Linear combination of Gaussian-type orbitals-local-density-functional cluster studies of D-D interactions in titanium and palladium.