Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add tutorial 8 #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dependencies/lammpstutorials-inputs
1 change: 1 addition & 0 deletions docs/sphinx/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ lammpstutorials by Simon Gravelle : LAMMPS courses for beginners
tutorial5/reactive-silicon-dioxide.rst
tutorial6/water-adsorption-in-silica.rst
tutorial7/free-energy-calculation.rst
tutorial8/reactive-molecular-dynamics.rst

.. toctree::
:maxdepth: 2
Expand Down
11 changes: 5 additions & 6 deletions docs/sphinx/source/non-tutorials/scope.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Scope
*****

This set of tutorials consists of seven tutorials arranged in order of
This set of tutorials consists of eight tutorials arranged in order of
increasing difficulty. The novelties associated with each tutorial are
briefly described below.

Expand Down Expand Up @@ -59,8 +59,7 @@ an energy barrier, this tutorial describes a protocol
for addressing energy landscapes that are difficult to sample using
classical MD or MC methods.

..
In :ref:`bond-react-label`, a CNT embedded in
nylon-6,6 polymer melt is simulated. The
REACTER protocol is used to model the polymerization of nylon, and the formation
of water molecules is tracked over time~\cite{gissinger2020reacter}.
In :ref:`bond-react-label`, a CNT embedded in
nylon-6,6 polymer melt is simulated. The
REACTER protocol is used to model the polymerization of nylon, and the formation
of water molecules is tracked over time~\cite{gissinger2020reacter}.
Binary file not shown.
Binary file added docs/sphinx/source/tutorial8/avatars/avatar.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions docs/sphinx/source/tutorial8/introduction.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
.. figure:: avatars/avatar_light.webp
.. figure:: avatars/avatar.webp
:height: 250
:alt: Lennard Jones atoms simulated with LAMMPS
:alt: Carbon nanotube (CNT) embedded in a polymer melt composed of polystyrene with LAMMPS
:class: only-light
:align: right

.. figure:: avatars/avatar_dark.webp
.. figure:: avatars/avatar-dm.webp
:height: 250
:alt: Lennard Jones atoms simulated with LAMMPS
:alt: Carbon nanotube (CNT) embedded in a polymer melt composed of polystyrene with LAMMPS
:class: only-dark
:align: right

The goal of this tutorial is to create a model of a carbon nanotube (CNT) embedded
in a polymer melt made of polystyrene (PS) (Fig.~\ref{fig:REACT}). The
REACTER protocol is used to simulate the polymerization of styrene monomers, and the
polymerization reaction is followed in time :cite:`gissinger2017polymer, gissinger2020reacter, gissinger2024molecular`.
In contrast with AIREBO :ref:`carbon-nanotube-label`
and ReaxFF :ref:`reactive-silicon-dioxide-label`, the REACTER
protocol relies on the use of a *classical* force field.
The goal of this tutorial is to create a model of a carbon nanotube (CNT)
embedded in a polymer melt composed of polystyrene (PS). The REACTER
protocol is used to simulate the polymerization of styrene monomers, and the
polymerization reaction is tracked over time :cite:`gissinger2017polymer,
gissinger2020reacter, gissinger2024molecular`. In contrast to AIREBO
:ref:`carbon-nanotube-label` and ReaxFF :ref:`reactive-silicon-dioxide-label`,
the REACTER protocol relies on the use of a *classical* force field.
32 changes: 23 additions & 9 deletions docs/sphinx/source/tutorial8/tutorial.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Creating the system
===================

To begin this tutorial, select ``Start Tutorial 8`` from the
``Tutorials`` menu of LAMMPS--GUI and follow the instructions.
The editor should display the following content corresponding to **mixing.lmp**:
To begin this tutorial, select ``Start Tutorial 8`` from the ``Tutorials`` menu
of LAMMPS--GUI and follow the instructions. The editor should display the
following content corresponding to **mixing.lmp**:

.. code-block:: lammps

Expand All @@ -29,9 +29,13 @@ of the cross coefficients:

.. math::

\sigma_{ij} & = & 2^{-1/6} (\sigma^6_i+\sigma_j^6)^{1/6}, ~ \text{and}
\sigma_{ij} = 2^{-1/6} (\sigma^6_i+\sigma_j^6)^{1/6},

\epsilon_{ij} & = & \dfrac{2 \sqrt{\epsilon_i \epsilon_j} \sigma^3_i \sigma^3_j}{\sigma^6_i+\sigma_j^6}.
and

.. math::

\epsilon_{ij} = \dfrac{2 \sqrt{\epsilon_i \epsilon_j} \sigma^3_i \sigma^3_j}{\sigma^6_i+\sigma_j^6}.

Let us read the |CNT_data_8| file, which contains a periodic single-walled
CNT. Add the following line to **mixing.lmp**:
Expand Down Expand Up @@ -170,7 +174,7 @@ The third reaction uses the prefix ``P-P``,
- |P_P_post_mol_8|,
- |P_P_rxnmap_8|.

Here, the file names for each reaction use the abbreviation `M' for monomer and `P'
Here, the file names for each reaction use the abbreviation ``M`` for monomer and ``P``
for polymer.

.. |M_M_pre_mol_8| raw:: html
Expand Down Expand Up @@ -275,9 +279,19 @@ based on the atom map **M-M.rxnmap**. Implementation details about each reactio
such as the reaction distance cutoffs and the frequency with which to search for
reaction sties, are also specified in this command.

ADD REACT-final FIGURE: Final configuration.
The atoms from the formed polymer named ``c1``, ``c2``, and
``c3`` are colored in pink.
.. figure:: figures/REACT-composite-dm.png
:class: only-dark
:alt: Evolution of reacting species

.. figure:: figures/REACT-composite.png
:class: only-light
:alt: Evolution of reacting species

.. container:: figurelegend

Figure: Initial (left) and final (right) configuration.
The atoms from the formed polymer named ``c1``, ``c2``, and
``c3`` are colored in pink.

.. admonition:: Note
:class: non-title-info
Expand Down
Loading