# Define looping variables variable loopcount loop 42 variable latticeconst index 14.901500 13.903050 13.284250 12.834659 12.481336 12.190236 11.942692 11.727350 11.536788 11.365887 11.210967 11.069292 10.938776 10.817788 10.705032 10.599457 10.500204 10.406559 10.317920 10.233781 10.153706 10.077321 10.004300 9.934360 9.886746 9.836634 9.783748 9.727763 9.668291 9.604871 9.536940 9.463807 9.384610 9.298249 9.203301 9.097865 8.979335 8.843990 8.686259 8.497240 8.261370 7.947490 # 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_1958MedCutoff_Xe__MO_849320763277_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