# Define looping variables variable loopcount loop 42 variable latticeconst index 14.976800 13.973292 13.351358 12.899490 12.544377 12.251803 12.003005 11.786572 11.595045 11.423278 11.267573 11.125181 10.994004 10.872403 10.759075 10.652966 10.553210 10.459090 10.370003 10.285438 10.204957 10.128185 10.054794 9.984500 9.936646 9.886281 9.833128 9.776860 9.717088 9.653348 9.585074 9.511572 9.431974 9.345178 9.249750 9.143782 9.024654 8.888626 8.730099 8.540126 8.303064 7.987600 # 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_1958LowCutoff_Xe__MO_648694198005_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