# Define looping variables variable loopcount loop 42 variable latticeconst index 16.279900 15.189084 14.513040 14.021858 13.635848 13.317820 13.047376 12.812112 12.603922 12.417211 12.247959 12.093178 11.950588 11.818408 11.695220 11.579879 11.471444 11.369136 11.272298 11.180375 11.092892 11.009440 10.929665 10.853254 10.801236 10.746489 10.688711 10.627547 10.562574 10.493288 10.419073 10.339176 10.252652 10.158304 10.054572 9.939384 9.809890 9.662026 9.489705 9.283202 9.025514 8.682600 # 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 LAMMPSvirial EAM_Dynamo_Smirnova_UMoXe__MO_679329885632_004 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