Skip to content

Commit d5f9f6b

Browse files
committed
tested tutorial 3
1 parent 0b03b9b commit d5f9f6b

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

figures/PEG-in-vacuum.png

150 KB
Loading

files/tutorial3/peg.mol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# The DOI will be added upon publication
44
# Find more on GitHub: https://github.com/lammpstutorials
55

6-
PEG molecule
6+
# PEG molecule
77

88
59 atoms
99
58 bonds

files/tutorial3/pull.lmp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# The DOI will be added upon publication
44
# Find more on GitHub: https://github.com/lammpstutorials
55

6-
kspace_style pull 1e-5
6+
kspace_style pppm 1e-5
77
read_restart merge.restart

lammps-tutorials.tex

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ \subsubsection{Preparing the water reservoir}
18721872
Let us output the system into images by adding the following commands to \flecmd{water.lmp}:
18731873
\begin{lstlisting}
18741874
dump viz all image 250 myimage-*.ppm type type &
1875-
shiny 0.1 box no 0.01 view 0 90 zoom 3 size 1000 500
1875+
shiny 0.1 box no 0.01 view 0 90 zoom 3 size 1000 600
18761876
dump_modify viz backcolor white &
18771877
acolor OW red acolor HW white &
18781878
adiam OW 3 adiam HW 1.5
@@ -1888,11 +1888,12 @@ \subsubsection{Preparing the water reservoir}
18881888
thermo 500
18891889
thermo_style custom step temp etotal v_myvol v_rho
18901890
\end{lstlisting}
1891-
The variable \lmpcmd{myoxy} represents the number of atoms divided by 3 ($N_\text{oxy}$),
1892-
which corresponds to the number of molecules, and the variable \lmpcmd{myrho} is
1893-
the density in kg/mol:
1891+
Here, several variables are defined and used for converting the units of the
1892+
density in kg/mol: The variable \lmpcmd{myoxy} represents the number of
1893+
atoms divided by 3, which corresponds to the number of molecules, $N_\text{H2O}$,
1894+
and the variable \lmpcmd{myrho} is the density in kg/mol:
18941895
\begin{equation}
1895-
\rho = \dfrac{N_\text{oxy}}{V N_\text{A}},
1896+
\rho = \dfrac{N_\text{H2O}}{V N_\text{A}},
18961897
\end{equation}
18971898
where $V$ is the volume in m$^3$, $N_\text{A}$ the Avogadro number, and
18981899
$M = 0.018$\,kg/mol the molar mass of water.
@@ -1946,10 +1947,9 @@ \subsubsection{Solvating the PEG in water}
19461947

19471948
\begin{figure}
19481949
\centering
1949-
\includegraphics[width=0.45\linewidth]{PEG-in-vacuum}
1950+
\includegraphics[width=0.8\linewidth]{PEG-in-vacuum}
19501951
\caption{The PEG molecule from \hyperref[all-atom-label]{Tutorial 3}.
1951-
The carbon atoms are in gray, the oxygen
1952-
atoms in red, and the hydrogen atoms in white.}
1952+
The carbon atoms are in gray, the oxygen atoms in red, and the hydrogen atoms in white.}
19531953
\label{fig:PEG-in-vacuum}
19541954
\end{figure}
19551955

@@ -1975,7 +1975,7 @@ \subsubsection{Solvating the PEG in water}
19751975
let us create a single molecule in the middle of the box by adding the following
19761976
commands to \flecmd{merge.lmp}:
19771977
\begin{lstlisting}
1978-
molecule pegmol mol.mol
1978+
molecule pegmol peg.mol
19791979
create_atoms 0 single 0 0 0 mol pegmol 454756
19801980
\end{lstlisting}
19811981
Let us create a group for the atoms of the PEG (the previously created
@@ -2011,7 +2011,7 @@ \subsubsection{Solvating the PEG in water}
20112011
\begin{lstlisting}
20122012
dump viz all image 250 myimage-*.ppm type &
20132013
type shiny 0.1 box no 0.01 &
2014-
view 0 90 zoom 3 fsaa yes bond atom 0.8 size 1000 500
2014+
view 0 90 zoom 3.3 fsaa yes bond atom 0.8 size 1100 600
20152015
dump_modify viz backcolor white &
20162016
acolor OW red acolor HW white &
20172017
acolor OE darkred acolor OAlc darkred &
@@ -2028,7 +2028,7 @@ \subsubsection{Solvating the PEG in water}
20282028
timestep 1.0
20292029
run 10000
20302030

2031-
write_restart mix.restart
2031+
write_restart merge.restart
20322032
\end{lstlisting}
20332033
Run the simulation using LAMMPS. From the outputs, you can make
20342034
sure that the temperature remains close to the
@@ -2077,7 +2077,7 @@ \subsubsection{Stretching the PEG molecule}
20772077
\begin{lstlisting}
20782078
dump viz all image 250 myimage-*.ppm type &
20792079
type shiny 0.1 box no 0.01 &
2080-
view 0 90 zoom 3 fsaa yes bond atom 0.8 size 1000 500
2080+
view 0 90 zoom 3.3 fsaa yes bond atom 0.8 size 1100 600
20812081
dump_modify viz backcolor white &
20822082
acolor OW red acolor HW white &
20832083
acolor OE darkred acolor OAlc darkred &
@@ -2139,7 +2139,7 @@ \subsubsection{Stretching the PEG molecule}
21392139
(Fig.~\ref{fig:PEG-distance}\,a). Additionally, from the values of the dihedral angles
21402140
printed in the \flecmd{pull.dat} file, you can create a histogram
21412141
of dihedral angles for a specific type. For example, the angle $\phi$ for dihedrals
2142-
of type 1 (C-C-OE-C) is shown in Fig.~\ref{fig:PEG-distance}\,b. % SG: is it type 1 or 2?
2142+
of type 1 (C-C-OE-C) is shown in Fig.~\ref{fig:PEG-distance}\,b.
21432143

21442144
\begin{figure}
21452145
\centering
@@ -2155,8 +2155,8 @@ \subsubsection{Stretching the PEG molecule}
21552155
\caption{a) Evolution of
21562156
the radius of gyration $R_\text{gyr}$ of the PEG molecule
21572157
from \hyperref[all-atom-label]{Tutorial 3}, with the force
2158-
applied starting at $t = 15\,\text{ps}$. b) Histograms of the dihedral angles of type 2
2159-
in the absence (orange) and in the presence (blue) of the applied force.} % SG: is it type 1 or 2?
2158+
applied starting at $t = 15\,\text{ps}$. b) Histograms of the dihedral angles of type 1
2159+
in the absence (orange) and in the presence (blue) of the applied force.}
21602160
\label{fig:PEG-distance}
21612161
\end{figure}
21622162

0 commit comments

Comments
 (0)