# Define looping variables variable loopcount loop 42 variable latticeconst index 16.435900 15.334641 14.652124 14.156240 13.766534 13.445461 13.172428 12.934912 12.724728 12.536229 12.365357 12.209095 12.065140 11.931694 11.807327 11.690881 11.581408 11.478120 11.380355 11.287552 11.199232 11.114981 11.034442 10.957300 10.904783 10.849511 10.791180 10.729429 10.663834 10.593883 10.518957 10.438294 10.350941 10.255688 10.150963 10.034670 9.903935 9.754654 9.580681 9.372199 9.112040 8.765840 # 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_1959LowCutoff_Cs__MO_256406354561_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