# Define looping variables variable loopcount loop 42 variable latticeconst index 8.875860 8.281145 7.912564 7.644770 7.434317 7.260927 7.113480 6.985214 6.871708 6.769913 6.677636 6.593249 6.515509 6.443444 6.376282 6.313397 6.254279 6.198500 6.145703 6.095587 6.047891 6.002393 5.958899 5.917240 5.888879 5.859031 5.827530 5.794183 5.758760 5.720985 5.680523 5.636962 5.589789 5.538350 5.481795 5.418994 5.348393 5.267777 5.173827 5.061241 4.920748 4.733790 # 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 diamond lattice using a single conventional (orthogonal) # unit cell with a lattice constant from the 'latticeconst' variable defined on line 3 above lattice diamond ${latticeconst} region box block 0 1 0 1 0 1 units lattice create_box 1 box create_atoms 1 box mass 1 180.9479 # Specify which KIM Model to use pair_style kim EAM_Dynamo_ZhouWadleyJohnson_2001NISTretabulation_Ta__MO_568033730744_000 pair_coeff * * Ta # 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