# Define looping variables variable loopcount loop 42 variable latticeconst index 3.846540 3.588807 3.429075 3.313020 3.221816 3.146674 3.082774 3.027187 2.977997 2.933882 2.893892 2.857321 2.823630 2.792400 2.763293 2.736041 2.710421 2.686248 2.663367 2.641648 2.620978 2.601261 2.582411 2.564358 2.552067 2.539132 2.525480 2.511029 2.495678 2.479307 2.461772 2.442895 2.422451 2.400159 2.375650 2.348434 2.317838 2.282902 2.242187 2.193396 2.132511 2.051490 # Define unit set and class of atomic model units metal atom_style atomic # Periodic boundary conditions along all three dimensions boundary p p p # Create a sc lattice using a single conventional (orthogonal) # unit cell with a lattice constant from the 'latticeconst' variable defined on line 3 above lattice sc ${latticeconst} region box block 0 1 0 1 0 1 units lattice create_box 1 box create_atoms 1 box mass 1 95.94 # Specify which KIM Model to use pair_style kim LAMMPSvirial EAM_Dynamo_Smirnova_UMoXe__MO_679329885632_004 pair_coeff * * Mo # Set what thermodynamic information to print to log thermo_style custom step atoms xlo xhi ylo yhi zlo zhi pe press pxx pyy pzz pxy pxz pyz thermo 10 # Print every 10 steps # Set what information to write to dump file dump id all custom 10 output/lammps.dump id type x y z fx fy fz dump_modify id format line "%d %d %16.7f %16.7f %16.7f %16.7f %16.7f %16.7f" # Compute the energy and forces for this lattice spacing run 0 # Define auxiliary variables to contain cohesive energy and equilibrium lattice constant variable poteng equal "c_thermo_pe" variable natoms equal "count(all)" variable ecohesive equal "v_poteng/v_natoms" # Output cohesive energy and equilibrium lattice constant print "Cohesive energy = ${ecohesive} eV/atom" # Queue next loop clear # Clear existing atoms, variables, and allocated memory next latticeconst # Increment latticeconst to next value next loopcount # Increment loopcount to next value jump SELF # Reload this input script with the new variable values