Skip to content

Commit d00a27c

Browse files
committed
test tutorial 2 + reorder manifest file
1 parent 933d6ae commit d00a27c

File tree

8 files changed

+53
-41
lines changed

8 files changed

+53
-41
lines changed

files/tutorial2/.manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ solution/breakable.log
2727
solution/breakable.png
2828
solution/breakable.dat
2929
solution/breakable-yaml-reader.py
30+
solution/breakable-with-tip.lmp
3031

3132
# 3) support files
3233
unbreakable-yaml-reader.py

files/tutorial3/.manifest

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
##############################################################################
55
# 1) input file templates and data files
66
# the first file will be automatically loaded
7-
peg.mol
8-
water.mol
9-
parameters.inc
107
water.lmp
118
merge.lmp
129
pull.lmp
10+
peg.mol
11+
water.mol
12+
parameters.inc
1313

1414
# 2) solution files
1515
# only downloaded on request

files/tutorial4/.manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
##############################################################################
55
# 1) input file templates and data files
66
# the first file will be automatically loaded
7-
groups.inc
8-
parameters.inc
97
create.lmp
108
minimize.lmp
119
equilibrate.lmp
1210
shearing.lmp
11+
groups.inc
12+
parameters.inc
1313
water.mol
1414

1515
# 2) solution files

files/tutorial5/.manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
##############################################################################
55
# 1) input file templates and data files
66
# the first file will be automatically loaded
7-
decorate.lmp
7+
relax.lmp
88
deform.lmp
9+
decorate.lmp
910
reaxCHOFe.inc
10-
relax.lmp
1111
silica.data
1212

1313
# 2) solution files

files/tutorial6/.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
##############################################################################
55
# 1) input file templates and data files
66
# the first file will be automatically loaded
7+
generate.lmp
78
cracking.lmp
89
gcmc.lmp
9-
generate.lmp
1010
H2O.mol
1111
SiO.1990.vashishta
1212

files/tutorial7/.manifest

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
# 1) input file templates and data files
66
# the first file will be automatically loaded
77
free-sampling.lmp
8-
umbrella-sampling.meta
98
umbrella-sampling.lmp
10-
wham
9+
umbrella-sampling.meta
1110

1211
# 2) solution files
1312
# only downloaded on request
@@ -23,4 +22,4 @@ wham
2322
umbrella-sampling.meta
2423

2524
# 3) support files
26-
25+
wham

files/tutorial8/.manifest

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
##############################################################################
55
# 1) input file templates
66
# the first file will be automatically loaded
7-
CNT.data
87
mixing.lmp
8+
CNT.data
99
M-M_post.mol
1010
M-M_pre.mol
1111
M-M.rxnmap
@@ -16,7 +16,6 @@ polymerize.lmp
1616
P-P_post.mol
1717
P-P_pre.mol
1818
P-P.rxnmap
19-
solution
2019
styrene.mol
2120

2221
# 2) solution files

lammps-tutorials.tex

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,11 +1294,16 @@ \subsubsection{Unbreakable bonds}
12941294

12951295
The \lmpcmd{read\_data} command imports the
12961296
\href{\filepath tutorial2/unbreakable.data}{\dwlcmd{unbreakable.data}}
1297-
file, which contains information about the box
1298-
size, atom positions, as well as the identity of the atoms that are
1297+
file that should have been downloaded next
1298+
to \lmpcmd{unbreakable.lmp} during the tutorial setup. This file
1299+
contains information about the box size, atom positions, as well as the
1300+
identity of the atoms that are
12991301
linked by \lmpcmd{bonds}, \lmpcmd{angles}, \lmpcmd{dihedrals}, and
1300-
\lmpcmd{impropers} interactions. This file was created using VMD and TopoTools
1301-
\cite{kohlmeyer2017topotools}. The format details of the
1302+
\lmpcmd{impropers} interactions. It was created using VMD and TopoTools
1303+
\cite{kohlmeyer2017topotools}.
1304+
1305+
\begin{note}
1306+
The format details of the
13021307
different sections in a data file change with different settings. In
13031308
particular, the \lmpcmd{Atoms} section may have a different number of
13041309
columns, or the columns may represent different properties when the
@@ -1307,14 +1312,16 @@ \subsubsection{Unbreakable bonds}
13071312
\lmpcmd{Atoms} header line in the data files that indicates the intended
13081313
\lmpcmd{atom\_style}. LAMMPS will print a warning when the chosen atom
13091314
style does not match what is written in that comment.
1315+
\end{note}
13101316

1311-
This data file does not contain any sections with potential parameters; thus,
1317+
The \flecmd{.data} file does not contain any sections with potential parameters; thus,
13121318
we need to specify the parameters of both the bonded and
13131319
non-bonded potentials. The parameters we use are taken
13141320
from the OPLS-AA (Optimized Potentials for Liquid Simulations-All-Atom)
13151321
force field~\cite{jorgensenDevelopmentTestingOPLS1996}, and are given
1316-
in a separate \lmpcmd{unbreakable.inc} file. This file must be placed within the same
1317-
directory as the input file \flecmd{unbreakable.lmp}, and contains the following lines:
1322+
in a separate \lmpcmd{unbreakable.inc} file (also downloaded during
1323+
the tutorial setup). This file - that must be placed
1324+
next to \flecmd{unbreakable.lmp} - contains the following lines:
13181325
\begin{lstlisting}
13191326
pair_coeff 1 1 0.066 3.4
13201327
bond_coeff 1 469 1.4
@@ -1337,19 +1344,22 @@ \subsubsection{Unbreakable bonds}
13371344
\lmpcmd{dihedral\_coeff} and \lmpcmd{improper\_coeff} define the potentials
13381345
for the constraints between 4 atoms.
13391346

1347+
\begin{note}
13401348
Rather than copying the contents of the file into the input, we
13411349
incorporate it using the \lmpcmd{include} command. Using \lmpcmd{include} allows
13421350
us to conveniently reuse the parameter settings
13431351
in other inputs or switch them with others. This will become more general
13441352
when using type labels, which is shown in the next
13451353
tutorial~\cite{typelabel_paper}.
1354+
\end{note}
13461355

13471356
\paragraph{Prepare the initial state}
13481357

13491358
In this tutorial, a deformation will be applied to the CNT by displacing
13501359
the atoms located at its edges. To achieve this, we will first isolate the
13511360
atoms at the two edges and place them into groups named \lmpcmd{rtop} and
1352-
\lmpcmd{rbot}. Add the following lines to \flecmd{unbreakable.lmp}:
1361+
\lmpcmd{rbot}. Add the following lines to \flecmd{unbreakable.lmp},
1362+
just before the \lmpcmd{run 0} command:
13531363
\begin{lstlisting}
13541364
group carbon_atoms type 1
13551365
variable xmax equal bound(carbon_atoms,xmax)-0.5
@@ -1368,7 +1378,8 @@ \subsubsection{Unbreakable bonds}
13681378
and $x > x_\text{max}$ (\lmpcmd{rtop}, for region top).
13691379

13701380
Finally, let us define 3 groups of atoms corresponding to the atoms
1371-
in each of the 3 regions by adding to \flecmd{unbreakable.lmp}:
1381+
in each of the 3 regions by adding to \flecmd{unbreakable.lmp}
1382+
just before the \lmpcmd{run 0} command:
13721383
\begin{lstlisting}
13731384
group cnt_top region rtop
13741385
group cnt_bot region rbot
@@ -1394,6 +1405,7 @@ \subsubsection{Unbreakable bonds}
13941405
the \guicmd{Output} window. It is an important check to make sure that the number
13951406
of atoms in each group corresponds to what is expected, as shown here:
13961407
\begin{lstlisting}
1408+
700 atoms in group carbon_atoms
13971409
10 atoms in group cnt_top
13981410
10 atoms in group cnt_bot
13991411
680 atoms in group cnt_mid
@@ -1416,7 +1428,8 @@ \subsubsection{Unbreakable bonds}
14161428

14171429
\paragraph{The molecular dynamics}
14181430

1419-
Let us give an initial temperature to the atoms of the group \lmpcmd{cnt\_mid}:
1431+
Let us give an initial temperature to the atoms of the group \lmpcmd{cnt\_mid}
1432+
by adding the following commands to \flecmd{unbreakable.lmp}:
14201433
\begin{lstlisting}
14211434
reset_atoms id sort yes
14221435
velocity cnt_mid create 300 48455 mom yes rot yes
@@ -1434,7 +1447,7 @@ \subsubsection{Unbreakable bonds}
14341447
fix mynve2 cnt_bot nve
14351448
fix mynvt cnt_mid nvt temp 300 300 100
14361449
\end{lstlisting}
1437-
The \lmpcmd{fix nve} are applied to the atoms of \lmpcmd{cnt\_top} and
1450+
The \lmpcmd{fix nve} commands are applied to the atoms of \lmpcmd{cnt\_top} and
14381451
\lmpcmd{cnt\_bot}, respectively, and will ensure that the positions of the atoms
14391452
from these groups are recalculated at every step. The \lmpcmd{fix nvt} does the
14401453
same for the \lmpcmd{cnt\_mid} group, while also applying a Nos\'e-Hoover thermostat
@@ -1457,16 +1470,17 @@ \subsubsection{Unbreakable bonds}
14571470
they would if no other command was applied to them).
14581471

14591472
\begin{note}
1460-
The \lmpcmdnote{velocity set}
1461-
command imposes the velocity of a group of atoms at the start of a run but does
1462-
not enforce the velocity during the entire simulation. When \lmpcmdnote{velocity set}
1463-
is used in combination with \lmpcmdnote{setforce 0 0 0}, as is the case here, the
1464-
atoms won't feel any force during the entire simulation. According to the Newton
1465-
equation, no force means no acceleration, meaning that the initial velocity
1466-
will persist during the entire simulation, thus producing a constant velocity motion.
1473+
The \lmpcmdnote{velocity set}
1474+
command imposes the velocity of a group of atoms at the start of a run but does
1475+
not enforce the velocity during the entire simulation. When \lmpcmdnote{velocity set}
1476+
is used in combination with \lmpcmdnote{setforce 0 0 0}, as is the case here, the
1477+
atoms won't feel any force during the entire simulation. According to the Newton
1478+
equation, no force means no acceleration, meaning that the initial velocity
1479+
will persist during the entire simulation, thus producing a constant velocity motion.
14671480
\end{note}
14681481

14691482
\paragraph{Outputs}
1483+
14701484
Next, to measure the strain and stress applied to the CNT, let us create a
14711485
variable for the distance $L_\text{cnt}$ between the two edges,
14721486
as well as a variable $F_\text{cnt}$ for the force applied on the edges:
@@ -1487,7 +1501,8 @@ \subsubsection{Unbreakable bonds}
14871501
dump_modify viz pad 9 backcolor white adiam 1 0.85 bdiam 1 1.0
14881502
\end{lstlisting}
14891503
Let us run a small equilibration step to bring the system to the required
1490-
temperature before applying any deformation:
1504+
temperature before applying any deformation. Replace the \lmpcmd{run 0 post no}
1505+
command in \flecmd{unbreakable.lmp} with the following lines:
14911506
\begin{lstlisting}
14921507
compute Tmid cnt_mid temp
14931508
thermo 100
@@ -1554,9 +1569,9 @@ \subsubsection{Unbreakable bonds}
15541569
the \flecmd{unbreakable.yaml} file. Then, a certain pattern is
15551570
identified and stored as a string character named `docs'. The string is
15561571
then converted into a list, and $F_\text{cnt}$ and $L_\text{cnt}$
1557-
are extracted. The stress and strain
1558-
are then calculated, and the result is saved in a data file using the
1559-
NumPy `savetxt' function. `thermo[0]' can be used to access the
1572+
are extracted. The stress and strain are then calculated, and the result
1573+
is saved in a data file named \flecmd{unbreakable.dat} using
1574+
the NumPy `savetxt' function. `thermo[0]' can be used to access the
15601575
information from the first minimization run, and `thermo[1]' to access the
15611576
information from the second MD run. The data extracted from
15621577
the \flecmd{unbreakable.yaml} file can then be used to plot the stress-strain
@@ -1601,14 +1616,12 @@ \subsubsection{Breakable bonds}
16011616
to \lmpcmd{breakable.lmp}.
16021617

16031618
\begin{note}
1604-
With the \lmpcmdnote{metal} units system, times are in picoseconds ($10^{-12}$\,s)
1605-
instead of femtoseconds ($10^{-15}$\,s) in the case of the \lmpcmdnote{real} units system.
1606-
It is important to keep this in mind when setting parameters that are expressed
1607-
in time unit, such as the timestep or the time constant of the thermostat.
1619+
With the \lmpcmdnote{metal} units system, times are in picoseconds ($10^{-12}$\,s)
1620+
instead of femtoseconds ($10^{-15}$\,s) in the case of the \lmpcmdnote{real} units system.
1621+
It is important to keep this in mind when setting parameters that are expressed
1622+
in time unit, such as the timestep or the time constant of the thermostat.
16081623
\end{note}
16091624

1610-
\paragraph{Adapt the topology file}
1611-
16121625
Since bonds, angles, and dihedrals do not need to be
16131626
explicitly set when using AIREBO, some simplification must be made to the
16141627
\flecmd{.data} file. The new \flecmd{.data}

0 commit comments

Comments
 (0)