Skip to content

Commit 281dff8

Browse files
committed
some more layout tweaks
1 parent 1c8e389 commit 281dff8

File tree

1 file changed

+47
-45
lines changed

1 file changed

+47
-45
lines changed

lammps-tutorials.tex

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ \subsubsection{My first input}
488488

489489
\begin{figure}
490490
\centering
491-
\includegraphics[width=\linewidth]{GUI-1.png}
492-
\caption{A screenshot of the \lammpsgui{} \guicmd{Editor} window during
491+
\includegraphics[width=0.85\linewidth]{GUI-1.png}
492+
\caption{Screenshot of the \lammpsgui{} \guicmd{Editor} window during
493493
\hyperref[lennard-jones-label]{Tutorial 1}. The pop-up menu is the
494494
context menu for right-clicking on the \lmpcmd{units lj} command.}
495495
\label{fig:GUI-1}
@@ -546,8 +546,9 @@ \subsubsection{My first input}
546546
\label{fig:LJ-avatar}
547547
\end{figure}
548548

549-
The next step is to create the simulation box and populate it with atoms.
550-
Modify the \lmpcmd{System definition} category of \flecmd{initial.lmp} as shown below:
549+
The next step is to create the simulation box and populate it with
550+
atoms. Modify the \lmpcmd{System definition} category of
551+
\flecmd{initial.lmp} as shown below:
551552
\begin{lstlisting}
552553
# 2) System definition
553554
region simbox block -20 20 -20 20 -20 20
@@ -562,23 +563,23 @@ \subsubsection{My first input}
562563
on the region \lmpcmd{simbox} and reserves space for two types of atoms.
563564

564565
\begin{note}
565-
From this point on, any command referencing an atom type larger than 2
566-
will trigger an error. While it is possible to allocate more atom types
567-
than needed, you must assign a mass and provide force field parameters for
568-
each type. Failing to do so will cause LAMMPS to terminate with an error.
566+
From this point on, any command referencing an atom type larger than 2
567+
will trigger an error. While it is possible to allocate more atom
568+
types than needed, you must assign a mass and provide force field
569+
parameters for each atom type. Failing to do so will cause LAMMPS to
570+
terminate with an error.
569571
\end{note}
570572

571-
The third line, \lmpcmd{create\_atoms (\dots)}, generates 1500 atoms of type
572-
1 at random positions within the
573-
\lmpcmd{simbox} region. The integer 34134 is a seed for the
574-
internal random number generator, which can be changed to produce different
575-
sequences of random numbers and, consequently, different initial atom positions.
576-
The fourth line adds 100 atoms of type 2.
577-
Both \lmpcmd{create\_atoms} commands use the optional argument
578-
\lmpcmd{overlap 0.3}, which enforces a minimum distance of 0.3
579-
units between the randomly placed atoms. This constraint helps avoid
580-
``close contacts'' between atoms, which can lead to excessively
581-
large forces and simulation instability.
573+
The third line, \lmpcmd{create\_atoms (\dots)}, generates 1500 atoms of
574+
type 1 at random positions within the \lmpcmd{simbox} region. The
575+
integer 34134 is a seed for the internal random number generator, which
576+
can be changed to produce different sequences of random numbers and,
577+
consequently, different initial atom positions. The fourth line adds
578+
100 atoms of type 2. Both \lmpcmd{create\_atoms} commands use the
579+
optional argument \lmpcmd{overlap 0.3}, which enforces a minimum
580+
distance of 0.3 units between the randomly placed atoms. This
581+
constraint helps avoid ``close contacts'' between atoms, which can lead
582+
to excessively large forces and simulation instability.
582583

583584
\paragraph{Settings}
584585

@@ -592,11 +593,11 @@ \subsubsection{My first input}
592593
pair_coeff 1 1 1.0 1.0
593594
pair_coeff 2 2 0.5 3.0
594595
\end{lstlisting}
595-
The two \lmpcmd{mass} commands assign a mass of 1.0 and 5.0 units
596-
to the atoms of type 1 and 2, respectively. The third line,
597-
\lmpcmd{pair\_style lj/cut 4.0}, specifies that the atoms
598-
will be interacting through a Lennard-Jones (LJ) potential with a
599-
cut-off equal to $r_c = 4.0$ length units~\cite{wang2020lennard,fischer2023history}:
596+
The two \lmpcmd{mass} commands assign a mass of 1.0 and 5.0 units to the
597+
atoms of type 1 and 2, respectively. The third line,
598+
\lmpcmd{pair\_style lj/cut 4.0}, specifies that the atoms will be
599+
interacting through a Lennard-Jones (LJ) potential with a cut-off equal
600+
to $r_c = 4.0$ length units~\cite{wang2020lennard,fischer2023history}:
600601
\begin{equation}
601602
E_{ij} (r) = 4 \epsilon_{ij} \left[ \left( \dfrac{\sigma_{ij}}{r} \right)^{12}
602603
- \left( \dfrac{\sigma_{ij}}{r} \right)^{6} \right], ~ \text{for} ~ r < r_c,
@@ -623,16 +624,6 @@ \subsubsection{My first input}
623624

624625
\paragraph{Single-point energy}
625626

626-
\begin{figure}
627-
\centering
628-
\includegraphics[width=0.55\linewidth]{LJ}
629-
\caption{The binary mixture simulated in \hyperref[lennard-jones-label]{Tutorial 1}.
630-
This image was generated directly from the \lammpsgui{}. Atoms of
631-
type 1 are represented as small red spheres, atoms of type 2 as large
632-
green spheres, and the edges of the simulation box are represented as blue sticks.}
633-
\label{fig:LJ}
634-
\end{figure}
635-
636627
The system is now fully parameterized, and the input is ready to compute
637628
forces. Let us complete the two remaining categories,
638629
\lmpcmd{Visualization} and \lmpcmd{Run}, by adding the following lines
@@ -662,6 +653,16 @@ \subsubsection{My first input}
662653

663654
\paragraph{Snapshot Image}
664655

656+
\begin{figure}
657+
\centering
658+
\includegraphics[width=0.55\linewidth]{LJ}
659+
\caption{The binary mixture simulated in \hyperref[lennard-jones-label]{Tutorial 1}.
660+
This image was generated directly from the \lammpsgui{}. Atoms of
661+
type 1 are represented as small red spheres, atoms of type 2 as large
662+
green spheres, and the edges of the simulation box are represented as blue sticks.}
663+
\label{fig:LJ}
664+
\end{figure}
665+
665666
At this point, you can create a snapshot image of the current system
666667
using the \guicmd{Image Viewer} window, which can be accessed by
667668
clicking the \guicmd{Create Image} button in the \guicmd{Run} menu. The
@@ -817,6 +818,18 @@ \subsubsection{My first input}
817818
independent simulations. In the presence of a thermostat, the MD simulation
818819
will be performed in the canonical or NVT ensemble.
819820

821+
\begin{figure}
822+
\centering
823+
\includegraphics[width=\linewidth]{LJ-energy}
824+
\caption{Potential energy ($p_\text{e}$) of the binary mixture simulated
825+
during \hyperref[lennard-jones-label]{Tutorial 1} as a function of the
826+
step during energy minimization (a) and as a function of time during
827+
molecular dynamics in the NVT ensemble (b). b)~Kinetic energy
828+
($k_\text{e}$) during energy minimization (c) and during molecular
829+
dynamics (d).}
830+
\label{fig:evolution-energy}
831+
\end{figure}
832+
820833
Run the simulation again using LAMMPS. From the information
821834
printed in the \guicmd{Output} window, one can see that the temperature
822835
starts from 0 but rapidly reaches the requested value and
@@ -829,17 +842,6 @@ \subsubsection{My first input}
829842
increases rapibly during molecular dynamics until it reaches
830843
a plateau value of about 1.5 (Fig.~\ref{fig:evolution-energy}\,b).
831844

832-
\begin{figure}
833-
\centering
834-
\includegraphics[width=\linewidth]{LJ-energy}
835-
\caption{Potential energy ($p_\text{e}$) of the binary mixture simulated
836-
during \hyperref[lennard-jones-label]{Tutorial 1} as a function of the step
837-
during energy minimization (a) and during molecular dynamics in the NVT ensemble (b).
838-
b)~Kinetic energy ($k_\text{e}$) during energy minimization (c) and during
839-
molecular dynamics (d).}
840-
\label{fig:evolution-energy}
841-
\end{figure}
842-
843845
\paragraph{Trajectory visualization}
844846

845847
So far, the simulation has been mostly monitored through the analysis of

0 commit comments

Comments
 (0)