  We use recent developments in the framework of time dependent matrix product
state method (t-MPS) to compute the NMR relaxation rate $1/T_1$ for spin-1/2
chains under magnetic field and for different Hamiltonians (XXX, XXZ,
isotropically dimerized). We compute numerically the temperature dependence of
the $1/T_1$. We consider both gapped and gapless phases, and also the proximity
of quantum critical points. At temperatures much lower than the typical
exchange energy scale our results are in excellent agreement with analytical
results, such as the ones derived from the Tomonaga-Luttinger liquid (TLL)
theory and bosonization which are valid in this regime. We also cover the
regime for which the temperature $T$ is comparable to the exchange coupling. In
this case analytical theories are not appropriate but this regime is relevant
for various new compounds with exchange couplings in the range of tens of
Kelvin. For the gapped phases, either the fully polarized phase for spins
chains or the low magnetic field phase for the dimerized systems, we find an
exponential decrease in $\Delta/(k_BT)$ of the relaxation time and can compute
the gap $\Delta$. Close to the quantum critical point our results are in good
agreement with the a scaling behavior based on the existence of free
excitations.
