Skip to content
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
Binary file modified figures/REACT-reacting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
256 changes: 128 additions & 128 deletions files/tutorial8/CNT.data

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions files/tutorial8/M-M_post.mol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LAMMPS Input File (License CC BY 4.0)
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# The DOI will be added upon publication
# Find more on GitHub: https://github.com/lammpstutorials

Expand Down Expand Up @@ -95,7 +95,7 @@ Charges
10 0.128800
11 -0.173400
12 0.140300
13 0.051600
13 0.051800
14 -0.069600
15 0.035400
16 0.035400
Expand All @@ -111,7 +111,7 @@ Charges
26 0.128800
27 -0.173400
28 0.140300
29 0.051600
29 0.051800
30 -0.069600
31 0.035400
32 0.035400
Expand Down
6 changes: 3 additions & 3 deletions files/tutorial8/M-M_pre.mol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LAMMPS Input File (License CC BY 4.0)
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# The DOI will be added upon publication
# Find more on GitHub: https://github.com/lammpstutorials

Expand Down Expand Up @@ -95,7 +95,7 @@ Charges
10 0.128800
11 -0.173400
12 0.140300
13 0.051600
13 0.051800
14 -0.069600
15 0.035400
16 0.035400
Expand All @@ -111,7 +111,7 @@ Charges
26 0.128800
27 -0.173400
28 0.140300
29 0.051600
29 0.051800
30 -0.069600
31 0.035400
32 0.035400
Expand Down
8 changes: 4 additions & 4 deletions files/tutorial8/M-P_post.mol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LAMMPS Input File (License CC BY 4.0)
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# The DOI will be added upon publication
# Find more on GitHub: https://github.com/lammpstutorials

Expand Down Expand Up @@ -123,7 +123,7 @@ Charges
10 0.128800
11 -0.173400
12 0.140300
13 0.051600
13 0.051800
14 -0.069600
15 0.035400
16 0.035400
Expand All @@ -139,7 +139,7 @@ Charges
26 0.128800
27 -0.173400
28 0.140300
29 0.051600
29 0.051800
30 -0.069600
31 -0.129000
32 0.123700
Expand All @@ -153,7 +153,7 @@ Charges
40 0.128800
41 -0.173400
42 0.140300
43 0.051600
43 0.051800
44 -0.069600
45 0.035400
46 0.035400
Expand Down
8 changes: 4 additions & 4 deletions files/tutorial8/M-P_pre.mol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LAMMPS Input File (License CC BY 4.0)
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# The DOI will be added upon publication
# Find more on GitHub: https://github.com/lammpstutorials

Expand Down Expand Up @@ -123,7 +123,7 @@ Charges
10 0.128800
11 -0.173400
12 0.140300
13 0.051600
13 0.051800
14 -0.069600
15 0.035400
16 0.035400
Expand All @@ -139,7 +139,7 @@ Charges
26 0.128800
27 -0.173400
28 0.140300
29 0.051600
29 0.051800
30 -0.069600
31 -0.129000
32 0.123700
Expand All @@ -153,7 +153,7 @@ Charges
40 0.128800
41 -0.173400
42 0.140300
43 0.051600
43 0.051800
44 -0.069600
45 0.035400
46 0.035400
Expand Down
8 changes: 4 additions & 4 deletions files/tutorial8/P-P_post.mol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LAMMPS Input File (License CC BY 4.0)
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# The DOI will be added upon publication
# Find more on GitHub: https://github.com/lammpstutorials

Expand Down Expand Up @@ -131,7 +131,7 @@ Charges
10 0.128800
11 -0.173400
12 0.140300
13 0.051600
13 0.051800
14 -0.069600
15 0.035400
16 0.035400
Expand All @@ -151,7 +151,7 @@ Charges
30 0.128800
31 -0.173400
32 0.140300
33 0.051600
33 0.051800
34 -0.069600
35 -0.129000
36 0.123700
Expand All @@ -165,7 +165,7 @@ Charges
44 0.128800
45 -0.173400
46 0.140300
47 0.051600
47 0.051800
48 -0.069600
49 0.035400
50 0.035400
Expand Down
8 changes: 4 additions & 4 deletions files/tutorial8/P-P_pre.mol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LAMMPS Input File (License CC BY 4.0)
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# The DOI will be added upon publication
# Find more on GitHub: https://github.com/lammpstutorials

Expand Down Expand Up @@ -131,7 +131,7 @@ Charges
10 0.128800
11 -0.173400
12 0.140300
13 0.051600
13 0.051800
14 -0.069600
15 0.035400
16 0.035400
Expand All @@ -151,7 +151,7 @@ Charges
30 0.128800
31 -0.173400
32 0.140300
33 0.051600
33 0.051800
34 -0.069600
35 -0.129000
36 0.123700
Expand All @@ -165,7 +165,7 @@ Charges
44 0.128800
45 -0.173400
46 0.140300
47 0.051600
47 0.051800
48 -0.069600
49 0.035400
50 0.035400
Expand Down
14 changes: 7 additions & 7 deletions files/tutorial8/solution/polymerize.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions files/tutorial8/solution/polymerize.lmp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python script (License CC BY 4.0)
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# The DOI will be added upon publication
# Find more on GitHub: https://github.com/lammpstutorials

Expand Down Expand Up @@ -52,7 +52,7 @@ fix rxn all bond/react &
react R3 all 1 0 5.0 mol5 mol6 P-P.rxnmap

fix mynvt statted_grp_REACT nvt temp 530 530 100
group CNT molecule 1 2 3
group CNT molecule 1
fix myrec CNT recenter NULL 0 0 shift all

thermo 200
Expand Down
4 changes: 2 additions & 2 deletions files/tutorial8/styrene.mol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LAMMPS Input File (License CC BY 4.0)
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# By Simon Gravelle, Jacob R. Gissinger, and Axel Kohlmeyer
# The DOI will be added upon publication
# Find more on GitHub: https://github.com/lammpstutorials

Expand Down Expand Up @@ -63,7 +63,7 @@ Charges
10 0.128800
11 -0.173400
12 0.140300
13 0.051600
13 0.051800
14 -0.069600
15 0.035400
16 0.035400
Expand Down
38 changes: 19 additions & 19 deletions lammps-tutorials.tex
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ \subsection{Background knowledge}
with Applications to Soft Matter} by Jean-Pierre Hansen and Ian Ranald
McDonald~\cite{hansen2013theory}. For more resources, the SklogWiki
platform provies a wide range of information information on statistical mechanics
and molecular simulations~\cite{sklogwiki_main_page}.
and molecular simulations~\cite{sklogwiki_main_page}.

\subsection{Software/system requirements}

Expand Down Expand Up @@ -498,7 +498,7 @@ \subsubsection{My first input}
a popular choice for simulations that explore general statistical mechanical
principles, as it emphasizes relative differences between parameters rather than
representing any specific material. The second line, \lmpcmd{dimension 3}, specifies that the simulation is conducted
in 3D space, as opposed to 2D, where atoms are confined to move only in the
in 3D space, as opposed to 2D, where atoms are confined to move only in the
xy-plane. The third line, \lmpcmd{atom\_style atomic}, designates
the atomic style for representing simple, individual particles.
In this style, each particle is treated as a point with a mass, making it the
Expand Down Expand Up @@ -681,7 +681,7 @@ \subsubsection{My first input}
algorithm~\cite{hestenes1952methods}. The simulation will stop as soon
as the minimizer algorithm cannot find a way to lower the potential
energy. % SG: I don't think that its true, its rather the algorithm
% will stop when one of the four criteria is met. Axel, what do you think?
% will stop when one of the four criteria is met. Axel, what do you think?
% I propose to replace by "when specific convergence criteria are met"
Note that, except for trivial systems, minimization algorithms will find a
local minimum rather than the global minimum.
Expand Down Expand Up @@ -1135,7 +1135,7 @@ \subsubsection{Improving the script}
\caption{a)~Evolution of the numbers $N_\text{1, in}$ and $N_\text{2, in}$ of atoms
of types 1 and 2, respectively, within the \lmpcmd{cyl\_in} region as functions
of time $t$. b)~Evolution of the coordination number $C_{1-2}$ (compute \lmpcmd{sumcoor12})
between atoms of types 1 and 2.}
between atoms of types 1 and 2.}
\label{fig:mixing}
\end{figure}

Expand Down Expand Up @@ -1699,7 +1699,7 @@ \subsubsection{Breakable bonds}
bonds break, the energy relaxes abruptly, as can be seen near $t=32~\text{ps}$ in Fig.~\ref{fig:CNT-breakable-energy-stress}\,a.
Using a similar script as previously,
i.e.,~\href{\filepath tutorial2/unbreakable-yaml-reader.py}{\dwlcmd{unbreakable-yaml-reader.py}},
import the data into Python and generate the stress-strain curve (Fig.~\ref{fig:CNT-breakable-energy-stress}\,b). The
import the data into Python and generate the stress-strain curve (Fig.~\ref{fig:CNT-breakable-energy-stress}\,b). The
stress-strain curve reveals a linear (elastic) regime where $F_\text{cnt} \propto \Delta L_\text{cnt}$
for $\Delta L_\text{cnt} < 5\,\%$, and a non-linear (plastic) regime
for $5\,\% < \Delta L_\text{cnt} < 25\,\%$.
Expand Down Expand Up @@ -2111,7 +2111,7 @@ \subsubsection{Stretching the PEG molecule}
dump mydmp all local 100 pull.dat index c_dphi c_prop
\end{lstlisting}
By contrast with the radius of gyration (compute \lmpcmd{rgyr}), the dihedral angle % SG: why is c_prop not printed?
$\phi$ (compute \lmpcmd{dphi}) is returned as a vector by the \lmpcmd{compute dihedral/local}
$\phi$ (compute \lmpcmd{dphi}) is returned as a vector by the \lmpcmd{compute dihedral/local}
command and must be written to a file using the \lmpcmd{dump local} command.

Finally, let us simulate 15 picoseconds without any external force:
Expand Down Expand Up @@ -2750,7 +2750,7 @@ \subsubsection{Imposed shearing}
the average force on each wall is given by \lmpcmd{f\_mysf1[1]} and \lmpcmd{f\_mysf2[1]}
and is approximately $2.7\,\mathrm{kcal/mol/\AA}$ in magnitude. Using a surface area
for the walls of $A = 6 \cdot 10^{-18}\,\text{m}^2$, one obtains an estimate for
the shear viscosity for the confined fluid of $\eta = 3.1\,\text{mPa.s}$ using Eq.~\eqref{eq:eta}.
the shear viscosity for the confined fluid of $\eta = 3.1\,\text{mPa.s}$ using Eq.~\eqref{eq:eta}.

\begin{note}
The viscosity calculated at such a high shear rate may differ from the expected
Expand Down Expand Up @@ -3990,7 +3990,7 @@ \subsection{Tutorial 8: Reactive Molecular Dynamics}

\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{REACT.png}
\includegraphics[width=\linewidth]{REACT.png}
\caption{Initial configuration for \hyperref[bond-react-label]{Tutorial 8}.
The system consists of 200 styrene molecules packed around a single-walled
CNT, with a mass density for the whole system of $0.9~\text{g/cm}^3$.}
Expand Down Expand Up @@ -4021,7 +4021,7 @@ \subsubsection{Creating the system}
The \textit{class2} bond, angle, dihedral, and improper styles are used as
well, see the documentation for a description of their respective potentials.
The \lmpcmd{mix sixthpower} imposes the following mixing rule for the calculation
of the cross coefficients:
of the cross coefficients:
\begin{eqnarray}
\nonumber
\sigma_{ij} & = & 2^{-1/6} (\sigma^6_i+\sigma_j^6)^{1/6}, ~ \text{and} \\
Expand Down Expand Up @@ -4055,7 +4055,7 @@ \subsubsection{Creating the system}
by manually shrinking the simulation box at a constant rate. The dimension parallel
to the CNT axis is maintained fixed because the CNT is periodic in that direction.
Add the following commands to \flecmd{mixing.lmp}:
% SG: I removed the loop local, unless its important? But if it is, we have to
% SG: I removed the loop local, unless its important? But if it is, we have to
% explain what it does and why it was chosen here.
\begin{lstlisting}
velocity all create 530 9845 dist gaussian rot yes
Expand All @@ -4071,7 +4071,7 @@ \subsubsection{Creating the system}
run 9000
\end{lstlisting}
The \lmpcmd{fix halt} command is used to stop the box shrinkage once the
target density is reached.
target density is reached.

For the next stage of the simulation, we will use \lmpcmd{dump image} to
output images every 200 steps:
Expand All @@ -4096,7 +4096,7 @@ \subsubsection{Creating the system}
unfix myhal
reset_timestep 0

group CNT molecule 1 2 3
group CNT molecule 1
fix myrec CNT recenter NULL 0 0 units box shift all

run 10000
Expand Down Expand Up @@ -4232,9 +4232,9 @@ \subsubsection{Simulating the reaction}

\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{REACT-final.png}
\includegraphics[width=\linewidth]{REACT-final.png}
\caption{Final configuration for \hyperref[bond-react-label]{Tutorial 8}.
The atoms from the formed polymer named \lmpcmd{c1}, \lmpcmd{c2}, and
The atoms from the formed polymer named \lmpcmd{c1}, \lmpcmd{c2}, and
\lmpcmd{c3} are colored in pink.}
\label{fig:REACT-final}
\end{figure}
Expand All @@ -4244,7 +4244,7 @@ \subsubsection{Simulating the reaction}
to track which atoms are being stabilized and which atoms are undergoing
dynamics with the system-wide time integrator (here, \lmpcmd{fix nvt}).
When reaction stabilization is employed, there should not be a time integrator acting on
the group \lmpcmd{all}. Instead, the group of atoms not currently
the group \mbox{\lmpcmd{all}.} Instead, the group of atoms not currently
undergoing stabilization is named by appending `\_REACT' to the user-provided prefix.
\end{note}

Expand Down Expand Up @@ -4273,10 +4273,10 @@ \subsubsection{Simulating the reaction}
\caption{a) Evolution of the system temperature, $T$,
as a function of the time, $t$, during the polymerization step of
\hyperref[bond-react-label]{Tutorial 8}.
b) Evolution of the three reaction counts, corresponding respecively to
the polymerization of two styrene monomers (Rnx~1), the addition of a styrene
monomer to the end of a growing polymer chain (Rnx~2), and to the linking
of two polymer chains (Rnx~3).}
b) Evolution of the three reaction counts, corresponding respectively to
the polymerization of two styrene monomers (Rxn~1), the addition of a styrene
monomer to the end of a growing polymer chain (Rxn~2), and to the linking
of two polymer chains (Rxn~3).}
\label{fig:evolution-reacting}
\end{figure}

Expand Down