# Define looping variables variable loopcount loop 42 variable latticeconst index 16.436000 15.334726 14.652201 14.156310 13.766600 13.445523 13.172486 12.934967 12.724780 12.536279 12.365405 12.209140 12.065183 11.931736 11.807367 11.690920 11.581446 11.478156 11.380390 11.287586 11.199264 11.115013 11.034472 10.957329 10.904812 10.849540 10.791208 10.729457 10.663862 10.593911 10.518985 10.438321 10.350968 10.255715 10.150988 10.034696 9.903960 9.754678 9.580705 9.372221 9.112062 8.765860 # 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 LAMMPSvirial Pair_Morse_Shifted_GirifalcoWeizer_LowCutoff_Cs__MO_256406354561_001 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