-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathumbrella-sampling.lmp
More file actions
59 lines (48 loc) · 1.57 KB
/
umbrella-sampling.lmp
File metadata and controls
59 lines (48 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# LAMMPS Input File
# Licensed under CC BY 4.0
# A Set of Tutorials for the LAMMPS Simulation Package (LiveCoMS, 2025)
# By Simon Gravelle, Cecilia M. S. Alvares, Jacob R. Gissinger, and Axel Kohlmeyer
# Please cite doi.org/10.33011/livecoms.6.1.3037
# Find more on GitHub: https://github.com/lammpstutorials
variable sigma equal 3.405
variable epsilon equal 0.238
variable U0 equal 10*${epsilon}
variable dlt equal 1.0
variable x0 equal 10.0
variable k equal 0.5
units real
atom_style atomic
pair_style lj/cut $(2^(1/6)*v_sigma)
pair_modify shift yes
boundary p p p
region myreg block -50 50 -15 15 -50 50
create_box 2 myreg
create_atoms 2 single 0 0 0
create_atoms 1 random 199 34134 myreg overlap 3 maxtry 50
mass * 39.948
pair_coeff * * ${epsilon} ${sigma}
group topull type 2
variable U atom ${U0}*atan((x+${x0})/${dlt})-${U0}*atan((x-${x0})/${dlt})
variable F atom ${U0}/((x-${x0})^2/${dlt}^2+1)/${dlt}-${U0}/((x+${x0})^2/${dlt}^2+1)/${dlt}
fix myadf all addforce v_F 0.0 0.0 energy v_U
fix mynve all nve
fix mylgv all langevin 119.8 119.8 500 30917
thermo 5000
dump viz all image 5000 myimage-*.ppm type type &
shiny 0.1 box yes 0.01 view 180 90 zoom 6 &
size 1600 500 fsaa yes
dump_modify viz backcolor white acolor 1 cyan &
acolor 2 red adiam 1 3 adiam 2 3 boxcolor black
timestep 2.0
run 50000
variable a loop 15
label loop
variable xdes equal 4*${a}-32
variable xave equal xcm(topull,x)
fix mytth topull spring tether ${k} ${xdes} 0 0 0
run 20000
fix myat1 all ave/time 10 10 100 v_xave v_xdes file umbrella-sampling.${a}.dat
run 200000
unfix myat1
next a
jump SELF loop