Skip to content

Commit aa6df75

Browse files
committed
keep implementing changes to tutorial 2
1 parent 3821c63 commit aa6df75

3 files changed

Lines changed: 12 additions & 20 deletions

File tree

files/tutorial3/pull.lmp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
kspace_style ewald 1e-5
3+
read_restart water.restart

files/tutorial3/solution/pull.lmp

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
units real
2-
atom_style full
3-
bond_style harmonic
4-
angle_style harmonic
5-
dihedral_style harmonic
6-
pair_style lj/cut/coul/long 10
7-
kspace_style ewald 1e-5
8-
special_bonds lj 0.0 0.0 0.5 coul 0.0 0.0 1.0 angle yes dihedral yes
91

10-
read_data merge.data
11-
include parameters.inc
2+
kspace_style ewald 1e-5
3+
read_restart merge.restart
124

13-
group H2O type OW HW
14-
group PEG type C CPos H HC OAlc OE
15-
#group PEG_CO type C CPos OAlc OE
165
group ends type OAlc
176
variable xcm equal xcm(ends,x)
187
variable oxies atom type==label2type(atom,OAlc)
@@ -44,7 +33,7 @@ thermo 250
4433

4534
dump mydmp all local 100 pull.dat index c_dphi c_prop
4635

47-
# S.G.: would be ok if one could select only dihedral 2
36+
# S.G.: a histogram would be ok if one could select only dihedral 2
4837
# fix myhisto all ave/histo 100 120 15000 0 180 90 c_dphi file pull.dat ave running mode vector
4938

5039
timestep 1.0

lammps-tutorials.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,13 +1924,12 @@ \subsubsection{Solvating the PEG in water}
19241924
\begin{lstlisting}
19251925
group PEG type C CPos H HC OAlc OE
19261926
\end{lstlisting}
1927-
Water molecules that are overlapping with the PEG must be deleted to avoid future crashing.
1928-
Add the following line into \flecmd{input.lmp}:
1927+
Water molecules that are overlapping with the PEG must be deleted to avoid future crashing. Add the following line into \flecmd{merge.lmp}:
19291928
\begin{lstlisting}
19301929
delete_atoms overlap 2.0 H2O PEG mol yes
19311930
\end{lstlisting}
19321931
Here the value of 2.0~Ångströms for the overlap cutoff was fixed arbitrarily and can
1933-
be chosen through trial and error. If the cutoff is too small, the simulation will
1932+
be chosen through trial and error. If the cutoff is too small, the simulation will
19341933
crash because atoms that are too close to each other undergo forces
19351934
that can be extremely large. If the cutoff is too large, too many water
19361935
molecules will unnecessarily be deleted.
@@ -1964,14 +1963,14 @@ \subsubsection{Solvating the PEG in water}
19641963
thermo 500
19651964
\end{lstlisting}
19661965
Finally, let us perform a short equilibration and save the
1967-
final state to a \lmpcmd{.restart} file. Add the following lines to the data file:
1966+
final state to a \lmpcmd{.restart} file. Add the following lines to the data file:
19681967
\begin{lstlisting}
19691968
timestep 1.0
19701969
run 10000
19711970

19721971
write_restart mix.restart
19731972
\end{lstlisting}
1974-
Run the simulation using LAMMPS. From the outputs, you can make
1973+
Run the simulation using LAMMPS. From the outputs, you can make
19751974
sure that the temperature remains close to the
19761975
target value of $300~\text{K}$ throughout the entire simulation, and that
19771976
the volume and total energy are almost constant, indicating
@@ -1981,12 +1980,13 @@ \subsubsection{Solvating the PEG in water}
19811980
\begin{figure}
19821981
\centering
19831982
\includegraphics[width=\linewidth]{PEG-solvated}
1984-
\caption{A single PEG molecule in water. Water molecules are represented as a
1983+
\caption{A single PEG molecule in water. Water molecules are represented as a
19851984
transparent continuum field for clarity.}
19861985
\label{fig:PEG-solvated}
19871986
\end{figure}
19881987

19891988
\subsubsection{Stretching the PEG molecule}
1989+
19901990
Here, a constant forcing is applied to the two ends of the PEG molecule until it
19911991
stretches. Create a new folder next to the previously created folders, call it
19921992
\flrcmd{pullonPEG/}, and create a new input file in it called \flecmd{input.lmp}.

0 commit comments

Comments
 (0)