-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBinary generate.lmp
More file actions
48 lines (37 loc) · 1.35 KB
/
Copy pathBinary generate.lmp
File metadata and controls
48 lines (37 loc) · 1.35 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
# Binary polycrystal site-by-site substitution energy scan
# This script reads a relaxed Al polycrystal, temporarily replaces each site
# with Cu, evaluates the total energy, and writes one energy value per site.
units metal
atom_style atomic
boundary p p p
read_data 70+5.lmp extra/atom/types 1
# Atomic masses (type 1 = Al, type 2 = Cu)
mass 1 26.98
mass 2 63.55
# Interatomic potential
pair_style eam/alloy
pair_coeff * * AlCU.eam Al Cu
# Basic settings
variable total_atoms equal atoms
variable atom_id loop ${total_atoms}
variable totalenergy equal pe
timestep 0.001
thermo 1000
thermo_style custom step pe
# Relax the initial structure before the substitution scan
minimize 0 1.0e-12 10000 10000
label loop_start
# Substitute the current site with Cu (type 2)
set atom ${atom_id} type 2
minimize 0 1.0e-12 1000 1000
# Recompute the energy without additional time integration
run 0
print "${atom_id} ${totalenergy}" append binary_site_substitution_energies.txt
# Restore the original Al atom (type 1)
set atom ${atom_id} type 1
next atom_id
jump SELF loop_start
run 0
print "Done."
# Example run command:
# mpiexec -np 4 lmp -in in.lmp -pk omp 4 -sf omp