###################################### Perfect ##################################### clear log perfect.lammps units metal dimension 3 boundary p p p atom_style atomic variable lp equal 3.52395413816153 variable factor equal 8 lattice fcc ${lp} orient x -1 1 0 orient y -1 -1 2 orient z 1 1 1 variable xdim equal ${lp}*sqrt(2) variable ydim equal ${lp}*sqrt(6) variable zdim equal (${lp}*sqrt(3)*${factor})+${lp}*sqrt(3)*(2) #This number because this is 6 layers (2 stacks of ABC stacking). Creating Vacuum of this size to make things periodic. #12.2073353333=a*sqrt(3)*(2) where a is lattice parameter. variable atoms_end equal ${lp}*sqrt(3)*${factor} variable length equal (${atoms_end}/2)-((1/6)*(sqrt(3)*${lp})) region full_box block 0 ${xdim} 0 ${ydim} 0 ${zdim} units box region atoms block 0 ${xdim} 0 ${ydim} 0 ${atoms_end} units box region top block 0 ${xdim} 0 ${ydim} ${length} ${zdim} units box region bottom block 0 ${xdim} 0 ${ydim} 0 ${length} units box create_box 1 full_box create_atoms 1 region atoms group top_atoms region top group bottom_atoms region bottom replicate 3 3 1 bbox # --------------------- EAM POTENTIAL --------------------- pair_style eam/alloy pair_coeff * * /home/labuser/snap/snapd-desktop-integration/current/potential_files/FeNiCr_Foster_Sills.setfl Ni neighbor 2.0 bin # --------------------- SETTINGS --------------------- compute peratom all pe/atom compute total_energy all reduce sum c_peratom ####################### thermal properties output on screen ###################### thermo 10 #'thermo' specifies the output during minimization at every 10 steps thermo_style custom step pe lx ly lz press pxx pyy pzz c_total_energy #'thermo_style' specifies what type of output is shown to screen eg: pe : potential energy;lx,ly,lz : simulation cell dimensions; press : pressure etc.. dump dump1 all custom 1 pefect_modified.dat id type xs ys zs c_peratom dump dump2 top_atoms custom 1 perfect_top_modified.dat id type xs ys zs c_peratom dump dump3 bottom_atoms custom 1 perfect_bottom_modified.dat id type xs ys zs c_peratom min_style cg minimize 1e-10 1e-10 5000 10000 variable tengperfect equal "c_total_energy" variable natomsperfect equal "count(all)" variable ecohperfect equal "v_tengperfect/v_natomsperfect" variable ecohperfect_final equal "v_ecohperfect" variable areaperfect equal "lx*ly" print "cohesive energy of perfect ${ecohperfect}" print "total energy of perfect ${tengperfect}" print "perfect area equals ${areaperfect}" print "No. of atoms in perfect ${natomsperfect}"