Utilities

Utilities for NMRForMD package.

nmrformd.utilities.autocorrelation_function(data)

Calculate autocorrelation of one arrays using FFT.

Credit to the correlation function of MAICoS: https://maicos-devel.gitlab.io/maicos/index.html

data has the units of Angtroms**-3 output has the units of Angtroms**-6

Parameters

data : numpy.ndarray

Returns

np.ndarray

The autocorrelation function.

nmrformd.utilities.calculate_tau(J, gij, dim, integral=False, t=None, oneDarray=False)

Calculate correlation time using tau = 0.5 J(0) / G(0).

The unit are in picosecond. If only the 0th m order is used (isotropic=True), one value for tau is returned, if all three m orders are used (isotropic=False), three values for tau are returned.

nmrformd.utilities.find_nearest(data, value)

Find nearest value within an array.

Return the index of the nearest point.

Parameters

data : numpy.ndarray value : numpy.float

Returns ids : numpy.int

nmrformd.utilities.fourier_transform(data)

Calculate the Fourier transform of an array.

Wrap function that takes the data in real space with columns time, frequency and returns the data in Fourier space with columns frequency, signal

Units in : ps, signal Units out : MHz, s*signal

Parameters

data : numpy.ndarray

Returns

np.ndarray

Credit to the fourier transform function of MAICoS https://maicos-devel.gitlab.io/maicos/index.html