@@ -417,7 +417,7 @@ \section{Content and links}
417417(where \texttt {X } = 1...8) from the \guicmd {Tutorials} menu of LAMMPS-GUI.
418418
419419In the following, all LAMMPS input or console commands are formatted
420- with a \lmpcmd {colored background}. Keyboard shortcuts and
420+ with a \lmpcmd {colored background}. Keyboard shortcuts and
421421file names are formatted in \flecmd {monospace}, and LAMMPS-GUI options and menus
422422are in \guicmd {quoted monospace}.
423423% S.G.: I removed "folder names" because all folders will eventually be removed (TO CONTROL BEFORE SUBMITTING)
@@ -495,7 +495,7 @@ \subsubsection{My first input}
495495representing any specific material.
496496
497497The second line, \lmpcmd {dimension 3}, indicates that the simulation is
498- in 3D, as opposed to 2D, where atoms are restricted to move only in the
498+ in 3D, as opposed to 2D, where atoms are restricted to move only in the
499499xy-plane. The third line, \lmpcmd {atom\_ style atomic}, indicates that
500500the \lmpcmd {atomic} style will be used for simple individual particles,
501501meaning each particle is represented as a point with a mass. This is the
@@ -1073,7 +1073,7 @@ \subsubsection{Improving the script}
10731073The two variables \lmpcmd {n1\_ in}, \lmpcmd {n2\_ in}, along with the compute
10741074\lmpcmd {sumcoor12}, were added to the list of information printed during
10751075the simulation. Additionally, images of the system will be created with
1076- slightly less saturated colors than the default ones.
1076+ slightly less saturated colors than the default ones.
10771077
10781078Finally, add the following lines to \flecmd {improved.md.lmp}:
10791079\ begin{lstlisting}
@@ -1171,7 +1171,7 @@ \subsubsection{Improving the script}
11711171of \lmpcmd {c\_ coor12}, which is mapped continuously from turquoise to yellow
11721172and red for atoms with the highest coordination (Figure~\ref {fig:coords-viz }).
11731173In the definition of the variable \lmpcmd {v\_ coor12}, atoms of type 2 are
1174- all assigned a value of -1, and will therefore always be colored their default blue.
1174+ all assigned a value of -1, and will therefore always be colored their default blue.
11751175
11761176\subsection {Tutorial 2: Pulling on a carbon nanotube }
11771177\label {carbon-nanotube-label }
@@ -3971,27 +3971,26 @@ \subsection{Tutorial 8: Reactive Molecular Dynamics}
39713971
39723972\begin {figure }
39733973\centering
3974- \includegraphics [width=0.55 \linewidth ]{REACT}
3974+ \includegraphics [width=\linewidth ]{REACT}
39753975\caption {Polymer melt made in nylon and carbon nanotubes (CNTs) simulated during
39763976\hyperref [bond-react-label]{Tutorial 8}. The water molecules (in red and white)
39773977are created by the polymerization of nylon simulation using REACTER.}
39783978\label {fig:REACT }
39793979\end {figure }
39803980
3981- The goal of this tutorial is to create a system made of
3982- carbon nanotubes (CNTs) embedded in a polymer melt made in nylon-6,6 (Fig.\, \ref {fig:REACT }). The
3983- REACTER protocol is used to simulate the polymerization of nylon , and the formation
3984- of water molecules is followed in time \cite {gissinger2020reacter , gissinger2024molecular }.
3985- In contrast with Airebo (\hyperref [carbon-nanotube-label]{Tutorial 2})
3981+ The goal of this tutorial is to create a model of a carbon nanotube (CNT) embedded
3982+ in a polymer melt made of polystyrene (PS) (Fig.\, \ref {fig:REACT }). The
3983+ REACTER protocol is used to simulate the polymerization of styrene monomers , and the
3984+ polymerization reaction is followed in time \cite {gissinger2020reacter , gissinger2024molecular }.
3985+ In contrast with AIREBO (\hyperref [carbon-nanotube-label]{Tutorial 2})
39863986and ReaxFF (\hyperref [reactive-silicon-dioxide-label]{Tutorial 5}), the REACTER
39873987protocol relies on the use of a \textit {classical } force field.
39883988
39893989\subsubsection {Creating the system }
39903990
3991- The first step of the tutorial is to mix small carbon nanotubes
3992- with the initial, unreacted, molecules. The molecules are hexamethylenediamine
3993- (C$ _6 $ H$ _{16}$ N$ _2 $ ) and adipic acid (C$ _6 $ H$ _{10}$ O$ _4 $ ). Create a new input
3994- file, call it \textit {mixing.lmp }, and copy the following lines into it:
3991+ The first step of the tutorial is to solvate the carbon nanotube
3992+ with the styrene molecules. Create a new input file, call it \textit {mixing.lmp },
3993+ and copy the following lines into it:
39953994{\normalsize
39963995\begin {verbatim }
39973996units real
@@ -4016,32 +4015,31 @@ \subsubsection{Creating the system}
40164015and $ \epsilon _{ij} = (2 \sqrt {\epsilon _i \epsilon _j} \sigma ^3 _i \sigma ^3 _j)
40174016/ (\sigma ^6 _i+\sigma _j^6 )$ .
40184017
4019- Let us read a data file named \href {\filepath tutorial8/nylon.data}{\textit {nylon.data }}
4020- containing the unreacted molecule template, and let us replicate it. Add the
4021- folloxing lines to \textit {mixing.lmp }:
4018+ Let us read a data file named \href {\filepath tutorial8/CNT.data}{\textit {CNT.data }}
4019+ containing a periodic single-walled CNT. Add the following lines to \textit {mixing.lmp }:
40224020{\normalsize
40234021\begin {verbatim }
4024- read_data nylon .data &
4022+ read_data CNT .data &
40254023 extra/bond/per/atom 5 &
40264024 extra/angle/per/atom 15 &
40274025 extra/dihedral/per/atom 15 &
40284026 extra/improper/per/atom 25 &
40294027 extra/special/per/atom 25
4030- replicate 3 4 4
40314028\end {verbatim }
40324029}
4033- The resulting box is $ (7.2 \, \text {nm})^3 $ in size, and its density is low
4034- enough that inserting CNTs will be easy.
4030+ The CNT is about $ (1.1 \, \text {nm})^3 $ in diameter and $ (8.7 \, \text {nm})^3 $ long.
4031+ The box is $ (8 \, \text {nm})^3 $ in the other dimensions, so filling the box with
4032+ styrene monomers will be easy.
40354033% S.G.: @jrgissing, here we could describe the content of nylon.data.
40364034% How was it created, what is the specifity of the molecules involved, etc...
40374035
4038- To add 5 CNTs to the simulation box, add the following commands
4036+ To add 1000 styrene molecules to the simulation box, add the following commands
40394037to \textit {mixing.lmp }:
40404038{\normalsize
40414039\begin {verbatim }
4042- molecule CNT cnt.molecule
4043- create_atoms 0 random 5 8305 NULL overlap 3 &
4044- maxtry 500 mol CNT 7687
4040+ molecule styrene styrene.lmpmol
4041+ create_atoms 0 random 1000 8305 NULL &
4042+ overlap 2.75 maxtry 500 mol styrene 7687
40454043\end {verbatim }
40464044}
40474045Let us use the \textit {minimize } command to reduce the energy of the system:
@@ -4054,57 +4052,57 @@ \subsubsection{Creating the system}
40544052Then, let us use \textit {dump image } to output images every 1000 steps:
40554053{\normalsize
40564054\begin {verbatim }
4057- dump mydmp all image 1000 dump.mixing.*.ppm &
4058- type type shiny 0.1 box no 0.01 &
4059- view 0 0 zoom 1.8 fsaa yes bond atom 0.5
4060- dump_modify mydmp backcolor white &
4061- acolor c2 gray acolor c_1 lightslategray &
4062- acolor o dimgray acolor o_1 dimgray &
4063- acolor hc lightslategray &
4064- acolor ho lightslategray &
4065- acolor hn lightslategray acolor hw white &
4066- acolor o* red acolor n darkslategray &
4067- acolor na darkslategray &
4068- acolor cp lightpink &
4069- adiam c2 0.3 adiam c_1 0.3 &
4070- adiam cp 0.3 adiam o 0.28 &
4071- adiam o_1 0.28 adiam o* 2.8 &
4072- adiam hc 0.15 adiam ho 0.15 &
4073- adiam hn 0.15 adiam hw 1.5 &
4074- adiam n 0.3 adiam na 0.3
4055+ dump mydmp all image 1000 dump.mix.*.ppm &
4056+ type type shiny 0.1 box no 0.01 &
4057+ view 90 0 zoom 3 fsaa yes bond atom 0.5
4058+ dump_modify mydmp backcolor white &
4059+ acolor cp gray acolor c=1 gray &
4060+ acolor c= gray acolor c1 gray &
4061+ acolor c2 gray acolor c3 gray &
4062+ adiam cp 0.3 adiam c=1 0.3 &
4063+ adiam c= 0.3 adiam c1 0.3 &
4064+ adiam c2 0.3 adiam c3 0.3 &
4065+ acolor hc white adiam hc 0.15
40754066\end {verbatim }
40764067}
4077- Then, let us perform a short equilibration of system using \textit {fix npt }
4078- with a isotropic couplage. To speed up the equilibration of the system, let us
4068+ Then, let us density the system to a target value of a short equilibration of system using \textit {fix npt }
4069+ with a isotropic couplage. To speed up the equilibration of the system, let us
40794070impose a relatively large pressure of 1000\, atm for the first 10\, ps:
40804071{\normalsize
40814072\begin {verbatim }
4082- velocity all create 300 1829 dist gaussian &
4083- mom yes rot yes
4084- fix mynpt all npt temp 300 300 100 &
4085- iso 1000 1000 1000
4073+ velocity all create 300.0 9845 dist gaussian &
4074+ rot yes loop local
4075+ fix 1 all nvt temp 300 300 100
4076+
4077+ fix 2 all deform 1 y erate -0.0001 &
4078+ z erate -0.0001
4079+ variable rho equal density
4080+ fix 3 all halt 10 v_rho > 0.9 error continue
40864081
40874082thermo 1000
40884083thermo_style custom step temp pe etotal press &
4089- density vol
4084+ density vol
40904085
4091- run 10000
4086+ run 9000
40924087\end {verbatim }
40934088}
4094- Then, for the following 20 \, ps, let us continue the equilibration
4095- with an imposed pressure of 1 \, atm , and write the final state of the
4096- system in a file named \textit {cnt-nylon -mix.data }:
4089+ Then, for the following 10 \, ps, let us continue the equilibration
4090+ in the same constant-volume ensemble , and write the final state of the
4091+ system in a file named \textit {CNT-PS -mix.data }:
40974092{\normalsize
40984093\begin {verbatim }
4099- fix mynpt all npt temp 300 300 100 iso 1 1 1000
4094+ unfix 2
4095+ unfix 3
41004096
4101- run 20000
4102- write_data cnt-nylon -mix.data
4097+ run 10000
4098+ write_data CNT-PS -mix.data
41034099\end {verbatim }
41044100}
4105- As the time progresses, the density $ \rho $ of the system progressively
4106- converges toward an equilibrium value $ \rho \approx 1.3 $ \, g/cm$ ^3 $
4107- (Fig.\, \ref {fig:evolution-density }).
4101+ As the time progresses, [maybe plot total energy instead of density
4102+ to demonstrate equilbrated box]
4103+ % the density $\rho$ of the system progressively
4104+ % converges toward an equilibrium value $\rho \approx 1.3$\,g/cm$^3$
4105+ % (Fig.\,\ref{fig:evolution-density}).
41084106
41094107\begin {figure }
41104108\centering
@@ -4114,24 +4112,29 @@ \subsubsection{Creating the system}
41144112\label {fig:evolution-density }
41154113\end {figure }
41164114
4117- \subsubsection {Atom maps and molecule templates }
4118-
4119- The REACTER protocol relies on classical force fields. For the reaction to
4120- occur, an \textit {atom map } containing information about the reaction mechanism
4121- must be provided by the user. The atom map specifies which atoms are
4122- the initiators to the reaction and what are the distance cutoffs. In addition,
4123- pre-reaction and post-reaction molecule templates must be provided.
4124-
4125- Download the two atoms maps, \href {\filepath tutorial8/rxn1_stp1_map}{\textit {rxn1$ \_ $ stp1$ \_ $ map }}
4126- and \href {\filepath tutorial8/rxn1_stp1_map}{\textit {rxn1$ \_ $ stp1$ \_ $ map }},
4127- the two templates for the unreacted molecules,
4128- \href {\filepath tutorial8/rxn1_stp1_unreacted.molecule_template}{\textit {rxn1$ \_ $ stp1$ \_ $ unreacted.molecule$ \_ $ template }}
4129- and
4130- \href {\filepath tutorial8/rxn1_stp2_unreacted.molecule_template}{\textit {rxn1$ \_ $ stp2$ \_ $ unreacted.molecule$ \_ $ template }},
4131- as well as the two templates for the reacted molecules,
4132- \href {\filepath tutorial8/rxn1_stp1_reacted.molecule_template}{\textit {rxn1$ \_ $ stp1$ \_ $ reacted.molecule$ \_ $ template }}
4133- and
4134- \href {\filepath tutorial8/rxn1_stp2_reacted.molecule_template}{\textit {rxn1$ \_ $ stp2$ \_ $ reacted.molecule$ \_ $ template }}.
4115+ \subsubsection {Reaction templates }
4116+
4117+ The REACTER protocol enables the modeling of chemical reactions when using
4118+ classical force fields. The user must provide a molecule template for the reactants,
4119+ a molecule template for the products, and an \textit {reaction map } file that
4120+ provides an atom mapping between the two templates. The reaction map file contains
4121+ other information, such as which atoms are the initiators for the reaction, and which
4122+ are edge atoms that would connect the rest of a long polymer chain in the simulation.
4123+
4124+ There are three reactions to be defined: the polymerization of two styrene monomers,
4125+ the addition of a strene monomer onto the end of a growing polymer chain, and the
4126+ linking of two polymer chains. Download the three files associated with each reaction.
4127+ The file names associated with each reaction use the abbreviation `M' for monomer and `P'
4128+ for polymer. The first reaction uses the prefix `M-M' for the pre-reaction template, post-reaction
4129+ template, and reaction map file (\href {\filepath tutorial8/M-M.rxnmap}{\textit {M-M.rxnmap }},
4130+ \href {\filepath tutorial8/M-M_pre.lmpmol}{\textit {M-M$ \_ $ pre.lmpmol }},
4131+ \href {\filepath tutorial8/M-M_post.lmpmol}{\textit {M-M$ \_ $ post.lmpmol }}).
4132+ The second reaction uses the prefix `M-P', (\href {\filepath tutorial8/M-P.rxnmap}{\textit {M-P.rxnmap }},
4133+ \href {\filepath tutorial8/M-P_pre.lmpmol}{\textit {M-P$ \_ $ pre.lmpmol }},
4134+ \href {\filepath tutorial8/M-P_post.lmpmol}{\textit {M-P$ \_ $ post.lmpmol }}).
4135+ The third reaction uses the prefix `P-P', (\href {\filepath tutorial8/P-P.rxnmap}{\textit {P-P.rxnmap }},
4136+ \href {\filepath tutorial8/P-P_pre.lmpmol}{\textit {P-P$ \_ $ pre.lmpmol }},
4137+ \href {\filepath tutorial8/P-P_post.lmpmol}{\textit {P-P$ \_ $ post.lmpmol }}).
41354138
41364139% S.G.: @jrgissing, here we could describe the specifity, or at least the most important
41374140% details of the atom maps.
@@ -4141,7 +4144,7 @@ \subsubsection{Atom maps and molecule templates}
41414144\subsubsection {Simulating the reaction }
41424145
41434146The first step, before simulating the reaction, is to import the previously
4144- generated configuration. Create a new input file named \textit {reacting .lmp },
4147+ generated configuration. Create a new input file named \textit {polymerize .lmp },
41454148and copy the following lines into it:
41464149{\normalsize
41474150\begin {verbatim }
@@ -4159,7 +4162,7 @@ \subsubsection{Simulating the reaction}
41594162
41604163special_bonds lj/coul 0 0 1
41614164
4162- read_data cnt-nylon -mix.data &
4165+ read_data CNT-PS -mix.data &
41634166 extra/bond/per/atom 5 &
41644167 extra/angle/per/atom 15 &
41654168 extra/dihedral/per/atom 15 &
@@ -4168,46 +4171,42 @@ \subsubsection{Simulating the reaction}
41684171\end {verbatim }
41694172}
41704173Here, the \textit {read$ \_ $ data } command is used to import \textit {cnt-nylon-mix.data }.
4171- Then, let us import all four molecules template using the \textit {molecule } command:
4174+ Then, let us import all six molecules template using the \textit {molecule } command:
41724175{\normalsize
41734176\begin {verbatim }
4174- molecule mol1 rxn1_stp1_unreacted.molecule_template
4175- molecule mol2 rxn1_stp1_reacted.molecule_template
4176- molecule mol3 rxn1_stp2_unreacted.molecule_template
4177- molecule mol4 rxn1_stp2_reacted.molecule_template
4177+ molecule mol1 M-M_pre.lmpmol
4178+ molecule mol2 M-M_post.lmpmol
4179+ molecule mol3 M-P_pre.lmpmol
4180+ molecule mol4 M-P_post.lmpmol
4181+ molecule mol5 P-P_pre.lmpmol
4182+ molecule mol6 P-P_post.lmpmol
41784183\end {verbatim }
41794184}
41804185In order to follow the evolution of the reaction with time, let us generate images
41814186of the system using \textit {dump image }:
41824187{\normalsize
41834188\begin {verbatim }
4184- dump mydmp all image 1000 dump.mixing.*.ppm &
4185- type type shiny 0.1 box no 0.01 &
4186- view 0 0 zoom 1.8 fsaa yes bond atom 0.5
4187- dump_modify mydmp backcolor white &
4188- acolor c2 gray acolor c_1 lightslategray &
4189- acolor o dimgray acolor o_1 dimgray &
4190- acolor hc lightslategray &
4191- acolor ho lightslategray &
4192- acolor hn lightslategray acolor hw white &
4193- acolor o* red acolor n darkslategray &
4194- acolor na darkslategray &
4195- acolor cp lightpink &
4196- adiam c2 0.3 adiam c_1 0.3 &
4197- adiam cp 0.3 adiam o 0.28 &
4198- adiam o_1 0.28 adiam o* 2.8 &
4199- adiam hc 0.15 adiam ho 0.15 &
4200- adiam hn 0.15 adiam hw 1.5 &
4201- adiam n 0.3 adiam na 0.3
4189+ dump mydmp all image 1000 dump.mix.*.ppm &
4190+ type type shiny 0.1 box no 0.01 &
4191+ view 90 0 zoom 3 fsaa yes bond atom 0.5
4192+ dump_modify mydmp backcolor white &
4193+ acolor cp gray acolor c=1 gray &
4194+ acolor c= gray acolor c1 gray &
4195+ acolor c2 gray acolor c3 gray &
4196+ adiam cp 0.3 adiam c=1 0.3 &
4197+ adiam c= 0.3 adiam c1 0.3 &
4198+ adiam c2 0.3 adiam c3 0.3 &
4199+ acolor hc white adiam hc 0.15
42024200\end {verbatim }
42034201}
4204- Then, using the \textit {fix bond/react },
4202+ Then, using the \textit {fix bond/react },
42054203{\normalsize
42064204\begin {verbatim }
42074205fix myrxns all bond/react &
42084206 stabilization yes statted_grp 0.03 &
4209- react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map
4210- react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map
4207+ react R1 all 1 0 3.0 mol1 mol2 M-M.rxnmap &
4208+ react R2 all 1 0 3.0 mol3 mol4 M-P.rxnmap &
4209+ react R3 all 1 0 5.0 mol5 mol6 P-P.rxnmap
42114210\end {verbatim }
42124211}
42134212With the \textit {stabilization } keyword, the \textit {bond/react } command will
@@ -4216,10 +4215,10 @@ \subsubsection{Simulating the reaction}
42164215used, for instance, in \hyperref [sheared-confined-label]{Tutorial 4}). The two
42174216\textit {react } keywords contain specific details about the two reactions
42184217involved here, i.e. a transformation of \textit {mol1 } into \textit {mol2 } based
4219- on the atom map \textit {rxn1$ \_ $ stp1$ \_ $ map }, and a transformation of
4218+ on the atom map \textit {rxn1$ \_ $ stp1$ \_ $ map }, and a transformation of
42204219\textit {mol3 } into \textit {mol4 } based on the atom map \textit {rxn1$ \_ $ stp2$ \_ $ map }.
42214220
4222- Finally, let us use the \textit {fix nvt } to perform the integration of the
4221+ Finally, let us use the \textit {fix nvt } to perform the integration of the
42234222equation of motion and control the temperature of the system:
42244223{\normalsize
42254224\begin {verbatim }
@@ -4228,7 +4227,7 @@ \subsubsection{Simulating the reaction}
42284227
42294228thermo 1000
42304229thermo_style custom step temp pe $
4231- etotal press f_myrxns[1] f_myrxns[2 ]
4230+ etotal press f_myrxns[* ]
42324231
42334232run 50000
42344233\end {verbatim }
0 commit comments