Skip to content

Commit db081f4

Browse files
authored
Update lammps-tutorials.tex
1 parent 3e34fee commit db081f4

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
@@ -2992,7 +2992,7 @@ \subsubsection{Imposed shearing}
29922992
thermo_style custom step temp etotal f_mysf1[1] f_mysf2[1]
29932993
\end{lstlisting}
29942994
Let us also extract the density and velocity profiles using
2995-
the \lmpcmd{chunk/atom} and \lmpcmd{ave/chunk} commands. {\color{blue}These
2995+
the \lmpcmd{chunk/atom} and \lmpcmd{ave/chunk} commands. {\color{blue}When deployed as below, these
29962996
commands discretize the simulation domain into spatial bins and compute and output
29972997
average properties of the atoms belonging to each bin, here the velocity
29982998
along $x$ (\lmpcmd{vx}) within the bins.} Add the following lines to \flecmd{shearing.lmp}:
@@ -3104,7 +3104,8 @@ \subsubsection{Prepare and relax}
31043104
and a \lmpcmd{.data} file is imported by the \lmpcmd{read\_data} command.
31053105

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

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

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

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

36013616
\begin{figure}
36023617
\centering
@@ -3654,8 +3669,9 @@ \subsubsection{Cracking the silica}
36543669

36553670
write_data cracking.data
36563671
\end{lstlisting}
3657-
{\color{blue}The \lmpcmd{fix nvt} command integrates the Nosé-Hoover equations
3658-
of motion and is employed to control the temperature of the system.}
3672+
{\color{blue}As discussed, the \lmpcmd{fix nvt} command integrates the Nosé-Hoover equations
3673+
of motion as originally derived to sample the NVT ensemble,
3674+
which allows controlling the temperature of the system.}
36593675
As observed from the generated images, the atoms
36603676
progressively adjust to the changing box dimensions. At some point,
36613677
bonds begin to break, leading to the appearance of
@@ -3671,11 +3687,13 @@ \subsubsection{Adding water}
36713687

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

36803698
% \paragraph{Using hydrid potentials}
36813699

0 commit comments

Comments
 (0)