Skip to content

Commit 5eba70e

Browse files
committed
final cleaning generate-step tutorial 6
1 parent e30af75 commit 5eba70e

8 files changed

Lines changed: 1861 additions & 1804 deletions

File tree

figures/GCMC-dimension.png

-66.9 KB
Loading

figures/GCMC-snapshot.png

-601 Bytes
Loading

files/tutorial6/solution/generate.data

Lines changed: 1445 additions & 1441 deletions
Large diffs are not rendered by default.

files/tutorial6/solution/generate.ipynb

Lines changed: 94 additions & 58 deletions
Large diffs are not rendered by default.

files/tutorial6/solution/generate.lmp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pair_style vashishta
66
neighbor 1.0 bin
77
neigh_modify delay 1
88

9-
region box block -16.717 16.717 -9.0 9.0 -9.0 9.0
9+
region box block -18.0 18.0 -9.0 9.0 -9.0 9.0
1010
create_box 2 box
1111
labelmap atom 1 Si 2 O
1212
mass Si 28.0855
@@ -17,16 +17,16 @@ create_atoms O random 480 1072 box overlap 2.0 maxtry 500
1717
pair_coeff * * SiO.1990.vashishta Si O
1818

1919
dump viz all image 250 myimage-*.ppm type type &
20-
shiny 0.1 box no 0.01 view 180 90 zoom 2.5 size 1000 450
20+
shiny 0.1 box no 0.01 view 180 90 zoom 3.0 size 1000 420
2121
dump_modify viz backcolor white &
2222
acolor Si yellow adiam Si 2.5 &
2323
acolor O red adiam O 2
2424

2525
thermo 250
26-
thermo_style custom step temp etotal density
26+
thermo_style custom step temp etotal vol density
2727

28-
compute myRDF all rdf 200 Si O
29-
fix myat all ave/time 10 500 5000 c_myRDF[*] file rdf.dat mode vector
28+
# compute myRDF all rdf 200 Si O
29+
# fix myat all ave/time 10 500 5000 c_myRDF[*] file rdf.dat mode vector
3030

3131
velocity all create 6000 8289 rot yes dist gaussian
3232
fix mynvt all nvt temp 6000 6000 0.1

files/tutorial6/solution/generate.log

Lines changed: 271 additions & 267 deletions
Large diffs are not rendered by default.

journal-article.bib

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,3 +746,14 @@ @article{mills1955remeasurement
746746
year={1955},
747747
publisher={ACS Publications}
748748
}
749+
750+
@article{della1992molecular,
751+
title={Molecular dynamics simulation of silica liquid and glass},
752+
author={Della Valle, Raffaele Guido and Andersen, Hans C},
753+
journal={The Journal of chemical physics},
754+
volume={97},
755+
number={4},
756+
pages={2682--2689},
757+
year={1992},
758+
publisher={American Institute of Physics}
759+
}

lammps-tutorials.tex

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3134,7 +3134,7 @@ \subsubsection{Generation of the silica block}
31343134
of mass 28.0855\,g/mol and \lmpcmd{O} of mass 15.9994\,g/mol.
31353135
Add the following lines to \flecmd{generate.lmp}:
31363136
\begin{lstlisting}
3137-
region box block -12 12 -12 12 -12 12
3137+
region box block -18.0 18.0 -9.0 9.0 -9.0 9.0
31383138
create_box 2 box
31393139
labelmap atom 1 Si 2 O
31403140
mass Si 28.0855
@@ -3143,7 +3143,9 @@ \subsubsection{Generation of the silica block}
31433143
create_atoms O random 480 1072 box overlap 2.0 maxtry 500
31443144
\end{lstlisting}
31453145
The \lmpcmd{create\_atoms} commands are used to place
3146-
240 Si atoms, and 480 atoms, respectively.
3146+
240 Si atoms, and 480 atoms, respectively. This corresponds to
3147+
an initial density of approximately $2$\,g/cm$^3$, which is close
3148+
to the expected final density of amorphous silica at 300\,K.
31473149

31483150
Now, specify the pair coefficients by indicating that the first atom type
31493151
is \lmpcmd{Si} and the second is \lmpcmd{O}:
@@ -3157,68 +3159,68 @@ \subsubsection{Generation of the silica block}
31573159
evolution of the system with time:
31583160
\begin{lstlisting}
31593161
dump viz all image 250 myimage-*.ppm type type &
3160-
shiny 0.1 box no 0.01 view 180 90 zoom 1.6 size 1000 650
3161-
dump_modify viz backcolor white acolor Si yellow &
3162-
adiam Si 2.5 acolor O red adiam O 2
3162+
shiny 0.1 box no 0.01 view 180 90 zoom 3.0 size 1000 420
3163+
dump_modify viz backcolor white &
3164+
acolor Si yellow adiam Si 2.5 &
3165+
acolor O red adiam O 2
31633166
\end{lstlisting}
3164-
Let us also print the box dimensions, \lmpcmd{lx}, \lmpcmd{ly}, and \lmpcmd{lz}:
3167+
Let us also print the box volume and system density, alongside the
3168+
temperature and total energy:
31653169
\begin{lstlisting}
31663170
thermo 250
3167-
thermo_style custom step temp etotal vol lx ly lz
3171+
thermo_style custom step temp etotal vol density
31683172
\end{lstlisting}
31693173

31703174
% SG
31713175
% FROM . Chem. Phys. 97, 2682–2689 (1992)
31723176
% https://doi.org/10.1063/1.463056
31733177
% 3 steps only. Say that its too fast to be correct. Show density.
31743178
% Show rdf instead of box size?
3175-
Finally, let us implement the annealing procedure which is
3176-
made of four consecutive runs. First, a $25\,\text{ps}$ phase at $T = 6000\,\text{K}$
3177-
and isotropic pressure coupling with desired pressure $p = 100\,\text{atm}$:
3179+
Finally, let us implement the annealing procedure which
3180+
consists of three consecutive runs. This procedure was inspired
3181+
by Ref.\,\cite{della1992molecular}. First, to melt the system,
3182+
a $10\,\text{ps}$ phase at $T = 6000\,\text{K}$ is performed:
31783183
\begin{lstlisting}
3179-
velocity all create 6000 4928459 rot yes dist gaussian
3180-
fix npt1 all npt temp 6000 6000 0.1 iso 100 100 1
3184+
velocity all create 6000 8289 rot yes dist gaussian
3185+
fix mynvt all nvt temp 6000 6000 0.1
31813186
timestep 0.001
3182-
run 25000
3187+
run 10000
31833188
\end{lstlisting}
3184-
Then, a second phase during which the system is cooled down from $T = 6000\,\text{K}$
3185-
to $T = 4000\,\text{K}$. An anisotropic pressure coupling is used, allowing all
3186-
three dimensions of the box to evolve independently from one another:
3189+
Next, a second phase, during which the system is cooled down from $T = 6000\,\text{K}$
3190+
to $T = 300\,\text{K}$, is implemented as follows:
31873191
\begin{lstlisting}
3188-
fix npt1 all npt temp 6000 4000 0.1 aniso 100 100 1
3189-
run 25000
3192+
fix mynvt all nvt temp 6000 300 0.1
3193+
run 30000
31903194
\end{lstlisting}
3191-
In the third step, the system is cooled further while also reducing the
3192-
pressure. The final step is a short equilibration at the final desired
3193-
condition, $T = 300\,\text{K}$ and $p = 1\,\text{atm}$:
3195+
In the third step, the system is equilibrated at the final desired
3196+
conditions, $T = 300\,\text{K}$ and $p = 1\,\text{atm}$,
3197+
using an anisotropic pressure coupling:
31943198
\begin{lstlisting}
3195-
fix npt1 all npt temp 4000 300 0.1 aniso 100 1 1
3196-
run 50000
3197-
fix npt1 all npt temp 300 300 0.1 aniso 1 1 1
3198-
run 25000
3199+
unfix mynvt
3200+
3201+
fix mynpt all npt temp 300 300 0.1 aniso 1 1 1
3202+
run 10000
31993203

32003204
write_data generate.data
32013205
\end{lstlisting}
3202-
Here, an isotropic barostat is used for the melted phase at $T = 6000\,\text{K}$,
3203-
and an anisotropic barostat is used for all following phases.
3204-
The anisotropic barostat adjusts the dimensions independently, which is more
3205-
suitable for a solid phase. For a liquid or a gas, an isotropic barostat is
3206-
usually the best choice.
3206+
Here, an anisotropic barostat is used.
3207+
Anisotropic barostats adjust the dimensions independently, which is
3208+
generally suitable for a solid phase.
32073209

32083210
Run the simulation using LAMMPS. From the \guicmd{Charts} window, the temperature
32093211
evolution can be observed, showing that it closely follows the desired annealing procedure (Fig.\,\ref{fig:GCMC-dimension}\,a).
32103212
The evolution of the box dimensions over time confirms that the box
3211-
deformed isotropically during the first stage of the simulation, followed by anisotropic deformation
3213+
deformed during the last stage of the simulation
32123214
(Fig.\,\ref{fig:GCMC-dimension}\,b). After the simulation completes, the final
32133215
LAMMPS topology file called \flecmd{generate.data}
32143216
will be located next to \flecmd{generate.lmp} (Fig.\,\ref{fig:GCMC-snapshot}).
32153217

32163218
\begin{figure}
32173219
\centering
32183220
\includegraphics[width=\linewidth]{GCMC-dimension}
3219-
\caption{a) Temperature $T$ of the system during annealing of the amorphous silica
3221+
\caption{a) Temperature $T$ of the system during annealing of the silica system
32203222
simulated during \hyperref[gcmc-silica-label]{Tutorial 6}.
3221-
b) Box dimensions along $x$, $y$, and $z$ during
3223+
b) System density, $\rho$, during
32223224
annealing. The vertical dashed lines mark the transition between the different
32233225
phases of the simulation.}
32243226
\label{fig:GCMC-dimension}

0 commit comments

Comments
 (0)