  The dynamics of viscoelastic fluids are governed by a memory function,
essential yet challenging to compute, especially when diffusion faces boundary
restrictions. We propose a computational method that captures memory effects by
analyzing the time-correlation function of the pressure tensor, a viscosity
indicator, through the Stokes-Einstein equation's analytic continuation into
the Laplace domain. We integrate this equation with molecular dynamics (MD)
simulations to derive necessary parameters. Our approach computes NMR
lineshapes using a generalized diffusion coefficient, accounting for
temperature and confinement geometry. This method directly links the memory
function with thermal transport parameters, facilitating accurate NMR signal
computation for non-Markovian fluids in confined geometries.
