# Define looping variables variable loopcount loop 42 variable latticeconst index 51.750000 48.282559 46.133577 44.572228 43.345196 42.334261 41.474584 40.726738 40.064950 39.471440 38.933429 38.441419 37.988160 37.567990 37.176406 36.809764 36.465077 36.139862 35.832037 35.539837 35.261751 34.996478 34.742890 34.500000 34.334646 34.160618 33.976956 33.782529 33.575996 33.355751 33.119840 32.865865 32.590828 32.290915 31.961178 31.595021 31.183390 30.713365 30.165598 29.509172 28.690042 27.600000 # 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 15.9994 # Specify which KIM Model to use pair_style kim LAMMPSvirial Dipole_Umeno_YSZ__MO_394669891912_001 pair_coeff * * O # 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