def __init__(self,
                 mesh_phonon,
                 Qpoints,
                 T,
                 atomic_form_factor_func=None,
                 scattering_lengths=None,
                 freq_min=None,
                 freq_max=None):
        """

        Parameters
        ----------
        mesh_phonon: Mesh or IterMesh
            Mesh phonon instance that is ready to get frequencies and
            eigenvectors.
        Qpoints: array_like
            Q-points in any Brillouin zone.
            dtype='double'
            shape=(qpoints, 3)
        T: float
            Temperature in K.
        atomic_form_factor_func: Function object
            Function that returns atomic form factor (``func`` below):

                f_params = {'Na': [3.148690, 2.594987, 4.073989, 6.046925,
                                   0.767888, 0.070139, 0.995612, 14.1226457,
                                   0.968249, 0.217037, 0.045300],
                            'Cl': [1.061802, 0.144727, 7.139886, 1.171795,
                                   6.524271, 19.467656, 2.355626, 60.320301,
                                   35.829404, 0.000436, -34.916604],b|

                def get_func_AFF(f_params):
                    def func(symbol, Q):
                        return atomic_form_factor_WK1995(Q, f_params[symbol])
                    return func

        scattering_lengths: dictionary
            Coherent scattering lengths averaged over isotopes and spins.
            Supposed for INS. For example, {'Na': 3.63, 'Cl': 9.5770}.
        freq_min: float
            Minimum phonon frequency to determine wheather include or not.
        freq_max: float
            Maximum phonon frequency to determine wheather include or not. Only
            for Debye-Waller factor.

        """

        self._mesh_phonon = mesh_phonon
        self._dynamical_matrix = mesh_phonon.dynamical_matrix
        self._primitive = self._dynamical_matrix.primitive
        self._Qpoints = np.array(Qpoints)  # (n_q, 3) array

        self._func_AFF = atomic_form_factor_func
        self._b = scattering_lengths
        self._T = T
        if freq_min is None:
            self._fmin = 0
        else:
            self._fmin = freq_min
        if freq_max is None:
            self._fmax = None
        else:
            self._fmax = freq_max

        self._rec_lat = np.linalg.inv(self._primitive.get_cell())
        self.qpoints = None
        self._Gpoints = None
        self._set_qpoints()  # self.qpoints needed in self._set_phonon()
        self.frequencies = None
        self._eigvecs = None
        self._set_phonon()

        self._q_count = 0
        self._unit_convertion_factor = 1.0 / (AMU * (2 * np.pi * THz) ** 2)

        self.dynamic_structure_factors = np.zeros(self.frequencies.shape,
                                                  dtype='double', order='C')
def __init__ ( self , mesh_phonon , Qpoints , T , atomic_form_factor_func = None , scattering_lengths = None , freq_min = None , freq_max = None ) : self . _mesh_phonon = mesh_phonon self . _dynamical_matrix = mesh_phonon . dynamical_matrix self . _primitive = self . _dynamical_matrix . primitive self . _Qpoints = np . array ( Qpoints ) self . _func_AFF = atomic_form_factor_func self . _b = scattering_lengths self . _T = T if freq_min is None : self . _fmin = 0 else : self . _fmin = freq_min if freq_max is None : self . _fmax = None else : self . _fmax = freq_max self . _rec_lat = np . linalg . inv ( self . _primitive . get_cell ( ) ) self . qpoints = None self . _Gpoints = None self . _set_qpoints ( ) self . frequencies = None self . _eigvecs = None self . _set_phonon ( ) self . _q_count = 0 self . _unit_convertion_factor = 1.0 / ( AMU * ( 2 * np . pi * THz ) ** 2 ) self . dynamic_structure_factors = np . zeros ( self . frequencies . shape , dtype = 'double' , order = 'C' )
Parameters
        ----------
        mesh_phonon: Mesh or IterMesh
            Mesh phonon instance that is ready to get frequencies and
            eigenvectors.
        Qpoints: array_like
            Q-points in any Brillouin zone.
            dtype='double'
            shape=(qpoints, 3)
        T: float
            Temperature in K.
        atomic_form_factor_func: Function object
            Function that returns atomic form factor (``func`` below):

                f_params = {'Na': [3.148690, 2.594987, 4.073989, 6.046925,
                                   0.767888, 0.070139, 0.995612, 14.1226457,
                                   0.968249, 0.217037, 0.045300],
                            'Cl': [1.061802, 0.144727, 7.139886, 1.171795,
                                   6.524271, 19.467656, 2.355626, 60.320301,
                                   35.829404, 0.000436, -34.916604],b|

                def get_func_AFF(f_params):
                    def func(symbol, Q):
                        return atomic_form_factor_WK1995(Q, f_params[symbol])
                    return func

        scattering_lengths: dictionary
            Coherent scattering lengths averaged over isotopes and spins.
            Supposed for INS. For example, {'Na': 3.63, 'Cl': 9.5770}.
        freq_min: float
            Minimum phonon frequency to determine wheather include or not.
        freq_max: float
            Maximum phonon frequency to determine wheather include or not. Only
            for Debye-Waller factor.