<commit_before>.. _dynamic_structure_factor:

Dynamic structure factor
-------------------------

**This is the feature under testing.**

From Eq. (3.120) in the book "Thermal of Neutron Scattering", coherent
one-phonon dynamic structure factor is given as

.. math::

   S(\mathbf{Q}, \nu, \omega)^{+1\text{ph}} =
   \frac{k'}{k} \frac{N}{\hbar}
   \sum_\mathbf{q} |F(\mathbf{Q}, \mathbf{q}\nu)|^2
   (n_{\mathbf{q}\nu} + 1) \delta(\omega - \omega_{\mathbf{q}\nu})
   \Delta(\mathbf{Q-q}),

and

.. math::

   S(\mathbf{Q}, \nu, \omega)^{-1\text{ph}} =
   \frac{k'}{k} \frac{N}{\hbar}
   \sum_\mathbf{q} |F(\mathbf{Q}, \mathbf{q}\nu)|^2
   n_{\mathbf{q}\nu} \delta(\omega + \omega_{\mathbf{q}\nu})
   \Delta(\mathbf{Q+q}),

with

.. math::

   F(\mathbf{Q}, \mathbf{q}\nu) =
   \sum_j \sqrt{\frac{\hbar}{2 m_j \omega_{\mathbf{q}\nu}}}
   \bar{b}_j \exp\left(
   -\frac{1}{2} \langle |\mathbf{Q}\cdot\mathbf{u}(j0)|^2 \rangle
   \right) \mathbf{Q}\cdot\mathbf{e}(j, \mathbf{q}\nu).

where :math:`\mathbf{Q}` is the scattering vector defined as
:math:`\mathbf{Q} = \mathbf{k} - \mathbf{k}'` with incident
wave vector :math:`\mathbf{k}` and final wavevector
:math:`\mathbf{k}'`
following the book "Thermal of Neutron Scattering". For
inelastic neutron scattering, :math:`\bar{b}_j` is the average
scattering length over isotopes and spins. For inelastic X-ray
scattering, :math:`\bar{b}_j` is replaced by atomic form factor
:math:`f_j(\mathbf{Q})` and :math:`k'/k \sim 1`.<commit_msg>Update document for dynamic structure factor<commit_after>.. _dynamic_structure_factor:

Dynamic structure factor
-------------------------

**This is the feature under testing.**

From Eq. (3.120) in the book "Thermal of Neutron Scattering", coherent
one-phonon dynamic structure factor is given as

.. math::

   S(\mathbf{Q}, \nu, \omega)^{+1\text{ph}} =
   \frac{k'}{k} \frac{N}{\hbar}
   \sum_\mathbf{q} |F(\mathbf{Q}, \mathbf{q}\nu)|^2
   (n_{\mathbf{q}\nu} + 1) \delta(\omega - \omega_{\mathbf{q}\nu})
   \Delta(\mathbf{Q-q}),

and

.. math::

   S(\mathbf{Q}, \nu, \omega)^{-1\text{ph}} =
   \frac{k'}{k} \frac{N}{\hbar}
   \sum_\mathbf{q} |F(\mathbf{Q}, \mathbf{q}\nu)|^2
   n_{\mathbf{q}\nu} \delta(\omega + \omega_{\mathbf{q}\nu})
   \Delta(\mathbf{Q+q}),

with

.. math::

   F(\mathbf{Q}, \mathbf{q}\nu) =
   \sum_j \sqrt{\frac{\hbar}{2 m_j \omega_{\mathbf{q}\nu}}}
   \bar{b}_j \exp\left(
   -\frac{1}{2} \langle |\mathbf{Q}\cdot\mathbf{u}(j0)|^2 \rangle
   \right) \mathbf{Q}\cdot\mathbf{e}(j, \mathbf{q}\nu).

where :math:`\mathbf{Q}` is the scattering vector defined as
:math:`\mathbf{Q} = \mathbf{k} - \mathbf{k}'` with incident
wave vector :math:`\mathbf{k}` and final wavevector
:math:`\mathbf{k}'`
following the book "Thermal of Neutron Scattering". For
inelastic neutron scattering, :math:`\bar{b}_j` is the average
scattering length over isotopes and spins. For inelastic X-ray
scattering, :math:`\bar{b}_j` is replaced by atomic form factor
:math:`f_j(\mathbf{Q})` and :math:`k'/k \sim 1`.

Currently only :math:`S(\mathbf{Q}, \nu, \omega)^{+1\text{ph}}` is
calcualted with setting :math:`N k'/k = 1` and the physical unit is
:math:`\text{m}^2/\text{J}` when :math:`\bar{b}_j` is given in
Angstrom.
{'fraction_non_alphanumeric': 0.23314606741573032, 'fraction_numerical': 0.010299625468164793, 'mean_word_length': 3.6449275362318843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '796741', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1200, 'n_words': 290}