fcdmft.ac.interface module#
- class fcdmft.ac.interface.AC_Method(*args, **options)[source]#
Bases:
ABCBase class for AC methods
- Attributes:
- shape
tuple Shape of the data array that was passed to ac_fit, excluding the frequency axis.
- shape
Methods
ac_eval(freqs[, axis])After you call ac_fit, you can call this function to evaluate the AC at
ac_fit(data, omega[, axis])The kernel of the AC method.
diagonal([axis1, axis2])Create a new instance of the AC method with only the diagonal elements
save(chkfilename[, dataname])Save the AC object and coefficients to an HDF5 file.
- abstract ac_eval(freqs: ndarray, axis: int = -1)[source]#
- After you call ac_fit, you can call this function to evaluate the AC at
arbitrary complex frequencies.
- Parameters:
- freqs
np.ndarray[np.complex128] | complex 1D array of complex frequencies, or a single complex frequency
- axis
int, optional Indicates which axis of the output array should correspond to the frequency axis, by default -1. Example: if you want (nmo, nmo, nfreq), call ac_eval(freqs, axis=-1)
if you want (nfreq, nmo, nmo), call ac_eval(data, freqs, axis=0)
If freqs is a scalar, the output shape will be the same as the input data shape.
- freqs
- Returns:
np.ndarrayInterpolated/approximated values at the new complex frequencies
- abstract ac_fit(data: ndarray, omega: ndarray, axis: int = -1)[source]#
The kernel of the AC method. This function should be implemented in the derived class.
- Parameters:
- data
np.ndarray Data to be fit, e.g. self energy
- omega
np.ndarray[np.double] 1D imaginary frequency grid
- axis
int, optional Indicates which axis of the data array corresponds to the frequency axis, by default -1. Example: data.shape is (nmo, nmo, nw), call ac_fit(data, omega, axis=-1)
data.shape is (nw, nmo, nmo), call ac_fit(data, omega, axis=0)
- data