Skip to content

Commit fc84962

Browse files
committed
remove \hspace{0pt} from \lmpcmd{} and \lmpcmdnote{}.
with the \hspace{0pt} a following punctuation will not "stick" but may wrap to the next line.
1 parent ef1f5d8 commit fc84962

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

lammps-tutorials.tex

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@
9696
\renewcommand{\floatpagefraction}{0.8} % At least 80% of a page must be used by floats
9797
\renewcommand{\textfraction}{0.1} % At least 10% of a page must contain text
9898

99-
\newcommand{\lmpcmd}[1]{\hspace{0pt}\colorbox{listing}{\textcolor{command}{\small{#1}}}\hspace{0pt}} % lammps command
99+
% AK: I removed the \hspace{0pt} from \lmpcmd{} since otherwise a following comma
100+
% or full stop may wrap to the next line.
101+
\newcommand{\lmpcmd}[1]{\colorbox{listing}{\textcolor{command}{\small{#1}}}} % lammps command
102+
%\newcommand{\lmpcmd}[1]{\hspace{0pt}\colorbox{listing}{\textcolor{command}{\small{#1}}}\hspace{0pt}} % lammps command
100103
% \newcommand{\lmpcmd}[1]{\hspace{0pt}\colorbox{listing}{\textcolor{command}{\texttt{#1}}}\hspace{0pt}} % lammps command
101-
\newcommand{\lmpcmdnote}[1]{\hspace{0pt}\colorbox{note_listing}{\textcolor{command}{\small{#1}}}\hspace{0pt}} % lammps command inside note
104+
\newcommand{\lmpcmdnote}[1]{\colorbox{note_listing}{\textcolor{command}{\small{#1}}}} % lammps command inside note
105+
% \newcommand{\lmpcmdnote}[1]{\hspace{0pt}\colorbox{note_listing}{\textcolor{command}{\small{#1}}}\hspace{0pt}} % lammps command inside note
102106
\newcommand{\flrcmd}[1]{\textcolor{command}{\texttt{#1}}} % folder in monopace
103107
\newcommand{\flecmd}[1]{\textcolor{command}{\texttt{#1}}} % files name in monopace
104108
\newcommand{\guicmd}[1]{\textcolor{command}{\texttt{«#1»}}} % LAMMPS-GUI commands in French quotation monopace
@@ -820,18 +824,18 @@ \subsubsection{My first input}
820824
thermo_style custom step temp etotal pe ke press
821825
\end{lstlisting}
822826

823-
Since LAMMPS reads inputs from top to bottom, these lines will
824-
be executed \emph{after} the energy minimization. Therefore,
825-
there is no need to re-initialize or re-define the
826-
system. The \lmpcmd{thermo} command is called a second time to
827-
update the output frequency from 10 to 50 as soon as \lmpcmd{PART B} of
828-
the simulation starts. In addition, a new \lmpcmd{thermo\_style}
829-
command is introduced to specify the thermodynamic information LAMMPS should
830-
print during during \lmpcmd{PART B.} This adjustment is made because, during
831-
molecular dynamics, the system exhibits a non-zero temperature $T$ (and
832-
consequently a non-zero kinetic energy $K$, keyword \lmpcmd{ke}), which are useful to monitor.
833-
The \lmpcmd{pe} keyword represents the potential energy of the system, $U$, such that
834-
$U + K = E$.
827+
Since LAMMPS reads inputs from top to bottom, these lines will be
828+
executed \emph{after} the energy minimization. Therefore, there is no
829+
need to re-initialize or re-define the system. The \lmpcmd{thermo}
830+
command is called a second time to update the output frequency from 10
831+
to 50 as soon as \lmpcmd{PART B} of the simulation starts. In addition,
832+
a new \lmpcmd{thermo\_style} command is introduced to specify the
833+
thermodynamic information LAMMPS should print during during \lmpcmd{PART
834+
B}. This adjustment is made because, during molecular dynamics, the
835+
system exhibits a non-zero temperature $T$ (and consequently a non-zero
836+
kinetic energy $K$, keyword \lmpcmd{ke}), which are useful to monitor.
837+
The \lmpcmd{pe} keyword represents the potential energy of the system,
838+
$U$, such that $U + K = E$.
835839

836840
Then, add a second \lmpcmd{Run} category by including the following
837841
lines in \lmpcmd{PART B} of \flecmd{initial.lmp}:
@@ -937,7 +941,7 @@ \subsubsection{My first input}
937941
commands across multiple lines. These two commands tell} LAMMPS to
938942
generate NetPBM format images every 100
939943
steps. The two \lmpcmd{type} keywords are for \lmpcmd{color} and
940-
\lmpcmd{diameter,} respectively. Run the \flecmd{initial.lmp} using
944+
\lmpcmd{diameter}, respectively. Run the \flecmd{initial.lmp} using
941945
LAMMPS again, and a new window named \guicmd{Slide Show} will pop up.
942946
It will show each image created by the \lmpcmd{dump image} as it is
943947
created. After the simulation is finished (or stopped), the slideshow

0 commit comments

Comments
 (0)