-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfl_input
67 lines (52 loc) · 2.65 KB
/
fl_input
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
60
61
62
63
64
65
66
67
# This script runs a Frenkel-Ladd thermodynamic integration for the calculation of the free energy of bcc iron. See job.sh for the variables that need to be passed in the command line.
#--------------------------- Simulation variables -----------------------------#
# Initalizes the random number generator.
variable rnd equal round(random(0,999,{{ RANDOM }}))
# Simulation control parameters.
variable t_eq equal {{ t_eq }} # Equilibration timesteps.
variable t_switch equal {{ t_switch }} # Switching timesteps.
variable t_step equal {{ t_step }} # Timestep.
variable T equal {{ temp }} # Simulation temprerature.
#------------------------------------------------------------------------------#
#---------------------------- Atomic setup ------------------------------------#
units metal
# Create atoms.
read_data structure.inp
# Define interatomic potential.
include potential.inp
neigh_modify delay 0
timestep {{t_step}}
#------------------------------------------------------------------------------#
#----------------------------- Run simulation ---------------------------------#
# Integrator, Frenkel-Ladd modifier, and thermostat.
fix f1 all nve
fix f2 all ti/spring {{k}} {{t_switch}} {{t_eq}} function 2
fix f3 all langevin {{temp}} {{temp}} 0.1 ${rnd} zero yes
# Compute temperature using COM coordinates.
compute c1 all temp/com
fix_modify f3 temp c1
# Redefine simulation time to capture first and last steps on output files.
# Notice that this does not affect the switching time.
variable t_eq equal ${t_eq}-1
variable t_switch equal ${t_switch}+1
# Setup thermo output.
thermo_style custom step pe
thermo 0
variable dE equal pe-f_f2
variable lambda equal f_f2[1]
# Initial temperature to accelerate equilibration.
variable rnd equal round(random(1,666,0)) # Generates new rnd #.
variable T0 equal 2*{{ temp }}
velocity all create ${T0} ${rnd} dist gaussian
# Forward integration.
run ${t_eq}
fix f4 all print 1 "${dE} ${lambda}" title "# dE [eV] lambda" &
screen no file forward.dat
run ${t_switch}
unfix f4
# Backward integration.
run ${t_eq}
fix f4 all print 1 "${dE} ${lambda}" title "# dE [eV] lambda" &
screen no file backward.dat
run ${t_switch}
#------------------------------------------------------------------------------#