principia_materia.phonon_id.fourier_interpolation module
- class principia_materia.phonon_id.fourier_interpolation.FourierInterpolation(structure, supa, order, pg='C1', tol=1e-06)
- Bases: - DynamicTensors- Generic Fourier interpolation of phonon interactions at arbitrary order. - Supports either dynamic tensors or force constants tensors as input, if dynamic tensors are provided, Fourier transform to force constants tensors and then perform WS cell packing; if force constants tensors are provided, skip the Fourier tranformation step. - Parameters:
- structure (CrystalFTG object or a structure file of CrystalFTG) – The crystal structure. 
- supa (array of int, shape(dim, dim)) – The supercell matrix. 
- order (int) – Order of the dynamic tensor. 
- pg (str or PointGroup object) – The point group. 
- tol (float, optional, default to 1.0E-6) – Error tolerence. 
 
 - analytic_derivative_dynamic_tensor(Qpoints)
- Computes analytic derivatives of dynamic tensors with respect to Q-point. - The short range part is calculated as as following. \[\frac{\partial\hat D_{\mathbf{K}}}{\partial K_\alpha} = \sum_{\mathbf{y}} \imag T_\alpha e^{\imag \mathbf{K} \cdot \mathbf{y}\hat a} \hat \Phi_{\mathbf{y}}\]
 - copy()
- Make a copy - Returns:
- new – A copy of the object. 
- Return type:
 
 - fourier_transform()
- Fourier transform dynamic tensors to real space force constants tensor. 
 - classmethod from_dynamic_tensors(dynamic_tensors)
 - get_Phi()
- Get force constants tensors of FTG. 
 - get_Phi_WS_at_Tpoint(Tpoint)
- Get the force constants tensor at T-point that is shifted within the WS cell. 
 - get_Phi_WS_dict()
- Get all the force constants tensors that are shifted within the WS cell of the FTG. - Returns:
- Phi_WS – The force constants tensors that are shifted within the WS cell of the FTG. 
- Return type:
- OrderedDict with nested tuples of int as keys and array of complex as values 
 
 - get_Tindex(Tpoints)
- Similar to the indexing system of the Q-points, compute index of T-points - All T-points in a set FTG have consecutive indices from 0 to n_Tpoints - 1, thus we can create our own hash table for Phi. - Parameters:
- Tpoints (array of int, shape(N, order, dim)) – An array of T-points to compute indices for. 
 
 - get_Tpoints()
- Get T-points of the FTG. 
 - interpolate_Qpoint(Qpoints, q_direction=None)
- Interpolate Phi to arbitrary Q-point(s) in reciprocal space. 
 - prepend_hiden_t(Tpoints)
- Prepend hidden t-point to T-points. - For a T-point at given order, the first t-point is always (0, 0, 0), this it can be omitted and referred to as the hidden t-point. This method prepend the hidden t-point back. - Parameters:
- Tpoints (array of int, shape(N, order - 1, dim)) – T-points without the hidden t-point. 
 
 - set_D(Qpoints, D)
- Set dynamic tensors. - If force constants tensors are set, dynamic tensors cannot be set. 
 - set_Phi(Tpoints, Phi)
- Set force constants tensor. - If dynamic tensors are set, force constants tensors can only obtained by Fourier transform. - Parameters:
- Tpoints (array of int, shape(N, order - 1, dim) or shape(N, order, dim)) – T-points of FTG. Can be the full T-points or the T-points without the hidden t-point. 
- Phi (array of real or complex, shape(N, ndof, ..., ndof), shape(N, ndof, ..., ndof, m)) – Force constants tensors in the same order as the Tpoints. Can be trivial force constants tensors or vectorized tensors with the last axis being the vector axis. 
 
 
 - set_Wigner_Seitz_map()
- Computes the WS map. 
 - set_dipoledipole_contribution()
- Set Dipole-Dipole contribution for Fourier Interpolation. - At second order, the dipole-dipole contribution for fourier interpolation is treated separately, the code computes the dipole-dipole terms on the FTG then transform to real space into a dummy Phi. It will be subtracted out of the regular fource constants when constructing Phi_WS. 
 - set_irreducible_D(D)
- Set dynamic tensors of the irreducible Q-points. 
 
- principia_materia.phonon_id.fourier_interpolation.get_FourierInterpolation_from_hdf5(filename, tol=1e-06)
- Load FourierInterpolation from HDF5 file. 
- principia_materia.phonon_id.fourier_interpolation.get_FourierInterpolation_hdf5_wrapper()
- HDF5 data wrapper for FourierInterpolation. 
- principia_materia.phonon_id.fourier_interpolation.save_FourierInterpolation_to_hdf5(obj, h5file='fourier_interpolation.hdf5', overwrite=False)
- Save FourierInterpolation data into HDF5 file. - Parameters:
- obj (FourierInterpolation) – A FourierInterpolation object. 
- h5file (str or h5py.File/h5py.Group obejct, optional, default to "fourier_interpolation.hdf5") – Path to a HDF5 file or a h5py.File/h5py.Group object. 
- overwrite (bool, optional, default to False) – When the file exists, whether to replace the content of the file with the content to be saved.