-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHEA Calculation.lmp
More file actions
47 lines (36 loc) · 1.49 KB
/
Copy pathHEA Calculation.lmp
File metadata and controls
47 lines (36 loc) · 1.49 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
# Site-by-site substitution scan in a multicomponent HEA
# The original atom types are stored once, each site is temporarily converted
# to the target type, the total energy is evaluated, and the original type is
# restored before moving to the next site.
units metal
atom_style atomic
boundary p p p
read_data HEA.lmp
# Interatomic potential
pair_style meam
pair_coeff * * library.meam Co Ni Cr Fe Mn CoNiCrFeMn.meam Co Ni Cr Fe Mn
# Store the original atom types once for later restoration
fix backup_types all store/state 0 type
variable original_type atom f_backup_types
# Loop control
variable total_atoms equal count(all)
variable atom_id loop ${total_atoms}
variable totalenergy equal pe
# Here the test substitution species is type 1
print "# Atom_ID Potential_Energy" file hea_site_substitution_energies.txt
thermo 1000
thermo_style custom step pe
label loop_start
# Temporarily assign the current atom to the test species
set atom ${atom_id} type 1
minimize 0 1.0e-12 1000 1000
# Recompute the energy without advancing the trajectory
run 0
print "${atom_id} ${totalenergy}" append hea_site_substitution_energies.txt
# Restore the original atom type
set atom ${atom_id} type v_original_type
next atom_id
jump SELF loop_start
print "Done."
# Example run command:
# mpiexec -np 4 lmp -in in.lmp -pk omp 4 -sf omp