Skip to content

Commit b886126

Browse files
committed
some tests with the breakable cnt part
1 parent 75b1fc8 commit b886126

4 files changed

Lines changed: 86 additions & 14 deletions

File tree

files/tutorial2/breakable.lmp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,30 @@ read_data breakable.data
66
pair_style airebo 3.0
77
pair_coeff * * CH.airebo C
88

9+
group carbon_atoms type 1
10+
11+
variable xmax equal bound(carbon_atoms,xmax)-0.5
12+
variable xmin equal bound(carbon_atoms,xmin)+0.5
13+
region rtop block ${xmax} INF INF INF INF INF
14+
region rbot block INF ${xmin} INF INF INF INF
15+
region rmid block ${xmin} ${xmax} INF INF INF INF
16+
17+
group cnt_top region rtop
18+
group cnt_bot region rbot
19+
group cnt_mid region rmid
20+
21+
variable xmax_del equal ${xmax}-2
22+
variable xmin_del equal ${xmin}+2
23+
region rdel block ${xmin_del} ${xmax_del} INF INF INF INF
24+
25+
group rdel region rdel
26+
delete_atoms random fraction 0.02 no rdel NULL 482793
27+
28+
reset_atoms id sort yes
29+
velocity cnt_mid create ${T} 48455 mom yes rot yes
30+
fix mynve all nve
31+
compute Tmid cnt_mid temp
32+
fix myber cnt_mid temp/berendsen ${T} ${T} 0.1
33+
fix_modify myber temp Tmid
34+
935
run 0 post no

files/tutorial2/solution/CH.airebo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CH.airebo
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
units metal
2+
atom_style atomic
3+
boundary f f f
4+
5+
read_data breakable.data
6+
pair_style airebo 3.0
7+
pair_coeff * * CH.airebo C
8+
9+
group carbon_atoms type 1
10+
11+
variable xmax equal bound(carbon_atoms,xmax)-0.5
12+
variable xmin equal bound(carbon_atoms,xmin)+0.5
13+
region rtop block ${xmax} INF INF INF INF INF
14+
region rbot block INF ${xmin} INF INF INF INF
15+
region rmid block ${xmin} ${xmax} INF INF INF INF
16+
17+
group cnt_top region rtop
18+
group cnt_bot region rbot
19+
group cnt_mid region rmid
20+
21+
variable xmax_del equal ${xmax}-2
22+
variable xmin_del equal ${xmin}+2
23+
region rdel block ${xmin_del} ${xmax_del} INF INF INF INF
24+
25+
group rdel region rdel
26+
delete_atoms random fraction 0.02 no rdel NULL 482793
27+
28+
reset_atoms id sort yes
29+
velocity cnt_mid create 300 48455 mom yes rot yes
30+
31+
fix mynve1 cnt_top nve
32+
fix mynve2 cnt_bot nve
33+
fix mynvt cnt_mid nvt temp 300 300 1.0
34+
fix mysf1 cnt_bot setforce 0 0 0
35+
fix mysf2 cnt_top setforce 0 0 0
36+
37+
velocity cnt_bot set 0 0 0
38+
velocity cnt_top set 0 0 0
39+
40+
variable L equal xcm(cnt_top,x)−xcm(cnt_bot,x)
41+
variable F equal f_mysf1[1]−f_mysf2[1]
42+
43+
dump mydmp all image 500 dump.*.ppm type type adiam 1.5 box no 0.01 view 0 90 zoom 1.8 shiny 0.1 fsaa yes
44+
dump_modify mydmp pad 5 backcolor white acolor 1 pink
45+
46+
compute Tmid cnt_mid temp
47+
thermo 100
48+
thermo_style custom step temp etotal v_L v_F
49+
thermo_modify temp Tmid line yaml
50+
51+
timestep 0.0005
52+
run 10000
53+
54+
velocity cnt_top set 0.75 0 0
55+
velocity cnt_bot set -0.75 0 0
56+
run 30000

lammps-tutorials.tex

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ \subsubsection{Breakable bonds}
16091609

16101610
\paragraph{Adapt the topology file}
16111611

1612-
Since bonds,angles, and dihedrals do not need to be
1612+
Since bonds, angles, and dihedrals do not need to be
16131613
explicitly set when using AIREBO, some simplification must be made to the
16141614
\flecmd{.data} file. The new \flecmd{.data}
16151615
file is named \href{\filepath tutorial2/breakable.data}{\dwlcmd{breakable.data}},
@@ -1618,20 +1618,9 @@ \subsubsection{Breakable bonds}
16181618
required for placing the atoms in the box, but no bond/angle/dihedral information.
16191619
Another difference between the \flecmd{unbreakable.data} and \flecmd{breakable.data} files
16201620
is that, here, a larger distance of 120~Ångströms was used for the box size along
1621-
the $x$ axis, to allow for larger deformation.
1621+
the $x$ axis, to allow for larger deformation of the CNT.
16221622

1623-
\paragraph{Use of AIREBO potential}
1624-
1625-
Then, let us import the LAMMPS data file, and set the pair coefficients by adding
1626-
the following lines into \flecmd{input.lmp}:
1627-
\begin{lstlisting}
1628-
# System definition
1629-
read_data cnt_atom.data
1630-
pair_coeff * * CH.airebo C
1631-
\end{lstlisting}
1632-
Here, there is one atom type, which we impose to be `carbon' by using
1633-
the letter \textit{C}. Download the \href{\filepath tutorial2/breakable-bonds/CH.airebo}{\dwlcmd{CH.airebo}}
1634-
file and place it within the \textit{breakable-bonds/} folder. The rest of the
1623+
The rest of the
16351624
\flecmd{input.lmp} is very similar to the previous one:
16361625

16371626
\begin{lstlisting}

0 commit comments

Comments
 (0)