-
Notifications
You must be signed in to change notification settings - Fork 1
/
in.insertions
69 lines (56 loc) · 1.65 KB
/
in.insertions
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
68
69
# some default settings
echo log
units ${units}
newton on
boundary p p p
atom_style atomic
atom_modify map yes
neighbor 1.0 bin
thermo 100
# create lattice and solution
include ${lattice_file}
include ${interactions_file}
include ${composition_file}
# minimize initial configuration at constant pressure, write to file for later
min_style cg
min_modify dmax ${dmax} line quadratic
fix press_rel all box/relax aniso ${pressure} vmax ${vmax}
minimize ${etol} ${ftol} ${maxsteps} ${maxsteps}
set group all image 0 0 0
write_data ${relaxed_data_file}
unfix press_rel
thermo_style custom step temp etotal press vol enthalpy
variable energy equal "pe"
reset_timestep 0
run 0
# create header for occupying energies file
variable header string "# init type"
variable print_index loop ${ntypes}
label print_loop
variable header string "${header} E_${print_index}"
next print_index
jump SELF print_loop
# print header to file
print "${header}" file ${occupying_energies_file}
# loop through all sites
variable num_atoms equal "count(all)"
variable site loop ${num_atoms}
label insertions_loop
run 0
variable t equal type[v_site]
delete_atoms group all
read_data ${relaxed_data_file} add merge
# loop through all atom types
variable type_label loop ${ntypes}
variable row string "${t}"
label type_loop
# insert type at site, print occupying energy to file
reset_timestep 0
set atom ${site} type ${type_label}
minimize ${etol} ${ftol} ${maxsteps} ${maxsteps}
variable row string "${row} ${energy}"
next type_label
jump SELF type_loop
print "${row}" append ${occupying_energies_file}
next site
jump SELF insertions_loop