From 820899cd5e659938bf9f81a89118cb96ed029dfe Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 8 May 2023 11:38:27 -0400 Subject: [PATCH] use more obvious pair style dpd thermostat examples --- doc/src/pair_dpd.rst | 32 ++++++++++++++++++++++---------- doc/src/pair_dpd_ext.rst | 39 ++++++++++++++++++++++++++++----------- 2 files changed, 50 insertions(+), 21 deletions(-) diff --git a/doc/src/pair_dpd.rst b/doc/src/pair_dpd.rst index 815fe46cdc..4c8deab152 100644 --- a/doc/src/pair_dpd.rst +++ b/doc/src/pair_dpd.rst @@ -26,8 +26,8 @@ Syntax pair_style dpd T cutoff seed pair_style dpd/tstat Tstart Tstop cutoff seed -* T = temperature (temperature units) -* Tstart,Tstop = desired temperature at start/end of run (temperature units) +* T = temperature (temperature units) (dpd only) +* Tstart,Tstop = desired temperature at start/end of run (temperature units) (dpd/tstat only) * cutoff = global cutoff for DPD interactions (distance units) * seed = random # seed (positive integer) @@ -40,9 +40,9 @@ Examples pair_coeff * * 3.0 1.0 pair_coeff 1 1 3.0 1.0 1.0 - pair_style dpd/tstat 1.0 1.0 2.5 34387 - pair_coeff * * 1.0 - pair_coeff 1 1 1.0 1.0 + pair_style hybrid/overlay lj/cut 2.5 dpd/tstat 1.0 1.0 2.5 34387 + pair_coeff * * lj/cut 1.0 1.0 + pair_coeff * * dpd/tstat 1.0 Description """"""""""" @@ -53,7 +53,7 @@ Style *dpd* computes a force field for dissipative particle dynamics Style *dpd/tstat* invokes a DPD thermostat on pairwise interactions, which is equivalent to the non-conservative portion of the DPD force field. This pairwise thermostat can be used in conjunction with any -:doc:`pair style `, and in leiu of per-particle thermostats +:doc:`pair style `, and instead of per-particle thermostats like :doc:`fix langevin ` or ensemble thermostats like Nose Hoover as implemented by :doc:`fix nvt `. To use *dpd/tstat* as a thermostat for another pair style, use the @@ -105,14 +105,18 @@ commands: * :math:`\gamma` (force/velocity units) * cutoff (distance units) -The last coefficient is optional. If not specified, the global DPD +The cutoff coefficient is optional. If not specified, the global DPD cutoff is used. Note that sigma is set equal to sqrt(2 T gamma), where T is the temperature set by the :doc:`pair_style ` command so it does not need to be specified. For style *dpd/tstat*, the coefficients defined for each pair of -atoms types via the :doc:`pair_coeff ` command is the same, -except that A is not included. +atoms types via the :doc:`pair_coeff ` command are: + +* :math:`\gamma` (force/velocity units) +* cutoff (distance units) + +The cutoff coefficient is optional. The GPU-accelerated versions of these styles are implemented based on the work of :ref:`(Afshar) ` and :ref:`(Phillips) `. @@ -135,6 +139,12 @@ the work of :ref:`(Afshar) ` and :ref:`(Phillips) `. numbers are applied and thus the individual forces and therefore also the virial/pressure. +.. note:: + + For more consistent time integration and force computation you may + consider using :doc:`fix mvv/dpd ` instead of :doc:`fix + nve `. + ---------- .. include:: accel_styles.rst @@ -206,7 +216,9 @@ command for more details. Related commands """""""""""""""" -:doc:`pair_coeff `, :doc:`fix nvt `, :doc:`fix langevin `, :doc:`pair_style srp ` +:doc:`pair_style dpd/ext `, :doc:`pair_coeff `, +:doc:`fix nvt `, :doc:`fix langevin `, +:doc:`pair_style srp `, :doc:`fix mvv/dpd `. Default """"""" diff --git a/doc/src/pair_dpd_ext.rst b/doc/src/pair_dpd_ext.rst index 47c14fa813..1caed4689b 100644 --- a/doc/src/pair_dpd_ext.rst +++ b/doc/src/pair_dpd_ext.rst @@ -18,7 +18,6 @@ Accelerator Variants: dpd/ext/tstat/kk dpd/ext/tstat/omp Syntax """""" - .. code-block:: LAMMPS pair_style dpd/ext T cutoff seed @@ -32,16 +31,15 @@ Syntax Examples """""""" - .. code-block:: LAMMPS pair_style dpd/ext 1.0 2.5 34387 pair_coeff 1 1 25.0 4.5 4.5 0.5 0.5 1.2 pair_coeff 1 2 40.0 4.5 4.5 0.5 0.5 1.2 - pair_style dpd/ext/tstat 1.0 1.0 2.5 34387 - pair_coeff 1 1 4.5 4.5 0.5 0.5 1.2 - pair_coeff 1 2 4.5 4.5 0.5 0.5 1.2 + pair_style hybrid/overlay lj/cut 2.5 dpd/ext/tstat 1.0 1.0 2.5 34387 + pair_coeff * * lj/cut 1.0 1.0 + pair_coeff * * 4.5 4.5 0.5 0.5 1.2 Description """"""""""" @@ -128,20 +126,39 @@ the :doc:`pair_style ` command so it does not need to be specified. For the style *dpd/ext/tstat*, the coefficients defined for each pair of -atoms types via the :doc:`pair_coeff ` command is the same, -except that A is not included. +atoms types via the :doc:`pair_coeff ` command are: + +* :math:`\gamma_{\parallel}` (force/velocity units) +* :math:`\gamma_{\perp}` (force/velocity units) +* :math:`s_{\parallel}` (unitless) +* :math:`s_{\perp}` (unitless) +* :math:`r_c` (distance units) + +The last coefficient is optional. .. note:: If you are modeling DPD polymer chains, you may want to use the :doc:`pair_style srp ` command in conjunction with these pair - styles. It is a soft segmental repulsive potential (SRP) that can + styles. It is a soft segmental repulsive potential (SRP) that can prevent DPD polymer chains from crossing each other. .. note:: - The virial calculation for pressure when using this pair style includes - all the components of force listed above, including the random force. + The virial calculation for pressure when using these pair styles + includes all the components of force listed above, including the + random force. Since the random force depends on random numbers, + everything that changes the order of atoms in the neighbor list + (e.g. different number of MPI ranks or a different neighbor list + skin distance) will also change the sequence in which the random + numbers are applied and thus the individual forces and therefore + also the virial/pressure. + +.. note:: + + For more consistent time integration and force computation you may + consider using :doc:`fix mvv/dpd ` instead of :doc:`fix + nve `. ---------- @@ -207,7 +224,7 @@ Related commands :doc:`pair_style dpd `, :doc:`pair_coeff `, :doc:`fix nvt `, :doc:`fix langevin `, -:doc:`pair_style srp ` +:doc:`pair_style srp `, :doc:`fix mvv/dpd `. **Default:** none