replace raw html with embedded math expressions and fix related issues

This commit is contained in:
Axel Kohlmeyer 2020-02-28 17:39:57 +01:00
parent 03985454ed
commit 19d334908b
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
4 changed files with 108 additions and 104 deletions

View File

@ -35,7 +35,7 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
fix 1 all msst y 100.0 q 1.0e5 mu 1.0e5
fix 2 all msst z 50.0 q 1.0e4 mu 1.0e4 v0 4.3419e+03 p0 3.7797e+03 e0 -9.72360e+02 tscale 0.01
@ -101,16 +101,17 @@ timestep. To do this, the fix creates its own computes of style "temp"
"pressure", and "pe", as if these commands had been issued:
.. parsed-literal::
.. code-block:: LAMMPS
compute fix-ID_MSST_temp all temp
compute fix-ID_MSST_press all pressure fix-ID_MSST_temp
compute fix-ID_MSST_pe all pe
See the :doc:`compute temp <compute_temp>` and :doc:`compute pressure <compute_pressure>` commands for details. Note that the
IDs of the new computes are the fix-ID + "_MSST\_temp`or <MSST_press">`_
or "_MSST\_pe". The group for the new computes is "all".
See the :doc:`compute temp <compute_temp>` and :doc:`compute pressure
<compute_pressure>` commands for details. Note that the IDs of the
new computes are the fix-ID + "_MSST\_temp" or "MSST\_press" or
"_MSST\_pe". The group for the new computes is "all".
----------
@ -132,9 +133,10 @@ timestepping. DFTB+ will communicate its info to LAMMPS via that fix.
**Restart, fix\_modify, output, run start/stop, minimize info:**
This fix writes the state of all internal variables to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>` command
for info on how to re-specify a fix in an input script that reads a
restart file, so that the operation of the fix continues in an
This fix writes the state of all internal variables to :doc:`binary
restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
The progress of the MSST can be monitored by printing the global
@ -161,7 +163,7 @@ To print these quantities to the log file with descriptive column
headers, the following LAMMPS commands are suggested:
.. parsed-literal::
.. code-block:: LAMMPS
fix msst all msst z
fix_modify msst energy yes
@ -172,15 +174,17 @@ headers, the following LAMMPS commands are suggested:
thermo_style custom step temp ke pe lz pzz etotal v_dhug v_dray v_lgr_vel v_lgr_pos f_msst
These fixes compute a global scalar and a global vector of 4
quantities, which can be accessed by various :doc:`output commands <Howto_output>`. The scalar values calculated by this fix
are "extensive"; the vector values are "intensive".
quantities, which can be accessed by various :doc:`output commands
<Howto_output>`. The scalar values calculated by this fix are
"extensive"; the vector values are "intensive".
Restrictions
""""""""""""
This fix style is part of the SHOCK package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
All cell dimensions must be periodic. This fix can not be used with a
triclinic cell. The MSST fix has been tested only for the group-ID

View File

@ -26,7 +26,7 @@ Syntax
*v0* value = initial simulation cell volume in the shock equations (distance\^3 units)
*e0* value = initial total energy (energy units)
*tscale* value = reduction in initial temperature (unitless fraction between 0.0 and 1.0)
*damp* value = damping parameter (time units) inverse of friction <i>&gamma;</i>
*damp* value = damping parameter (time units) inverse of friction *gamma*
*seed* value = random number seed (positive integer)
*f_max* value = upper cutoff frequency of the vibration spectrum (1/time units)
*N_f* value = number of frequency bins (positive integer)
@ -40,44 +40,47 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
fix 1 all qbmsst z 0.122 q 25 mu 0.9 tscale 0.01 damp 200 seed 35082 f_max 0.3 N_f 100 eta 1 beta 400 T_init 110 (liquid methane modeled with the REAX force field, real units)
fix 2 all qbmsst z 72 q 40 tscale 0.05 damp 1 seed 47508 f_max 120.0 N_f 100 eta 1.0 beta 500 T_init 300 (quartz modeled with the BKS force field, metal units)
# (liquid methane modeled with the REAX force field, real units)
fix 1 all qbmsst z 0.122 q 25 mu 0.9 tscale 0.01 damp 200 seed 35082 f_max 0.3 N_f 100 eta 1 beta 400 T_init 110
# (quartz modeled with the BKS force field, metal units)
fix 2 all qbmsst z 72 q 40 tscale 0.05 damp 1 seed 47508 f_max 120.0 N_f 100 eta 1.0 beta 500 T_init 300
Two example input scripts are given, including shocked
:math:`\alpha-\mathrm{quartz}` and shocked liquid methane.
The input script first equilibrate an initial state with the quantum
thermal bath at the target temperature and then apply the qbmsst to
simulate shock compression with quantum nuclear correction. The
following two figures plot related quantities for shocked alpha quartz.
:math:`\alpha\textrm{-quartz}` and shocked liquid methane. The input
script first equilibrates an initial state with the quantum thermal
bath at the target temperature and then applies *fix qbmsst* to simulate
shock compression with quantum nuclear correction. The following two
figures plot relevant quantities for shocked
:math:`\alpha\textrm{-quartz}`.
.. image:: JPG/qbmsst_init.jpg
:align: center
Figure 1. Classical temperature <i>T</i><sup>cl</sup> = &sum;
<i>m<sub>i</sub>v<sub>i</sub><sup>2</sup>/3Nk</i><sub>B</sub> vs. time
for coupling the alpha quartz initial state with the quantum thermal
bath at target quantum temperature <i>T</i><sup>qm</sup> = 300 K. The
NpH ensemble is used for time integration while QTB provides the
colored random force. <i>T</i><sup>cl</sup> converges at the timescale
of *damp* which is set to be 1 ps.
Figure 1. Classical temperature
:math:`T_{cl} = \sum \frac{m_iv_i^2}{3Nk_B}` vs. time for coupling the
:math:`\alpha\textrm{-quartz}` initial state with the quantum thermal
bath at target quantum temperature :math:`T^{qm} = 300 K`. The NpH
ensemble is used for time integration while QTB provides the colored
random force. :math:`T^{cl}` converges at the timescale of *damp*
which is set to be 1 ps.
.. image:: JPG/qbmsst_shock.jpg
:align: center
Figure 2. Quantum temperature and pressure vs. time for simulating
shocked alpha quartz with the QBMSST. The shock propagates along the z
direction. Restart of the QBMSST command is demonstrated in the
example input script. Thermodynamic quantities stay continuous before
and after the restart.
shocked :math:`\alpha\textrm{-quartz}` with *fix qbmsst*\. The shock
propagates along the z direction. Restart of the *fix qbmsst* command
is demonstrated in the example input script. Thermodynamic quantities
stay continuous before and after the restart.
Description
"""""""""""
This command performs the Quantum-Bath coupled Multi-Scale Shock
Technique (QBMSST) integration. See :ref:`(Qi) <Qi>` for a detailed
description of this method. The QBMSST provides description of the
description of this method. QBMSST provides description of the
thermodynamics and kinetics of shock processes while incorporating
quantum nuclear effects. The *shockvel* setting determines the steady
shock velocity that will be simulated along direction *dir*\ .
@ -107,14 +110,14 @@ in the command :doc:`fix msst <fix_msst>`. The values of *e0*\ , *p0*\ , or
parameter of *damp*\ , *f\_max*, and *N\_f* are described in the command
:doc:`fix qtb <fix_qtb>`.
The fix qbmsst command couples the shock system to a quantum thermal
The *fix qbmsst* command couples the shock system to a quantum thermal
bath with a rate that is proportional to the change of the total
energy of the shock system, <i>etot</i> - <i>etot</i><sub>0</sub>.
Here <i>etot</i> consists of both the system energy and a thermal
term, see :ref:`(Qi) <Qi>`, and <i>etot</i><sub>0</sub> = *e0* is the
energy of the shock system, :math:`E^{tot} - E^{tot}_0`.
Here :math:`E^{etot}` consists of both the system energy and a thermal
term, see :ref:`(Qi) <Qi>`, and :math:`E^{tot}_0 = e0` is the
initial total energy.
The *eta* (<i>&eta;</i>) parameter is a unitless coupling constant
The *eta* (:math:`\eta`) parameter is a unitless coupling constant
between the shock system and the quantum thermal bath. A small *eta*
value cannot adjust the quantum temperature fast enough during the
temperature ramping period of shock compression while large *eta*
@ -123,21 +126,18 @@ leads to big temperature oscillation. A value of *eta* between 0.3 and
compression. We observe that different values of *eta* lead to almost
the same final thermodynamic state behind the shock, as expected.
The quantum temperature is updated every *beta* (<i>&beta;</i>) steps
The quantum temperature is updated every *beta* (:math:`\beta`) steps
with an integration time interval *beta* times longer than the
simulation time step. In that case, <i>etot</i> is taken as its
simulation time step. In that case, :math:`E^{tot}` is taken as its
average over the past *beta* steps. The temperature of the quantum
thermal bath <i>T</i><sup>qm</sup> changes dynamically according to
the following equation where &Delta;<i>t</i> is the MD time step and
<i>&gamma;</i> is the friction constant which is equal to the inverse
thermal bath :math:`T^{qm}` changes dynamically according to
the following equation where :math:`\Delta_t` is the MD time step and
:math:`\gamma` is the friction constant which is equal to the inverse
of the *damp* parameter.
.. raw:: html
.. math::
<center><font size="4"> <i>dT</i><sup>qm</sup>/<i>dt =
&gamma;&eta;</i>&sum;<i><sup>&beta;</sup><sub>l =
1</sub></i>[<i>etot</i>(<i>t-l</i>&Delta;<i>t</i>)-<i>etot</i><sub>0</sub>]/<i>3&beta;Nk</i><sub>B</sub>
</font></center>
\frac{dT^{qm}}{dt} = \gamma\eta\sum^\beta_{l=1}\frac{E^{tot}(t-l\Delta t) - E^{tot}_0}{3\beta N k_B}
The parameter *T\_init* is the initial temperature of the quantum
thermal bath and the system before shock loading.
@ -172,12 +172,12 @@ vector contains five values in this order:
2. *drayleigh* is the departure from the Rayleigh line (pressure units).
3. *lagrangian\_speed* is the laboratory-frame Lagrangian speed (particle velocity) of the computational cell (velocity units).
4. *lagrangian\_position* is the computational cell position in the reference frame moving at the shock speed. This is the distance of the computational cell behind the shock front.
5. *quantum\_temperature* is the temperature of the quantum thermal bath <i>T</i><sup>qm</sup>.
5. *quantum\_temperature* is the temperature of the quantum thermal bath :math:`T^{qm}`.
To print these quantities to the log file with descriptive column
headers, the following LAMMPS commands are suggested. Here the
:doc:`fix_modify <fix_modify>` energy command is also enabled to allow
the thermo keyword *etotal* to print the quantity <i>etot</i>. See
the thermo keyword *etotal* to print the quantity :math:`E^{tot}`. See
also the :doc:`thermo_style <thermo_style>` command.
@ -193,10 +193,11 @@ also the :doc:`thermo_style <thermo_style>` command.
thermo_style custom step temp ke pe lz pzz etotal v_dhug v_dray v_lgr_vel v_lgr_pos v_T_qm f_fix_id
The global scalar under the entry f\_fix\_id is the quantity of thermo
energy as an extra part of <i>etot</i>. This global scalar and the
vector of 5 quantities can be accessed by various :doc:`output commands <Howto_output>`. It is worth noting that the temp keyword
energy as an extra part of :math:`E^{tot}`. This global scalar and the
vector of 5 quantities can be accessed by various :doc:`output commands <Howto_output>`.
It is worth noting that the temp keyword
under the :doc:`thermo_style <thermo_style>` command print the
instantaneous classical temperature <i>T</i><sup>cl</sup> as described
instantaneous classical temperature :math:`T^{cl}` as described
in the command :doc:`fix qtb <fix_qtb>`.

View File

@ -19,7 +19,7 @@ Syntax
.. parsed-literal::
*temp* value = target quantum temperature (temperature units)
*damp* value = damping parameter (time units) inverse of friction <i>&gamma</i>;
*damp* value = damping parameter (time units) inverse of friction *gamma*
*seed* value = random number seed (positive integer)
*f_max* value = upper cutoff frequency of the vibration spectrum (1/time units)
*N_f* value = number of frequency bins (positive integer)
@ -30,12 +30,14 @@ Examples
""""""""
.. parsed-literal::
.. code-block:: LAMMPS
# (liquid methane modeled with the REAX force field, real units)
fix 1 all nve
fix 1 all qtb temp 110 damp 200 seed 35082 f_max 0.3 N_f 100 (liquid methane modeled with the REAX force field, real units)
fix 1 all qtb temp 110 damp 200 seed 35082 f_max 0.3 N_f 100
# (quartz modeled with the BKS force field, metal units)
fix 2 all nph iso 1.01325 1.01325 1
fix 2 all qtb temp 300 damp 1 seed 47508 f_max 120.0 N_f 100 (quartz modeled with the BKS force field, metal units)
fix 2 all qtb temp 300 damp 1 seed 47508 f_max 120.0 N_f 100
Description
"""""""""""
@ -56,61 +58,54 @@ atoms and thus higher classical limits.
The equation of motion implemented by this command follows a Langevin
form:
.. raw:: html
.. math::
<center><font size="4"><i> m<sub>i</sub>a<sub>i</sub> = f<sub>i</sub>
+ R<sub>i</sub> -
m<sub>i</sub>&gamma;v<sub>i</sub>. </i></font></center>
m_i a_i = f_i + R_i - m_i\gamma v_i
Here <i>m<sub>i</sub></i>, <i>a<sub>i</sub></i>, <i>f<sub>i</sub>
</i>, <i>R<sub>i</sub></i>, <i>&gamma;</i> and <i>v<sub>i</sub> </i>
represent mass, acceleration, force exerted by all other atoms, random
Here :math:`m_i, a_i, f_i, R_i, \gamma, \textrm{and} v_i`
represent in this order mass, acceleration, force exerted by all other atoms, random
force, frictional coefficient (the inverse of damping parameter damp),
and velocity. The random force <i>R<sub>i</sub></i> is "colored" so
that any vibrational mode with frequency <i>&omega;</i> will have a
temperature-sensitive energy <i>&theta;</i>(<i>&omega;,T</i>) which
and velocity. The random force :math:`R_i` is "colored" so
that any vibrational mode with frequency :math:`\omega` will have a
temperature-sensitive energy :math:`\theta(\omega,T)` which
resembles the energy expectation for a quantum harmonic oscillator
with the same natural frequency:
.. raw:: html
<center><font size="4"> <i>&theta;</i>(<i>&omega;,T</i>) =
&#8463;&omega;/2 +
&#8463;&omega;[</i>exp(<i>&#8463;&omega;/k</i><sub>B</sub><i>T</i>)<i>-1</i>]<i><sup>-1</sup></i>
</font></center>
.. math::
\theta(\omega T) = \frac{\hbar}{2} + \hbar\omega \left[\exp(\frac{\hbar\omega}{k_B T})-1 \right]^{-1}
To efficiently generate the random forces, we employ the method
of :ref:`(Barrat) <Barrat>`, that circumvents the need to generate all
random forces for all times before the simulation. The memory
requirement of this approach is less demanding and independent
of the simulation duration. Since the total random force <i>R</i><sub>tot</sub>
of the simulation duration. Since the total random force :math:`R_{tot}`
does not necessarily vanish for a finite number of atoms,
<i>R<sub>i</sub></i> is replaced by <i>R<sub>i</sub></i> - <i>R</i><sub>tot</sub>/<i>N</i><sub>tot</sub>
:math:`R_i` is replaced by :math:`R_i - \frac{R_{tot}}{N_{tot}}`
to avoid collective motion of the system.
The *temp* parameter sets the target quantum temperature. LAMMPS will
still have an output temperature in its thermo style. That is the
instantaneous classical temperature <i>T</i><sup>cl</sup> derived from
instantaneous classical temperature :math:`T^{cl}` derived from
the atom velocities at thermal equilibrium. A non-zero
<i>T</i><sup>cl</sup> will be present even when the quantum
:math:`T^{cl}` will be present even when the quantum
temperature approaches zero. This is associated with zero-point energy
at low temperatures.
.. raw:: html
.. math::
<center><font size="4"> <i>T</i><sup>cl</sup> = &sum;
<i>m<sub>i</sub>v<sub>i</sub><sup>2</sup>/3Nk</i><sub>B</sub>
</font></center>
T^{cl} = \sum \frac{m_i v_i^2}{3 N k_B}
The *damp* parameter is specified in time units, and it equals the
inverse of the frictional coefficient <i>&gamma;</i>. <i>&gamma;</i>
inverse of the frictional coefficient :math:`\gamma`. :math:`\gamma`
should be as small as possible but slightly larger than the timescale
of anharmonic coupling in the system which is about 10 ps to 100
ps. When <i>&gamma;</i> is too large, it gives an energy spectrum that
differs from the desired Bose-Einstein spectrum. When <i>&gamma;</i>
ps. When :math:`\gamma` is too large, it gives an energy spectrum that
differs from the desired Bose-Einstein spectrum. When :math:`\gamma`
is too small, the quantum thermal bath coupling to the system will be
less significant than anharmonic effects, reducing to a classical
limit. We find that setting <i>&gamma;</i> between 5 THz and 1 THz
limit. We find that setting :math:`\gamma` between 5 THz and 1 THz
could be appropriate depending on the system.
The random number *seed* is a positive integer used to initiate a
@ -121,23 +116,22 @@ runs on different numbers of processors.
The *f\_max* parameter truncate the noise frequency domain so that
vibrational modes with frequencies higher than *f\_max* will not be
modulated. If we denote &Delta;<i>t</i> as the time interval for the
modulated. If we denote :math:`\Delta t` as the time interval for the
MD integration, *f\_max* is always reset by the code to make
<i>&alpha;</i> = (int)(2*f\_max*&Delta;<i>t</i>)<sup><i>-1</i></sup> a
:math:`\alpha = (int)(2` *f\_max* :math:`\Delta t)^{-1}` a
positive integer and print out relative information. An appropriate
value for the cutoff frequency *f\_max* would be around 2~3
<i>f</i><sub>D</sub>, where <i>f</i><sub>D</sub> is the Debye
frequency.
value for the cutoff frequency *f\_max* would be around 2~3 :math:`f_D`,
where :math:`f_D` is the Debye frequency.
The *N\_f* parameter is the frequency grid size, the number of points
from 0 to *f\_max* in the frequency domain that will be
sampled. <i>3&times;2</i> *N\_f* per-atom random numbers are required
sampled. 3*2\ *N\_f* per-atom random numbers are required
in the random force generation and there could be as many atoms as in
the whole simulation that can migrate into every individual
processor. A larger *N\_f* provides a more accurate sampling of the
spectrum while consumes more memory. With fixed *f\_max* and
<i>&gamma;</i>, *N\_f* should be big enough to converge the classical
temperature <i>T</i><sup>cl</sup> as a function of target quantum bath
:math:`\gamma`, *N\_f* should be big enough to converge the classical
temperature :math:`T^{cl}` as a function of target quantum bath
temperature. Memory usage per processor could be from 10 to 100
Mbytes.
@ -147,10 +141,12 @@ Mbytes.
Nose/Hoover thermostatting AND time integration, this fix does NOT
perform time integration. It only modifies forces to a colored
thermostat. Thus you must use a separate time integration fix, like
:doc:`fix nve <fix_nve>` or :doc:`fix nph <fix_nh>` to actually update the
velocities and positions of atoms (as shown in the
examples). Likewise, this fix should not normally be used with other
fixes or commands that also specify system temperatures , e.g. :doc:`fix nvt <fix_nh>` and :doc:`fix temp/rescale <fix_temp_rescale>`.
:doc:`fix nve <fix_nve>` or :doc:`fix nph <fix_nh>` to actually
update the velocities and positions of atoms (as shown in the
examples). Likewise, this fix should not normally be used with
other fixes or commands that also specify system temperatures ,
e.g. :doc:`fix nvt <fix_nh>` and :doc:`fix temp/rescale
<fix_temp_rescale>`.
----------
@ -158,10 +154,11 @@ Mbytes.
**Restart, fix\_modify, output, run start/stop, minimizie info:**
No information about this fix is written to :doc:`binary restart files <restart>`. Because the state of the random number generator
is not saved in restart files, this means you cannot do "exact"
restarts with this fix. However, in a statistical sense, a restarted
simulation should produce similar behaviors of the system.
No information about this fix is written to :doc:`binary restart files
<restart>`. Because the state of the random number generator is not
saved in restart files, this means you cannot do "exact" restarts with
this fix. However, in a statistical sense, a restarted simulation
should produce similar behaviors of the system.
This fix is not invoked during :doc:`energy minimization <minimize>`.
@ -174,7 +171,8 @@ Restrictions
This fix style is part of the USER-QTB package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
----------
@ -183,7 +181,8 @@ LAMMPS was built with that package. See the :doc:`Build package <Build_package>`
Related commands
""""""""""""""""
:doc:`fix nve <fix_nve>`, :doc:`fix nph <fix_nh>`, :doc:`fix langevin <fix_langevin>`, :doc:`fix qbmsst <fix_qbmsst>`
:doc:`fix nve <fix_nve>`, :doc:`fix nph <fix_nh>`,
:doc:`fix langevin <fix_langevin>`, :doc:`fix qbmsst <fix_qbmsst>`
----------

View File

@ -45,8 +45,8 @@ Description
Style *comb* computes the second-generation variable charge COMB
(Charge-Optimized Many-Body) potential. Style *comb3* computes the
third-generation COMB potential. These COMB potentials are described
in :ref:`(COMB) <COMB>` and :ref:`(COMB3) <COMB3>`. Briefly, the total energy
*E<sub>T</sub>* of a system of atoms is given by
in :ref:`(COMB) <COMB>` and :ref:`(COMB3) <COMB3>`. Briefly, the
total energy :math:`E_T` of a system of atoms is given by
.. math::