# Define looping variables variable loopcount loop 42 variable latticeconst index 16.279900 15.189093 14.513055 14.021877 13.635871 13.317845 13.047403 12.812142 12.603952 12.417243 12.247993 12.093213 11.950625 11.818445 11.695259 11.579918 11.471485 11.369177 11.272340 11.180418 11.092936 11.009485 10.929710 10.853300 10.801282 10.746535 10.688756 10.627592 10.562619 10.493332 10.419118 10.339220 10.252696 10.158348 10.054616 9.939427 9.809933 9.662069 9.489747 9.283244 9.025554 8.682640 # 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 131.293 # Specify which KIM Model to use pair_style kim EAM_Dynamo_SmirnovaKuskinStarikov_2013_UMoXe__MO_679329885632_005 pair_coeff * * Xe # 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