@@ -1294,11 +1294,16 @@ \subsubsection{Unbreakable bonds}
12941294
12951295The \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
12991301linked 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
13021307different sections in a data file change with different settings. In
13031308particular, the \lmpcmd {Atoms} section may have a different number of
13041309columns, 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
13091314style 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,
13121318we need to specify the parameters of both the bonded and
13131319non-bonded potentials. The parameters we use are taken
13141320from the OPLS-AA (Optimized Potentials for Liquid Simulations-All-Atom)
13151321force 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}
13191326pair_coeff 1 1 0.066 3.4
13201327bond_coeff 1 469 1.4
@@ -1337,19 +1344,22 @@ \subsubsection{Unbreakable bonds}
13371344\lmpcmd {dihedral\_ coeff} and \lmpcmd {improper\_ coeff} define the potentials
13381345for the constraints between 4 atoms.
13391346
1347+ \begin {note }
13401348Rather than copying the contents of the file into the input, we
13411349incorporate it using the \lmpcmd {include} command. Using \lmpcmd {include} allows
13421350us to conveniently reuse the parameter settings
13431351in other inputs or switch them with others. This will become more general
13441352when using type labels, which is shown in the next
13451353tutorial~\cite {typelabel_paper }.
1354+ \end {note }
13461355
13471356\paragraph {Prepare the initial state }
13481357
13491358In this tutorial, a deformation will be applied to the CNT by displacing
13501359the atoms located at its edges. To achieve this, we will first isolate the
13511360atoms 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}
13541364group carbon_atoms type 1
13551365variable xmax equal bound(carbon_atoms,xmax)-0.5
@@ -1368,7 +1378,8 @@ \subsubsection{Unbreakable bonds}
13681378and $ x > x_\text {max}$ (\lmpcmd {rtop}, for region top).
13691379
13701380Finally, 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}
13731384group cnt_top region rtop
13741385group cnt_bot region rbot
@@ -1394,6 +1405,7 @@ \subsubsection{Unbreakable bonds}
13941405the \guicmd {Output} window. It is an important check to make sure that the number
13951406of atoms in each group corresponds to what is expected, as shown here:
13961407\ begin{lstlisting}
1408+ 700 atoms in group carbon_atoms
1397140910 atoms in group cnt_top
1398141010 atoms in group cnt_bot
13991411680 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}
14211434reset_atoms id sort yes
14221435velocity cnt_mid create 300 48455 mom yes rot yes
@@ -1434,7 +1447,7 @@ \subsubsection{Unbreakable bonds}
14341447fix mynve2 cnt_bot nve
14351448fix 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
14391452from these groups are recalculated at every step. The \lmpcmd {fix nvt} does the
14401453same for the \lmpcmd {cnt\_ mid} group, while also applying a Nos\' e-Hoover thermostat
@@ -1457,16 +1470,17 @@ \subsubsection{Unbreakable bonds}
14571470they 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+
14701484Next, to measure the strain and stress applied to the CNT, let us create a
14711485variable for the distance $ L_\text {cnt}$ between the two edges,
14721486as well as a variable $ F_\text {cnt}$ for the force applied on the edges:
@@ -1487,7 +1501,8 @@ \subsubsection{Unbreakable bonds}
14871501dump_modify viz pad 9 backcolor white adiam 1 0.85 bdiam 1 1.0
14881502\end {lstlisting }
14891503Let 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}
14921507compute Tmid cnt_mid temp
14931508thermo 100
@@ -1554,9 +1569,9 @@ \subsubsection{Unbreakable bonds}
15541569the \flecmd {unbreakable.yaml} file. Then, a certain pattern is
15551570identified and stored as a string character named `docs'. The string is
15561571then 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
15601575information from the first minimization run, and `thermo[1]' to access the
15611576information from the second MD run. The data extracted from
15621577the \flecmd {unbreakable.yaml} file can then be used to plot the stress-strain
@@ -1601,14 +1616,12 @@ \subsubsection{Breakable bonds}
16011616to \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-
16121625Since bonds, angles, and dihedrals do not need to be
16131626explicitly set when using AIREBO, some simplification must be made to the
16141627\flecmd {.data} file. The new \flecmd {.data}
0 commit comments