# Define looping variables variable loopcount loop 42 variable latticeconst index 19.350000 18.053478 17.249946 16.666137 16.207334 15.829332 15.507888 15.228259 14.980807 14.758886 14.557717 14.373748 14.204269 14.047162 13.900743 13.763651 13.634768 13.513166 13.398066 13.288809 13.184829 13.085640 12.990820 12.900000 12.838172 12.773101 12.704427 12.631728 12.554503 12.472150 12.383940 12.288976 12.186136 12.073994 11.950701 11.813790 11.659876 11.484128 11.279310 11.033864 10.727581 10.320000 # 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 sc lattice using a single conventional (orthogonal) # unit cell with a lattice constant from the 'latticeconst' variable defined on line 3 above lattice sc ${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