Skip to content

Commit 328a5fd

Browse files
committed
update tex for tiny CNT
1 parent 8707b17 commit 328a5fd

3 files changed

Lines changed: 66 additions & 57 deletions

File tree

figures/REACTED_VMD.png

-372 KB
Binary file not shown.

files/tutorial8/reacting.lmp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ molecule mol6 P-P_post.lmpmol
3030

3131
thermo 250
3232

33-
fix rxn1 all bond/react stabilization yes statted_grp 0.03 &
33+
fix rxn all bond/react stabilization yes statted_grp 0.03 &
3434
react R1 all 1 0 3.0 mol1 mol2 M-M.rxnmap stabilize_steps 100 &
3535
react R2 all 1 0 3.0 mol3 mol4 M-P.rxnmap stabilize_steps 100 &
3636
react R3 all 1 0 5.0 mol5 mol6 P-P.rxnmap stabilize_steps 100
@@ -39,7 +39,7 @@ fix 1 statted_grp_REACT nvt temp 530 530 100
3939

4040
fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1
4141

42-
thermo_style custom step temp press density f_rxn1[*]
42+
thermo_style custom step temp press density f_rxn[*]
4343

4444
dump mydmp all image 1000 dump.mixing.*.ppm &
4545
type type shiny 0.1 box no 0.01 &

lammps-tutorials.tex

Lines changed: 64 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ \section{Content and links}
419419

420420
In the following, all LAMMPS input or console commands are formatted
421421
with a \lmpcmd{colored background}. Keyboard shortcuts and
422-
file names are formatted in \flecmd{monospace}, and LAMMPS-GUI options and menus
422+
file names are formatted in \flecmd{monospace}, and LAMMPS--GUI options and menus
423423
are in \guicmd{quoted monospace}.
424424
% S.G.: I removed "folder names" because all folders will eventually be removed (TO CONTROL BEFORE SUBMITTING)
425425
% S.G.: I removed "Section titles" as well because it seems to be using a different style
@@ -1550,7 +1550,7 @@ \subsubsection{Breakable bonds}
15501550

15511551
\paragraph{Input file initialization}
15521552

1553-
Open the input named
1553+
Open the input named
15541554
\href{\filepath tutorial2/breakable.lmp}{\dwlcmd{breakable.lmp}} that should have
15551555
been downloaded next to \lmpcmd{unbreakable.lmp} during the tutorial setup.
15561556
There are only a few differences with the previous input. First, the \lmpcmd{metal}
@@ -1767,7 +1767,7 @@ \subsubsection{Preparing the water reservoir}
17671767
numeric atom types with a string (see the \flecmd{parameters.inc} file):
17681768
\lmpcmdnote{labelmap atom 1 OE 2 C 3 HC 4 H 5 CPos 6 OAlc 7 OW 8 HW}
17691769
Therefore, the oxygen and hydrogen atoms of water (respectively types 7 and 8)
1770-
can be referred to as `OW' and `HW', respectively. Similar maps are used for
1770+
can be referred to as `OW' and `HW', respectively. Similar maps are used for
17711771
the bond types, angle types, and dihedral types.
17721772
\end{note}
17731773

@@ -1999,7 +1999,7 @@ \subsubsection{Solvating the PEG in water}
19991999
\subsubsection{Stretching the PEG molecule}
20002000

20012001
Here, a constant force is applied to both ends of the PEG molecule until it
2002-
stretches. Open the file named \flecmd{pull.lmp}, which
2002+
stretches. Open the file named \flecmd{pull.lmp}, which
20032003
only contains two lines:
20042004
\begin{lstlisting}
20052005
kspace_style pppm 1e-5
@@ -2029,7 +2029,7 @@ \subsubsection{Stretching the PEG molecule}
20292029
\begin{lstlisting}
20302030
dump viz all image 250 myimage-*.ppm type &
20312031
type shiny 0.1 box no 0.01 &
2032-
view 0 90 zoom 3 fsaa yes bond atom 0.8 size 1000 500
2032+
view 0 90 zoom 3 fsaa yes bond atom 0.8 size 1000 500
20332033
dump_modify viz backcolor white &
20342034
acolor OW red acolor HW white &
20352035
acolor OE darkred acolor OAlc darkred &
@@ -2399,7 +2399,7 @@ \subsubsection{System preparation}
23992399
pair_style lj/cut/tip4p/long O H O-H H-O-H 0.1546 12.0
24002400
kspace_style pppm/tip4p 1.0e-5
24012401
kspace_modify slab 3.0
2402-
2402+
24032403
read_data create.data
24042404

24052405
include parameters.inc
@@ -2659,7 +2659,7 @@ \subsubsection{Imposed shearing}
26592659

26602660
thermo 250
26612661
thermo_modify temp Tfluid
2662-
thermo_style custom step temp etotal f_mysf1[1] f_mysf2[1]
2662+
thermo_style custom step temp etotal f_mysf1[1] f_mysf2[1]
26632663
\end{lstlisting}
26642664
Let us also extract the density and velocity profiles using
26652665
the \lmpcmd{chunk/atom} and \lmpcmd{ave/chunk} commands. These commands are
@@ -2812,7 +2812,7 @@ \subsubsection{Prepare and relax}
28122812
fix myhis1 grpSi ave/histo 10 500 5000 -1.5 2.5 1000 v_vq &
28132813
file relax-Si.histo mode vector
28142814
fix myhis2 grpO ave/histo 10 500 5000 -1.5 2.5 1000 v_vq &
2815-
file relax-O.histo mode vector
2815+
file relax-O.histo mode vector
28162816
\end{lstlisting}
28172817
We can also use the \lmpcmd{fix reaxff/species} to evaluate what species are
28182818
present within the simulation. It will be useful later when the system is deformed,
@@ -3163,7 +3163,7 @@ \subsubsection{Generation of the silica block}
31633163
temperature and total energy:
31643164
\begin{lstlisting}
31653165
thermo 250
3166-
thermo_style custom step temp etotal vol density
3166+
thermo_style custom step temp etotal vol density
31673167
\end{lstlisting}
31683168

31693169
% SG
@@ -3188,7 +3188,7 @@ \subsubsection{Generation of the silica block}
31883188
run 30000
31893189
\end{lstlisting}
31903190
In the third step, the system is equilibrated at the final desired
3191-
conditions, $T = 300\,\text{K}$ and $p = 1\,\text{atm}$,
3191+
conditions, $T = 300\,\text{K}$ and $p = 1\,\text{atm}$,
31923192
using an anisotropic pressure coupling:
31933193
\begin{lstlisting}
31943194
unfix mynvt
@@ -3461,7 +3461,7 @@ \subsubsection{Adding water}
34613461
Finally, let us use the \textit{fix gcmc} and perform the grand canonical Monte
34623462
Carlo steps. Add the following lines into \flecmd{gcmc.lmp}:
34633463
\begin{lstlisting}
3464-
variable tfac equal 5.0/3.0
3464+
variable tfac equal 5.0/3.0
34653465
fix fgcmc H2O gcmc 100 100 0 0 65899 300 -0.5 0.1 &
34663466
mol h2omol tfac_insert ${tfac} shake shak &
34673467
full_energy pressure 100
@@ -3802,7 +3802,7 @@ \subsubsection{Method 2: Umbrella sampling}
38023802
create_atoms 2 single 0 0 0
38033803
create_atoms 1 random 199 34134 myreg overlap 3 maxtry 50
38043804
\end{lstlisting}
3805-
Next, we assign the same mass and LJ parameters to both atom types
3805+
Next, we assign the same mass and LJ parameters to both atom types
38063806
1 and 2, and place the atoms of type 2 into a group named \lmpcmd{topull}:
38073807
\begin{lstlisting}
38083808
mass * 39.948
@@ -3936,7 +3936,7 @@ \subsection{Tutorial 8: Reactive Molecular Dynamics}
39363936
\centering
39373937
\includegraphics[width=\linewidth]{REACT}
39383938
\caption{Initial configuration for \hyperref[bond-react-label]{Tutorial 8}.
3939-
The system consists of 1000 styrene molecules packed around a single-walled
3939+
The system consists of 200 styrene molecules packed around a single-walled
39403940
CNT with a total system density of 0.9 g/cm$^3$.}
39413941
\label{fig:REACT}
39423942
\end{figure}
@@ -3983,25 +3983,21 @@ \subsubsection{Creating the system}
39833983
{\normalsize
39843984
\begin{verbatim}
39853985
read_data CNT.data &
3986-
extra/bond/per/atom 5 &
3987-
extra/angle/per/atom 15 &
3988-
extra/dihedral/per/atom 15 &
3989-
extra/improper/per/atom 25 &
3990-
extra/special/per/atom 25
3986+
extra/special/per/atom 20
39913987
\end{verbatim}
39923988
}
3993-
The CNT is about $(1.1\,\text{nm})^3$ in diameter and $(8.7\,\text{nm})^3$ long.
3994-
The box is $(8\,\text{nm})^3$ in the other dimensions, so filling the box with
3989+
The CNT is about 1.1 nm in diameter and 1.6 nm long.
3990+
The box is 5.2 nm in the other dimensions, so filling the box with
39953991
styrene monomers will be easy.
39963992
% S.G.: @jrgissing, here we could describe the content of nylon.data.
39973993
% How was it created, what is the specifity of the molecules involved, etc...
39983994

3999-
To add 1000 styrene molecules to the simulation box, add the following commands
3995+
To add 200 styrene molecules to the simulation box, add the following commands
40003996
to \textit{mixing.lmp}:
40013997
{\normalsize
40023998
\begin{verbatim}
40033999
molecule styrene styrene.lmpmol
4004-
create_atoms 0 random 1000 8305 NULL &
4000+
create_atoms 0 random 200 8305 NULL &
40054001
overlap 2.75 maxtry 500 mol styrene 7687
40064002
\end{verbatim}
40074003
}
@@ -4012,25 +4008,11 @@ \subsubsection{Creating the system}
40124008
reset_timestep 0
40134009
\end{verbatim}
40144010
}
4015-
Then, let us use \textit{dump image} to output images every 1000 steps:
4016-
{\normalsize
4017-
\begin{verbatim}
4018-
dump mydmp all image 1000 dump.mix.*.ppm &
4019-
type type shiny 0.1 box no 0.01 &
4020-
view 90 0 zoom 3 fsaa yes bond atom 0.5
4021-
dump_modify mydmp backcolor white &
4022-
acolor cp gray acolor c=1 gray &
4023-
acolor c= gray acolor c1 gray &
4024-
acolor c2 gray acolor c3 gray &
4025-
adiam cp 0.3 adiam c=1 0.3 &
4026-
adiam c= 0.3 adiam c1 0.3 &
4027-
adiam c2 0.3 adiam c3 0.3 &
4028-
acolor hc white adiam hc 0.15
4029-
\end{verbatim}
4030-
}
4031-
Then, let us density the system to a target value of a short equilibration of system using \textit{fix npt}
4032-
with a isotropic couplage. To speed up the equilibration of the system, let us
4033-
impose a relatively large pressure of 1000\,atm for the first 10\,ps:
4011+
Then, let us densify the system to a target value of 0.9 g/cm$^3$
4012+
by manually shrinking the simulation box at a constant rate. The dimension parallel
4013+
to the CNT axis will remain fixed, since the CNT is periodic in that direction.
4014+
The \textit{fix halt} feature is used to stop the box shrinkage once the target density is
4015+
reached.
40344016
{\normalsize
40354017
\begin{verbatim}
40364018
velocity all create 300.0 9845 dist gaussian &
@@ -4042,22 +4024,49 @@ \subsubsection{Creating the system}
40424024
variable rho equal density
40434025
fix 3 all halt 10 v_rho > 0.9 error continue
40444026
4045-
thermo 1000
4027+
thermo 500
40464028
thermo_style custom step temp pe etotal press &
4047-
density vol
4029+
density
40484030
40494031
run 9000
40504032
\end{verbatim}
40514033
}
4052-
Then, for the following 10\,ps, let us continue the equilibration
4053-
in the same constant-volume ensemble, and write the final state of the
4034+
For the next stage of the simulation, we will use \textit{dump image} to
4035+
output images every 1000 steps:
4036+
{\normalsize
4037+
\begin{verbatim}
4038+
dump mydmp all image 1000 dump.mix.*.ppm &
4039+
type type shiny 0.1 box no 0.01 &
4040+
view 90 0 zoom 3 fsaa yes bond atom 0.5
4041+
dump_modify mydmp backcolor white &
4042+
acolor cp gray acolor c=1 gray &
4043+
acolor c= gray acolor c1 gray &
4044+
acolor c2 gray acolor c3 gray &
4045+
adiam cp 0.3 adiam c=1 0.3 &
4046+
adiam c= 0.3 adiam c1 0.3 &
4047+
adiam c2 0.3 adiam c3 0.3 &
4048+
acolor hc white adiam hc 0.15
4049+
\end{verbatim}
4050+
}
4051+
For the following 10\,ps, let us equilibrate the densified system
4052+
in the constant-volume ensemble, and write the final state of the
40544053
system in a file named \textit{CNT-PS-mix.data}:
40554054
{\normalsize
40564055
\begin{verbatim}
40574056
unfix 2
40584057
unfix 3
4058+
reset_timestep 0
4059+
4060+
run 9999
4061+
\end{verbatim}
4062+
}
4063+
For visualization purposes, let us move the CNT to the center of the simulation box.
4064+
{\normalsize
4065+
\begin{verbatim}
4066+
fix centralize CNT recenter 0 0 0 units box &
4067+
shift all
4068+
run 1
40594069
4060-
run 10000
40614070
write_data CNT-PS-mix.data
40624071
\end{verbatim}
40634072
}
@@ -4134,7 +4143,7 @@ \subsubsection{Simulating the reaction}
41344143
\end{verbatim}
41354144
}
41364145
Here, the \textit{read$\_$data} command is used to import \textit{cnt-nylon-mix.data}.
4137-
Then, let us import all six molecules template using the \textit{molecule} command:
4146+
Then, let us import all six molecules templates using the \textit{molecule} command:
41384147
{\normalsize
41394148
\begin{verbatim}
41404149
molecule mol1 M-M_pre.lmpmol
@@ -4165,15 +4174,15 @@ \subsubsection{Simulating the reaction}
41654174
Then, using the \textit{fix bond/react},
41664175
{\normalsize
41674176
\begin{verbatim}
4168-
fix myrxns all bond/react &
4177+
fix rxn all bond/react &
41694178
stabilization yes statted_grp 0.03 &
41704179
react R1 all 1 0 3.0 mol1 mol2 M-M.rxnmap &
41714180
react R2 all 1 0 3.0 mol3 mol4 M-P.rxnmap &
41724181
react R3 all 1 0 5.0 mol5 mol6 P-P.rxnmap
41734182
\end{verbatim}
41744183
}
41754184
With the \textit{stabilization} keyword, the \textit{bond/react} command will
4176-
try to stabilize the atoms involved in the reaction using the \textit{nve/limit}
4185+
stabilize the atoms involved in the reaction using the \textit{nve/limit}
41774186
command with a maximum displacement of $0.03\,\mathrm{\AA{}}$ (a command that was
41784187
used, for instance, in \hyperref[sheared-confined-label]{Tutorial 4}). The three
41794188
\textit{react} keywords contain specific details about the three reactions
@@ -4185,17 +4194,17 @@ \subsubsection{Simulating the reaction}
41854194
{\normalsize
41864195
\begin{verbatim}
41874196
fix mynvt statted_grp_REACT nvt $
4188-
temp 300 300 100
4197+
temp 530 530 100
41894198
41904199
thermo 1000
4191-
thermo_style custom step temp pe $
4192-
etotal press f_myrxns[*]
4200+
thermo_style custom step temp press $
4201+
density f_rxn[*]
41934202
4194-
run 50000
4203+
run 10000
41954204
\end{verbatim}
41964205
}
41974206
Here, in addition, the \textit{thermo custom} command was called and was
4198-
asked to print the cumulative reaction counts from \textit{fix myrxns}.
4207+
asked to print the cumulative reaction counts from \textit{fix rxn}.
41994208
The number of reaction, $N_r$, can be seen to increase with time
42004209
(Fig.\,\ref{fig:evolution-reacting}). The final configuration with polymer
42014210
chain unwrapped from the simulation box is shown in Fig.\,\ref{fig:REACTED_VMD}).
@@ -4366,7 +4375,7 @@ \subsection{Opening, Editing, and Saving Files}
43664375
reformatted. Consistent formatting can improve the readability of
43674376
input files, especially long and complex ones.
43684377

4369-
If the file in the editor has unsaved changes, the word
4378+
If the file in the editor has unsaved changes, the word
43704379
``\*modified\*'' will appear in the window title. The current input
43714380
buffer can be saved by selecting ``Save'' or ``Save As...'' from the
43724381
``File'' menu. You can also click the ``Save'' icon on the left side

0 commit comments

Comments
 (0)