From 241388c51dec2e0f35c0927dbe655c75db50ab11 Mon Sep 17 00:00:00 2001 From: Chenxing Luo Date: Tue, 17 Oct 2023 22:19:56 -0400 Subject: [PATCH] Fixing some depreciated warning related to escaping character --- cij/core/phonon_contribution/nonshear.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cij/core/phonon_contribution/nonshear.py b/cij/core/phonon_contribution/nonshear.py index 1d158fd..e6e80d0 100644 --- a/cij/core/phonon_contribution/nonshear.py +++ b/cij/core/phonon_contribution/nonshear.py @@ -26,7 +26,7 @@ def average_over_modes(amount: numpy.ndarray, q_weights: numpy.ndarray) -> numpy :param amount: :math:`X_{qm}` :param q_weights: :math:`q`-point multiplicities :math:`w_q` - :returns: Sum :math:`\\bar X = \sum_{qm} X_{qm} w_q` + :returns: Sum :math:`\\bar X = \\sum_{qm} X_{qm} w_q` ''' dims = len(amount.shape) _amount = amount.copy() @@ -117,7 +117,7 @@ def Q(self) -> numpy.ndarray: '''Value of expression :math:`Q_{qm}(T, V)` .. math:: - Q_{qm}(T, V) = \\frac{\hbar\omega_{qm}(V)}{k_\\text{B}T} + Q_{qm}(T, V) = \\frac{\\hbar\\omega_{qm}(V)}{k_\\text{B}T} ''' return h_div_k * (self.freq_array[nax,:,:,:] / self.t_array[:,nax,nax,nax]) @@ -126,9 +126,9 @@ def Q1(self) -> numpy.ndarray: '''Value of expression .. math:: - \\frac{Q_{qm}(T, V)}{\exp Q_{qm}(T, V) - 1} + \\frac{Q_{qm}(T, V)}{\\exp Q_{qm}(T, V) - 1} - where :math:`Q_{qm}(T, V) = \\frac{\hbar\omega_{qm}(V)}{k_\\text{B}T}` + where :math:`Q_{qm}(T, V) = \\frac{\\hbar\\omega_{qm}(V)}{k_\\text{B}T}` ''' return self.Q / (numpy.exp(self.Q) - 1) @@ -137,9 +137,9 @@ def Q2(self) -> numpy.ndarray: '''Value of expression .. math:: - \\frac{Q_{qm}^2(T, V) \exp Q_{qm}(T, V) }{(\exp Q_{qm}(T, V) - 1) ^ 2} + \\frac{Q_{qm}^2(T, V) \\exp Q_{qm}(T, V) }{(\\exp Q_{qm}(T, V) - 1) ^ 2} - where :math:`Q_{qm}(T, V) = \\frac{\hbar\omega_{qm}(V)}{k_\\text{B}T}` + where :math:`Q_{qm}(T, V) = \\frac{\\hbar\\omega_{qm}(V)}{k_\\text{B}T}` ''' return self.Q ** 2 * numpy.exp(self.Q) / (numpy.exp(self.Q) - 1) ** 2 @@ -152,10 +152,10 @@ def zero_point_contribution(self) -> numpy.ndarray: .. math:: c^{\\text{zpm}}_{iiii} - = \\frac{\hbar}{2V}\\sum_{qm} + = \\frac{\\hbar}{2V}\\sum_{qm} \\left(\\frac{\\partial^2\\omega_{qm} (V)}{\\partial e_{ii} ^ 2}\\right) - = \\frac{\hbar}{2V}\\sum_{qm} - \\left(\\gamma^{ii}_{qm}\\gamma^{ii}_{qm} - \\frac{\\partial \\gamma^{ii}_{qm}}{\\partial e_{ii}} + \gamma^{ii}_{qm}\\right) \\omega_{qm} + = \\frac{\\hbar}{2V}\\sum_{qm} + \\left(\\gamma^{ii}_{qm}\\gamma^{ii}_{qm} - \\frac{\\partial \\gamma^{ii}_{qm}}{\\partial e_{ii}} + \\gamma^{ii}_{qm}\\right) \\omega_{qm} ''' h = units.Quantity(_h, units.J * units.m).to(units.rydberg * units.cm).magnitude return h / 2 / self.v_array \ @@ -274,9 +274,9 @@ def zero_point_contribution(self): .. math:: c^{\\text{zpm}}_{iijj} - = \\frac{\hbar}{2V}\\sum_{qm} + = \\frac{\\hbar}{2V}\\sum_{qm} \\left(\\frac{\\partial^2\\omega_{qm} (V)}{\\partial e_{ii} \\partial e_{jj}}\\right) - = \\frac{\hbar}{2V}\\sum_{qm} + = \\frac{\\hbar}{2V}\\sum_{qm} \\left(\\gamma^{ii}_{qm}\\gamma^{jj}_{qm} - \\frac{\\partial \\gamma^{ii}_{qm}}{\\partial e_{jj}}\\right) \\omega_{qm} ''' h = units.Quantity(_h, units.J * units.m).to(units.rydberg * units.cm).magnitude