# Define looping variables variable loopcount loop 42 variable latticeconst index 15.695100 14.643470 13.991712 13.518175 13.146033 12.839429 12.578700 12.351889 12.151177 11.971173 11.808001 11.658781 11.521313 11.393882 11.275119 11.163921 11.059382 10.960749 10.867390 10.778769 10.694429 10.613975 10.537065 10.463400 10.413250 10.360470 10.304768 10.245800 10.183162 10.116364 10.044816 9.967788 9.884373 9.793413 9.693408 9.582358 9.457515 9.314963 9.148832 8.949747 8.701315 8.370720 # 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 132.90545 # Specify which KIM Model to use pair_style kim Morse_Shifted_GirifalcoWeizer_1959HighCutoff_Cs__MO_187111446479_002 pair_coeff * * Cs # 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