# Define looping variables variable loopcount loop 42 variable latticeconst index 14.885400 13.888025 13.269892 12.820786 12.467842 12.177057 11.929779 11.714669 11.524312 11.353595 11.198842 11.057320 10.926944 10.806087 10.693451 10.587991 10.488845 10.395300 10.306757 10.222709 10.142720 10.066417 9.993475 9.923610 9.876048 9.825990 9.773161 9.717236 9.657829 9.594477 9.526620 9.453567 9.374455 9.288188 9.193342 9.088020 8.969618 8.834420 8.676860 8.488045 8.252430 7.938890 # 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 LJ_Shifted_Bernardes_1958HighCutoff_Xe__MO_796748253903_003 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