consistently apply \vec{} macro to only the first text/character and not subscripts

This commit is contained in:
Axel Kohlmeyer
2023-04-12 03:36:21 -04:00
parent bfe40a324a
commit 8a3d0caffd
6 changed files with 61 additions and 61 deletions

View File

@ -28,15 +28,15 @@ The *dipole* angle style is used to control the orientation of a dipolar
atom within a molecule :ref:`(Orsi) <Orsi>`. Specifically, the *dipole* angle
style restrains the orientation of a point dipole :math:`\mu_j` (embedded in atom
:math:`j`) with respect to a reference (bond) vector
:math:`\vec{r_{ij}} = \vec{r_i} - \vec{r_j}`, where :math:`i` is another atom of
:math:`\vec{r}_{ij} = \vec{r}_i - \vec{r}_j`, where :math:`i` is another atom of
the same molecule (typically, :math:`i` and :math:`j` are also covalently bonded).
It is convenient to define an angle gamma between the 'free' vector :math:`\vec{\mu_j}`
and the reference (bond) vector :math:`\vec{r_{ij}}`:
It is convenient to define an angle gamma between the 'free' vector :math:`\vec{\mu}_j`
and the reference (bond) vector :math:`\vec{r}_{ij}`:
.. math::
\cos\gamma = \frac{\vec{\mu_j}\cdot\vec{r_{ij}}}{\mu_j\,r_{ij}}
\cos\gamma = \frac{\vec{\mu}_j\cdot\vec{r}_{ij}}{\mu_j\,r_{ij}}
The *dipole* angle style uses the potential:
@ -53,23 +53,23 @@ potential using the 'chain rule' as in appendix C.3 of
.. math::
\vec{T_j} = \frac{2K(\cos\gamma - \cos\gamma_0)}{\mu_j\,r_{ij}}\, \vec{r_{ij}} \times \vec{\mu_j}
\vec{T}_j = \frac{2K(\cos\gamma - \cos\gamma_0)}{\mu_j\,r_{ij}}\, \vec{r}_{ij} \times \vec{\mu}_j
Example: if :math:`\gamma_0` is set to 0 degrees, the torque generated by
the potential will tend to align the dipole along the reference
direction defined by the (bond) vector :math:`\vec{r_{ij}}` (in other words, :math:`\vec{\mu_j}` is
direction defined by the (bond) vector :math:`\vec{r}_{ij}` (in other words, :math:`\vec{\mu}_j` is
restrained to point towards atom :math:`i`).
The dipolar torque :math:`\vec{T_j}` must be counterbalanced in order to conserve
The dipolar torque :math:`\vec{T}_j` must be counterbalanced in order to conserve
the local angular momentum. This is achieved via an additional force
couple generating a torque equivalent to the opposite of :math:`\vec{T_j}`:
couple generating a torque equivalent to the opposite of :math:`\vec{T}_j`:
.. math::
-\vec{T_j} & = \vec{r_{ij}} \times \vec{F_i} \\
\vec{F_j} & = -\vec{F_i}
-\vec{T}_j & = \vec{r}_{ij} \times \vec{F}_i \\
\vec{F}_j & = -\vec{F}_i
where :math:`\vec{F_i}` and :math:`\vec{F_j}` are applied on atoms :math:`i`
where :math:`\vec{F}_i` and :math:`\vec{F}_j` are applied on atoms :math:`i`
and :math:`j`, respectively.
The following coefficients must be defined for each angle type via the

View File

@ -66,8 +66,8 @@ The deviation is calculated as:
\text{RMSD}(\mathbf{u}, \mathbf{v})
= \min_{s, \mathbf{Q}} \sqrt{\frac{1}{N} \sum\limits_{i=1}^{N}
{\left\lVert s[\vec{u_i} - \mathbf{\bar{u}}]
- \mathbf{Q} \cdot \vec{v_i} \right\rVert}^2}
{\left\lVert s[\vec{u}_i - \mathbf{\bar{u}}]
- \mathbf{Q} \cdot \vec{v}_i \right\rVert}^2}
Here, :math:`\vec u` and :math:`\vec v` contain the coordinates of the local
and ideal structures respectively, :math:`s` is a scale factor, and

View File

@ -103,15 +103,15 @@ possible easy axis for the magnetic spins in the defined group:
H_{cubic} = -\sum_{{ i}=1}^{N} K_{1}
\Big[
\left(\vec{s}_{i} \cdot \vec{n_1} \right)^2
\left(\vec{s}_{i} \cdot \vec{n_2} \right)^2 +
\left(\vec{s}_{i} \cdot \vec{n_2} \right)^2
\left(\vec{s}_{i} \cdot \vec{n_3} \right)^2 +
\left(\vec{s}_{i} \cdot \vec{n_1} \right)^2
\left(\vec{s}_{i} \cdot \vec{n_3} \right)^2 \Big]
+K_{2}^{(c)} \left(\vec{s}_{i} \cdot \vec{n_1} \right)^2
\left(\vec{s}_{i} \cdot \vec{n_2} \right)^2
\left(\vec{s}_{i} \cdot \vec{n_3} \right)^2
\left(\vec{s}_{i} \cdot \vec{n}_1 \right)^2
\left(\vec{s}_{i} \cdot \vec{n}_2 \right)^2 +
\left(\vec{s}_{i} \cdot \vec{n}_2 \right)^2
\left(\vec{s}_{i} \cdot \vec{n}_3 \right)^2 +
\left(\vec{s}_{i} \cdot \vec{n}_1 \right)^2
\left(\vec{s}_{i} \cdot \vec{n}_3 \right)^2 \Big]
+K_{2}^{(c)} \left(\vec{s}_{i} \cdot \vec{n}_1 \right)^2
\left(\vec{s}_{i} \cdot \vec{n}_2 \right)^2
\left(\vec{s}_{i} \cdot \vec{n}_3 \right)^2
with :math:`K_1` and :math:`K_{2c}` (in eV) the intensity coefficients
and :math:`\vec{n}_1`, :math:`\vec{n}_2` and :math:`\vec{n}_3`

View File

@ -96,29 +96,29 @@ force (F), and torque (T) between particles I and J.
\left(\frac{\sigma}{r}\right)^6 \right] \\
E_{qq} = & \frac{q_i q_j}{r} \\
E_{qp} = & \frac{q}{r^3} (p \bullet \vec{r}) \\
E_{pp} = & \frac{1}{r^3} (\vec{p_i} \bullet \vec{p_j}) -
\frac{3}{r^5} (\vec{p_i} \bullet \vec{r}) (\vec{p_j} \bullet \vec{r}) \\
E_{pp} = & \frac{1}{r^3} (\vec{p}_i \bullet \vec{p}_j) -
\frac{3}{r^5} (\vec{p}_i \bullet \vec{r}) (\vec{p}_j \bullet \vec{r}) \\
& \\
F_{qq} = & \frac{q_i q_j}{r^3} \vec{r} \\
F_{qp} = & -\frac{q}{r^3} \vec{p} + \frac{3q}{r^5}
(\vec{p} \bullet \vec{r}) \vec{r} \\
F_{pp} = & \frac{3}{r^5} (\vec{p_i} \bullet \vec{p_j}) \vec{r} -
\frac{15}{r^7} (\vec{p_i} \bullet \vec{r})
(\vec{p_j} \bullet \vec{r}) \vec{r} +
\frac{3}{r^5} \left[ (\vec{p_j} \bullet \vec{r}) \vec{p_i} +
(\vec{p_i} \bullet \vec{r}) \vec{p_j} \right] \\
F_{pp} = & \frac{3}{r^5} (\vec{p}_i \bullet \vec{p}_j) \vec{r} -
\frac{15}{r^7} (\vec{p}_i \bullet \vec{r})
(\vec{p}_j \bullet \vec{r}) \vec{r} +
\frac{3}{r^5} \left[ (\vec{p}_j \bullet \vec{r}) \vec{p}_i +
(\vec{p}_i \bullet \vec{r}) \vec{p}_j \right] \\
& \\
T_{pq} = T_{ij} = & \frac{q_j}{r^3} (\vec{p_i} \times \vec{r}) \\
T_{qp} = T_{ji} = & - \frac{q_i}{r^3} (\vec{p_j} \times \vec{r}) \\
T_{pp} = T_{ij} = & -\frac{1}{r^3} (\vec{p_i} \times \vec{p_j}) +
\frac{3}{r^5} (\vec{p_j} \bullet \vec{r})
(\vec{p_i} \times \vec{r}) \\
T_{pp} = T_{ji} = & -\frac{1}{r^3} (\vec{p_j} \times \vec{p_i}) +
\frac{3}{r^5} (\vec{p_i} \bullet \vec{r})
(\vec{p_j} \times \vec{r})
T_{pq} = T_{ij} = & \frac{q_j}{r^3} (\vec{p}_i \times \vec{r}) \\
T_{qp} = T_{ji} = & - \frac{q_i}{r^3} (\vec{p}_j \times \vec{r}) \\
T_{pp} = T_{ij} = & -\frac{1}{r^3} (\vec{p}_i \times \vec{p}_j) +
\frac{3}{r^5} (\vec{p}_j \bullet \vec{r})
(\vec{p}_i \times \vec{r}) \\
T_{pp} = T_{ji} = & -\frac{1}{r^3} (\vec{p}_j \times \vec{p}_i) +
\frac{3}{r^5} (\vec{p}_i \bullet \vec{r})
(\vec{p}_j \times \vec{r})
where :math:`q_i` and :math:`q_j` are the charges on the two
particles, :math:`\vec{p_i}` and :math:`\vec{p_j}` are the dipole
particles, :math:`\vec{p}_i` and :math:`\vec{p}_j` are the dipole
moment vectors of the two particles, r is their separation distance,
and the vector r = Ri - Rj is the separation vector between the two
particles. Note that Eqq and Fqq are simply Coulombic energy and
@ -163,8 +163,8 @@ energy (E), force (F), and torque (T) between particles I and J:
2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p}\bullet\vec{r}) \\
E_{pp} = & \left[1-4\left(\frac{r}{r_c}\right)^{\!3} +
3\left(\frac{r}{r_c}\right)^{\!4}\right]\left[\frac{1}{r^3}
(\vec{p_i} \bullet \vec{p_j}) - \frac{3}{r^5}
(\vec{p_i} \bullet \vec{r}) (\vec{p_j} \bullet \vec{r})\right] \\
(\vec{p}_i \bullet \vec{p}_j) - \frac{3}{r^5}
(\vec{p}_i \bullet \vec{r}) (\vec{p}_j \bullet \vec{r})\right] \\
& \\
F_{LJ} = & \left\{\left[48\epsilon \left(\frac{\sigma}{r}\right)^{\!12} -
@ -182,37 +182,37 @@ energy (E), force (F), and torque (T) between particles I and J:
\frac{q}{r^3}\left[1-3\left(\frac{r}{r_c}\right)^{\!2} +
2\left(\frac{r}{r_c}\right)^{\!3}\right] \vec{p} \\
F_{pp} = &\frac{3}{r^5}\Bigg\{\left[1-\left(\frac{r}{r_c}\right)^{\!4}\right]
\left[(\vec{p_i}\bullet\vec{p_j}) - \frac{3}{r^2} (\vec{p_i}\bullet\vec{r})
(\vec{p_j} \bullet \vec{r})\right] \vec{r} + \\
\left[(\vec{p}_i\bullet\vec{p}_j) - \frac{3}{r^2} (\vec{p}_i\bullet\vec{r})
(\vec{p}_j \bullet \vec{r})\right] \vec{r} + \\
& \left[1 -
4\left(\frac{r}{r_c}\right)^{\!3}+3\left(\frac{r}{r_c}\right)^{\!4}\right]
\left[ (\vec{p_j} \bullet \vec{r}) \vec{p_i} + (\vec{p_i} \bullet \vec{r})
\vec{p_j} -\frac{2}{r^2} (\vec{p_i} \bullet \vec{r})
(\vec{p_j} \bullet \vec{r})\vec{r}\right] \Bigg\}
\left[ (\vec{p}_j \bullet \vec{r}) \vec{p}_i + (\vec{p}_i \bullet \vec{r})
\vec{p}_j -\frac{2}{r^2} (\vec{p}_i \bullet \vec{r})
(\vec{p}_j \bullet \vec{r})\vec{r}\right] \Bigg\}
.. math::
T_{pq} = T_{ij} = & \frac{q_j}{r^3} \left[ 1 -
3\left(\frac{r}{r_c}\right)^{\!2} +
2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p_i}\times\vec{r}) \\
2\left(\frac{r}{r_c}\right)^{\!3}\right] (\vec{p}_i\times\vec{r}) \\
T_{qp} = T_{ji} = & - \frac{q_i}{r^3} \left[ 1 -
3\left(\frac{r}{r_c}\right)^{\!2} +
2\left(\frac{r}{r_c}\right)^{\!3} \right] (\vec{p_j}\times\vec{r}) \\
2\left(\frac{r}{r_c}\right)^{\!3} \right] (\vec{p}_j\times\vec{r}) \\
T_{pp} = T_{ij} = & -\frac{1}{r^3}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} +
e3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_i} \times \vec{p_j}) + \\
e3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p}_i \times \vec{p}_j) + \\
& \frac{3}{r^5}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} +
3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_j}\bullet\vec{r})
(\vec{p_i} \times \vec{r}) \\
3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p}_j\bullet\vec{r})
(\vec{p}_i \times \vec{r}) \\
T_{pp} = T_{ji} = & -\frac{1}{r^3}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} +
3\left(\frac{r}{r_c}\right)^{\!4}\right](\vec{p_j} \times \vec{p_i}) + \\
3\left(\frac{r}{r_c}\right)^{\!4}\right](\vec{p}_j \times \vec{p}_i) + \\
& \frac{3}{r^5}\left[1-4\left(\frac{r}{r_c}\right)^{\!3} +
3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p_i} \bullet \vec{r})
(\vec{p_j} \times \vec{r})
3\left(\frac{r}{r_c}\right)^{\!4}\right] (\vec{p}_i \bullet \vec{r})
(\vec{p}_j \times \vec{r})
where :math:`\epsilon` and :math:`\sigma` are the standard LJ
parameters, :math:`r_c` is the cutoff, :math:`q_i` and :math:`q_j` are
the charges on the two particles, :math:`\vec{p_i}` and
:math:`\vec{p_j}` are the dipole moment vectors of the two particles,
the charges on the two particles, :math:`\vec{p}_i` and
:math:`\vec{p}_j` are the dipole moment vectors of the two particles,
r is their separation distance, and the vector r = Ri - Rj is the
separation vector between the two particles. Note that Eqq and Fqq
are simply Coulombic energy and force, Fij = -Fji as symmetric forces,

View File

@ -68,13 +68,13 @@ of 3 terms
\vec{f} = & (F^C + F^D + F^R) \hat{r_{ij}} \qquad \qquad r < r_c \\
F^C = & A w(r) \\
F^D = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v_{ij}}) \\
F^D = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v}_{ij}) \\
F^R = & \sigma w(r) \alpha (\Delta t)^{-1/2} \\
w(r) = & 1 - \frac{r}{r_c}
where :math:`F^C` is a conservative force, :math:`F^D` is a dissipative
force, and :math:`F^R` is a random force. :math:`\hat{r_{ij}}` is a
unit vector in the direction :math:`r_i - r_j`, :math:`\vec{v_{ij}}` is
unit vector in the direction :math:`r_i - r_j`, :math:`\vec{v}_{ij}` is
the vector difference in velocities of the two atoms :math:`\vec{v}_i -
\vec{v}_j`, :math:`\alpha` is a Gaussian random number with zero mean
and unit variance, *dt* is the timestep size, and :math:`w(r)` is a

View File

@ -56,13 +56,13 @@ given as a sum of 3 terms
\vec{f} = & (F^C + F^D + F^R) \hat{r_{ij}} \qquad \qquad r < r_c \\
F^C = & A w(r) \\
F^D = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v_{ij}}) \\
F^D = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v}_{ij}) \\
F^R = & \sigma w(r) \alpha (\Delta t)^{-1/2} \\
w(r) = & 1 - \frac{r}{r_c}
where :math:`F^C` is a conservative force, :math:`F^D` is a dissipative
force, and :math:`F^R` is a random force. :math:`\hat{r_{ij}}` is a
unit vector in the direction :math:`r_i - r_j`, :math:`\vec{v_{ij}}` is
unit vector in the direction :math:`r_i - r_j`, :math:`\vec{v}_{ij}` is
the vector difference in velocities of the two atoms, :math:`\vec{v}_i -
\vec{v}_j`, :math:`\alpha` is a Gaussian random number with zero mean
and unit variance, *dt* is the timestep size, and :math:`w(r)` is a
@ -99,9 +99,9 @@ energies are computed within style *dpd/fdt/energy* as:
.. math::
du_{i}^{cond} = & \kappa_{ij}(\frac{1}{\theta_{i}}-\frac{1}{\theta_{j}})\omega_{ij}^{2} + \alpha_{ij}\omega_{ij}\zeta_{ij}^{q}(\Delta{t})^{-1/2} \\
du_{i}^{mech} = & -\frac{1}{2}\gamma_{ij}\omega_{ij}^{2}(\frac{\vec{r_{ij}}}{r_{ij}}\bullet\vec{v_{ij}})^{2} -
du_{i}^{mech} = & -\frac{1}{2}\gamma_{ij}\omega_{ij}^{2}(\frac{\vec{r}_{ij}}{r_{ij}}\bullet\vec{v}_{ij})^{2} -
\frac{\sigma^{2}_{ij}}{4}(\frac{1}{m_{i}}+\frac{1}{m_{j}})\omega_{ij}^{2} -
\frac{1}{2}\sigma_{ij}\omega_{ij}(\frac{\vec{r_{ij}}}{r_{ij}}\bullet\vec{v_{ij}})\zeta_{ij}(\Delta{t})^{-1/2}
\frac{1}{2}\sigma_{ij}\omega_{ij}(\frac{\vec{r}_{ij}}{r_{ij}}\bullet\vec{v}_{ij})\zeta_{ij}(\Delta{t})^{-1/2}
where