1units metal 2atom_style atomic 3atom_modify map array sort 0 0.0 4neigh_modify every 2 delay 10 check yes page 1000000 one 100000 5 6## read in path data using fix property/atom- here 4th image of a NEB 7fix pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_ddnz 8read_data pafipath.4.data fix pa NULL PafiPath 9 10## EAM potential 11pair_style eam/fs 12pair_coeff * * ../../../../potentials/Fe_mm.eam.fs Fe 13 14mass * 55.85 15thermo 100 16min_style fire 17 18 19compute pe all pe 20variable pe equal pe 21run 0 22print "energy=${pe}" 23 24## compute property/atom to access relevant fields 25compute pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_ddnz 26run 0 27 28## fix name group-id pafi compute-id temperature tdamp seed overdamped 0/1 com 0/1 29fix hp all pafi pa 500.0 0.01 434 overdamped no com yes 30 31run 0 32minimize 0 0 1000 1000 # best if using NEB path 33compute dx all displace/atom 34compute dmag all reduce max c_dx[4] 35variable maxjump equal sqrt(c_dmag) 36 37thermo_style custom step pe temp v_maxjump 38 39 40variable dn equal f_hp[4]*f_hp[4] # should be zero to float precision 41 42 43fix af all ave/time 1 1000 1000 f_hp[1] f_hp[2] f_hp[3] v_dn 44 45variable adn equal sqrt(f_af[4]) # should be very small (approx. 1e-6 A) 46variable apf equal f_af[1] 47 48 49run 1000 50minimize 0 0 1000 1000 51 52variable s_pe equal ${pe} 53variable s_apf equal ${apf} 54variable s_adn equal ${adn} 55variable s_maxjump equal ${maxjump} 56 57unfix hp 58unfix pa 59unfix af 60minimize 0 0 1000 1000 61 62 63print """ 64---------- PAFI RESULTS -------- 65 66During run: 67 Average Distance From Hyperplane = ${s_adn}A (Should be very small, around 1e-5A), 68 Average Force Projection Along MFEP = ${s_apf} eV/A 69""" 70print """ 71In-plane minimization post-run: 72energy = ${s_pe} eV 73 74""" 75if "${s_maxjump} > 0.1" then & 76"print 'Max Atomic Displacement = ${s_maxjump}A > 0.1A'" & 77"print ' => Possible shallow in-plane metastability: Reduce time in basin and/or decrease tdamp'" & 78else & 79"print 'Max Atomic Displacement = ${s_maxjump}A < 0.1A => No in-plane jumps'" 80print """ 81 82Full minimization after removal of PAFI fixes: 83energy = ${pe} eV 84 85----- END PAFI ---- 86""" 87