File: in.pafi

package info (click to toggle)
lammps 20210122~gita77bb%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 331,996 kB
  • sloc: cpp: 802,213; python: 24,256; xml: 14,949; f90: 10,448; ansic: 8,476; perl: 4,161; sh: 3,466; fortran: 2,805; makefile: 1,250; objc: 238; lisp: 163; csh: 16; awk: 14; tcl: 6
file content (86 lines) | stat: -rw-r--r-- 2,090 bytes parent folder | download | duplicates (3)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
units metal
atom_style atomic
atom_modify map array sort 0 0.0
neigh_modify every 2 delay 10 check yes page 1000000 one 100000

## read in path data using fix property/atom- here 4th image of a NEB
fix pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_ddnz
read_data pafipath.4.data fix pa NULL PafiPath

## EAM potential
pair_style    eam/fs
pair_coeff * * ../../../../potentials/Fe_mm.eam.fs Fe

mass * 55.85
thermo 100
min_style fire


compute pe all pe
variable pe equal pe
run 0
print "energy=${pe}"

## compute property/atom to access relevant fields
compute pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_ddnz
run 0

## fix name group-id pafi compute-id temperature tdamp seed overdamped 0/1 com 0/1
fix hp all pafi pa 500.0 0.01 434 overdamped no com yes

run 0
minimize 0 0 1000 1000 # best if using NEB path
compute dx all displace/atom
compute dmag all reduce max c_dx[4]
variable maxjump equal sqrt(c_dmag)

thermo_style custom step pe temp v_maxjump


variable dn equal f_hp[4]*f_hp[4] # should be zero to float precision


fix af all ave/time 1 1000 1000 f_hp[1] f_hp[2] f_hp[3] v_dn

variable adn equal sqrt(f_af[4]) # should be very small (approx. 1e-6 A)
variable apf equal f_af[1]


run 1000
minimize 0 0 1000 1000

variable s_pe equal ${pe}
variable s_apf equal ${apf}
variable s_adn equal ${adn}
variable s_maxjump equal ${maxjump}

unfix hp
unfix pa
unfix af
minimize 0 0 1000 1000


print """
---------- PAFI RESULTS --------

During run:
  Average Distance From Hyperplane = ${s_adn}A (Should be very small, around 1e-5A),
  Average Force Projection Along MFEP = ${s_apf} eV/A
"""
print """
In-plane minimization post-run:
energy = ${s_pe} eV

"""
if "${s_maxjump} > 0.1" then &
"print 'Max Atomic Displacement = ${s_maxjump}A > 0.1A'" &
"print ' => Possible shallow in-plane metastability: Reduce time in basin and/or decrease tdamp'" &
else &
"print 'Max Atomic Displacement = ${s_maxjump}A < 0.1A => No in-plane jumps'"
print """

Full minimization after removal of PAFI fixes:
energy = ${pe} eV

----- END PAFI ----
"""