Skip to content

Commit 017e732

Browse files
committed
added input tutorial 1
1 parent cdcbdd2 commit 017e732

19 files changed

+92
-1510
lines changed

tutorial1/improved.md.lmp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,44 @@ units lj
88
dimension 3
99
atom_style atomic
1010
boundary p p p
11+
1112
# 2) System definition
13+
pair_style lj/cut 4.0
14+
read_data improved.min.data
15+
region cyl_in cylinder z 0 0 10 INF INF side in
16+
region cyl_out cylinder z 0 0 10 INF INF side out
17+
group grp_t1 type 1
18+
group grp_t2 type 2
19+
group grp_in region cyl_in
20+
group grp_out region cyl_out
21+
group grp_t1_in intersect grp_t1 grp_in
22+
group grp_t2_out intersect grp_t2 grp_out
23+
delete_atoms group grp_t1_in
24+
delete_atoms group grp_t2_out
25+
# delete no longer needed groups
26+
group grp_in delete
27+
group grp_out delete
28+
group grp_t1_in delete
29+
group grp_t2_out delete
30+
variable n1_in equal count(grp_t1,cyl_in)
31+
variable n2_in equal count(grp_t2,cyl_in)
32+
compute coor12 grp_t1 coord/atom cutoff 2.0 group grp_t2
33+
compute sumcoor12 grp_t1 reduce ave c_coor12
34+
1235
# 3) Settings
36+
1337
# 4) Visualization
38+
thermo 1000
39+
thermo_style custom step temp pe ke etotal &
40+
press v_n1_in v_n2_in c_sumcoor12
41+
dump viz all image 1000 myimage-*.ppm type type &
42+
shiny 0.1 box no 0.01 view 0 0 zoom 1.8 fsaa yes size 800 800
43+
dump_modify viz adiam 1 1 adiam 2 3 acolor 1 &
44+
turquoise acolor 2 royalblue backcolor white
45+
1446
# 5) Run
47+
velocity all create 1.0 49284 mom yes dist gaussian
48+
fix mynve all nve
49+
fix mylgv all langevin 1.0 1.0 0.1 10917 zero yes
50+
timestep 0.005
51+
run 300000

tutorial1/improved.min.lmp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,30 @@ units lj
88
dimension 3
99
atom_style atomic
1010
boundary p p p
11+
1112
# 2) System definition
13+
region simbox block -20 20 -20 20 -20 20
14+
create_box 2 simbox
15+
# for creating atoms
16+
region cyl_in cylinder z 0 0 10 INF INF side in
17+
region cyl_out cylinder z 0 0 10 INF INF side out
18+
create_atoms 1 random 1000 34134 cyl_out
19+
create_atoms 2 random 150 12756 cyl_in
20+
1221
# 3) Settings
1322
mass 1 1.0
1423
mass 2 10.0
1524
pair_style lj/cut 4.0
1625
pair_coeff 1 1 1.0 1.0
1726
pair_coeff 2 2 0.5 3.0
27+
1828
# 4) Visualization
1929
thermo 10
2030
thermo_style custom step etotal press
31+
2132
# 5) Run
22-
minimize 1.0e-6 1.0e-6 1000 10000
33+
minimize 1.0e-6 1.0e-6 1000 10000
34+
35+
# 6) Save system
36+
write_data improved.min.data
37+

tutorial1/initial.lmp

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,46 @@
55

66
# PART A - ENERGY MINIMIZATION
77
# 1) Initialization
8+
units lj
9+
dimension 3
10+
atom_style atomic
11+
boundary p p p
812
# 2) System definition
13+
14+
# 2) System definition
15+
region simbox block -20 20 -20 20 -20 20
16+
create_box 2 simbox
17+
create_atoms 1 random 1500 34134 simbox overlap 0.3
18+
create_atoms 2 random 100 12756 simbox overlap 0.3
19+
920
# 3) Settings
21+
mass 1 1.0
22+
mass 2 5.0
23+
pair_style lj/cut 4.0
24+
pair_coeff 1 1 1.0 1.0
25+
pair_coeff 2 2 0.5 3.0
26+
1027
# 4) Visualization
28+
thermo 10
29+
thermo_style custom step etotal press
30+
1131
# 5) Run
32+
minimize 1.0e-6 1.0e-6 1000 10000
33+
34+
# PART B - MOLECULAR DYNAMICS
35+
# 4) Visualization
36+
thermo 50
37+
thermo_style custom step temp etotal pe ke press
38+
dump viz all image 100 myimage-*.ppm type type &
39+
size 800 800 zoom 1.452 shiny 0.7 fsaa yes &
40+
view 80 10 box yes 0.025 axes no 0.0 0.0 &
41+
center s 0.483725 0.510373 0.510373
42+
dump_modify viz pad 9 boxcolor royalblue &
43+
backcolor white adiam 1 1.6 adiam 2 4.8
44+
45+
# 5) Run
46+
fix mynve all nve
47+
fix mylgv all langevin 1.0 1.0 0.1 10917
48+
timestep 0.005
49+
run 15000
50+

tutorial1/solution/improved.md.ipynb

Lines changed: 0 additions & 162 deletions
This file was deleted.

tutorial1/solution/improved.md.lmp

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)