# Define looping variables variable loopcount loop 42 variable latticeconst index 15.410700 14.378130 13.738185 13.273230 12.907832 12.606786 12.350782 12.128081 11.931007 11.754266 11.594052 11.447536 11.312560 11.187437 11.070828 10.961645 10.859001 10.762155 10.670488 10.583473 10.500662 10.421666 10.346150 10.273820 10.224579 10.172755 10.118062 10.060163 9.998660 9.933073 9.862821 9.787189 9.705285 9.615974 9.517781 9.408743 9.286162 9.146193 8.983073 8.787595 8.543665 8.219060 # 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 88.90585 # Specify which KIM Model to use pair_style kim LAMMPSvirial Dipole_Umeno_YSZ__MO_394669891912_001 pair_coeff * * Y # 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