Skip to content

Commit 54e848e

Browse files
authored
Merge pull request #68 from lammpstutorials/cecimarques-patch-1
Update lammps-tutorials.tex
2 parents 9a23608 + db081f4 commit 54e848e

1 file changed

Lines changed: 35 additions & 17 deletions

File tree

lammps-tutorials.tex

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2993,7 +2993,7 @@ \subsubsection{Imposed shearing}
29932993
thermo_style custom step temp etotal f_mysf1[1] f_mysf2[1]
29942994
\end{lstlisting}
29952995
Let us also extract the density and velocity profiles using
2996-
the \lmpcmd{chunk/atom} and \lmpcmd{ave/chunk} commands. {\color{blue}These
2996+
the \lmpcmd{chunk/atom} and \lmpcmd{ave/chunk} commands. {\color{blue}When deployed as below, these
29972997
commands discretize the simulation domain into spatial bins and compute and output
29982998
average properties of the atoms belonging to each bin, here the velocity
29992999
along $x$ (\lmpcmd{vx}) within the bins.} Add the following lines to \flecmd{shearing.lmp}:
@@ -3105,7 +3105,8 @@ \subsubsection{Prepare and relax}
31053105
and a \lmpcmd{.data} file is imported by the \lmpcmd{read\_data} command.
31063106

31073107
The initial topology given by \href{\filepath tutorial5/silica.data}{\dwlcmd{silica.data}}
3108-
is a small amorphous silica structure. {\color{blue}This structure was generated in a prior
3108+
{\color{blue} corresponds to} a small amorphous silica structure.
3109+
{\color{blue}This structure was generated in a prior
31093110
simulation using the Vashishta force field~\cite{vashishta1990interaction}.}
31103111
If you open the \flecmd{silica.data} file, you will find in the \lmpcmd{Atoms}
31113112
section that all silicon atoms have a charge of $q = 1.1\,\text{e}$, and all oxygen
@@ -3124,7 +3125,8 @@ \subsubsection{Prepare and relax}
31243125
pair_coeff * * ffield.reax.CHOFe Si O
31253126
fix myqeq all qeq/reaxff 1 0.0 10.0 1.0e-6 reaxff maxiter 400
31263127
\end{lstlisting}
3127-
In this case, the \lmpcmd{pair\_style reaxff} is used without a control file. The
3128+
In this case, the \lmpcmd{pair\_style reaxff} is used without a control file
3129+
{\color{blue}(see note below)}. The
31283130
\lmpcmd{safezone} and \lmpcmd{mincap} keywords are added to prevent
31293131
allocation issues, which sometimes can trigger segmentation faults and
31303132
\lmpcmd{bondchk} errors. The \lmpcmd{pair\_coeff} command uses the
@@ -3156,6 +3158,10 @@ \subsubsection{Prepare and relax}
31563158
variable qO equal charge(grpO)/count(grpO)
31573159
variable vq atom q
31583160
\end{lstlisting}
3161+
{\color{blue} The definition of the equal style variables qSi and qO
3162+
make use of functions pre-defined within LAMMPS that allow calculating
3163+
the total charge of atoms belonging to a group (charge()) and the total
3164+
number of atoms in the group (count()). }
31593165
To print the averaged charges \lmpcmd{qSi} and \lmpcmd{qO} using the
31603166
\lmpcmd{thermo\_style} command, and create images of the system. Add the
31613167
following lines to \flecmd{relax.lmp}:
@@ -3439,8 +3445,10 @@ \subsubsection{Decorate the surface}
34393445
fix myspec all reaxff/species 5 1 5 decorate.species &
34403446
element Si O H
34413447
\end{lstlisting}
3448+
{\color{blue} The commands above are, once again, similar to the ones of the previous script.}
34423449
Here, the $+1 \mathrm{e}{-10}$ was added to the denominator of the \lmpcmd{variable qH}
3443-
to avoid dividing by 0 at the beginning of the simulation. Finally, let us
3450+
to avoid dividing by 0 at the beginning of the simulation{\color{blue}, as no hydrogen
3451+
atoms exists in the simulation domain yet}. Finally, let us
34443452
create a loop with 10 steps, and create two hydrogen atoms at random locations at
34453453
every step:
34463454
\begin{lstlisting}
@@ -3489,7 +3497,7 @@ \subsection{Tutorial 6: Water adsorption in silica}
34893497
molecules in cracked silica material (Fig.~\ref{fig:GCMC}). This tutorial
34903498
illustrates the use of the grand canonical ensemble in molecular simulation, an
34913499
open ensemble where the number of atoms or molecules in the simulation box can vary.
3492-
By employing the grand canonical ensemble, {\color{blue}we simulate water in a nanoporous
3500+
By {\color{blue}using this combination, we simulate water in a nanoporous
34933501
SiO$_2$ structure at a specified chemical potential.}
34943502

34953503
\subsubsection{Generation of the silica block}
@@ -3521,12 +3529,13 @@ \subsubsection{Generation of the silica block}
35213529
create_atoms Si random 240 5802 box overlap 2.0 maxtry 500
35223530
create_atoms O random 480 1072 box overlap 2.0 maxtry 500
35233531
\end{lstlisting}
3524-
The \lmpcmd{create\_atoms} commands are used to place
3532+
{\color{blue}In line with what is done in previous tutorials, the}
3533+
\lmpcmd{create\_atoms} commands are used to place
35253534
240 Si atoms and 480 O atoms, respectively. This corresponds to
35263535
an initial density of approximately $2$\,g/cm$^3$, which is close
35273536
to the expected final density of amorphous silica at 300\,K.
35283537

3529-
Now, specify the pair coefficients by indicating that the first atom type
3538+
Now, specify the {\color{blue} potential parameters} by indicating that the first atom type
35303539
is \lmpcmd{Si} and the second is \lmpcmd{O}:
35313540
\begin{lstlisting}
35323541
pair_coeff * * SiO.1990.vashishta Si O
@@ -3576,6 +3585,10 @@ \subsubsection{Generation of the silica block}
35763585
fix mynvt all nvt temp 6000 300 0.1
35773586
run 30000
35783587
\end{lstlisting}
3588+
{\color{blue} In this case, the initial and final target temperatures
3589+
set for the Nose-Hoover thermostat is different, causing it to evolve
3590+
linearly within the number of timesteps evoked in the \lmpcmd{run}
3591+
command. }
35793592
In the third step, the system is equilibrated at the final desired
35803593
conditions, $T = 300\,\text{K}$ and $p = 1\,\text{atm}$,
35813594
using an anisotropic pressure coupling:
@@ -3588,16 +3601,18 @@ \subsubsection{Generation of the silica block}
35883601
write_data generate.data
35893602
\end{lstlisting}
35903603
Here, an anisotropic barostat is used.
3591-
Anisotropic barostats adjust the dimensions independently, which is
3604+
{\color{blue}As previously mentioned, a}nisotropic
3605+
barostats adjust the dimensions independently, which is
35923606
generally suitable for a solid phase.
35933607

35943608
Run the simulation using LAMMPS. From the \guicmd{Charts} window, the temperature
35953609
evolution can be observed, showing that it closely follows the desired annealing procedure (Fig.~\ref{fig:GCMC-dimension}\,a).
35963610
The evolution of the box dimensions over time confirms that the box
35973611
{\color{blue}is deforming} during the last stage of the simulation
35983612
(Fig.~\ref{fig:GCMC-dimension}\,b). After the simulation completes, the final
3599-
LAMMPS topology file called \flecmd{generate.data}
3600-
will be located next to \flecmd{generate.lmp} (Fig.~\ref{fig:GCMC-snapshot}).
3613+
{\color{blue} microstate attained during the dynamics and the system topology
3614+
will be written to a} LAMMPS {\color{blue} data }file called \flecmd{generate.data}
3615+
{\color{blue}which} will be located next to \flecmd{generate.lmp} (Fig.~\ref{fig:GCMC-snapshot}).
36013616

36023617
\begin{figure}
36033618
\centering
@@ -3646,8 +3661,9 @@ \subsubsection{Cracking the silica}
36463661

36473662
write_data cracking.data
36483663
\end{lstlisting}
3649-
{\color{blue}The \lmpcmd{fix nvt} command integrates the Nosé-Hoover equations
3650-
of motion and is employed to control the temperature of the system.}
3664+
{\color{blue}As discussed, the \lmpcmd{fix nvt} command integrates the Nosé-Hoover equations
3665+
of motion as originally derived to sample the NVT ensemble,
3666+
which allows controlling the temperature of the system.}
36513667
As observed from the generated images, the atoms
36523668
progressively adjust to the changing box dimensions. At some point,
36533669
bonds begin to break, leading to the appearance of
@@ -3672,11 +3688,13 @@ \subsubsection{Adding water}
36723688

36733689
To add the water molecules to the silica, we will employ the Monte Carlo
36743690
method in the grand canonical ensemble (GCMC). In short, the system is
3675-
placed into contact with a virtual reservoir of a given chemical
3676-
potential $\mu$, and multiple attempts to insert water molecules at
3677-
random positions are made. Each attempt is either accepted or rejected
3678-
based on energy considerations. For further details, please refer to
3679-
classical textbooks like Ref.~\citenum{frenkel2023understanding}.
3691+
placed into contact with a virtual reservoir {\color{blue} containing pure
3692+
water at a given thermodynamic state}, and multiple attempts to insert
3693+
water molecules at random positions are made. {\color{blue} In the grand
3694+
canonical ensemble, each} attempt is either accepted or rejected based on
3695+
{\color{blue} internal} energy {\color{blue} and chemical potential, $\mu$}
3696+
considerations. For further details, please refer to
3697+
classical textbooks like Ref.~\citenum{frenkel2023understanding}.
36803698

36813699
% \paragraph{Using hydrid potentials}
36823700

0 commit comments

Comments
 (0)