# Define looping variables variable loopcount loop 42 variable latticeconst index 16.282900 15.191892 14.515729 14.024461 13.638383 13.320299 13.049807 12.814503 12.606275 12.419531 12.250250 12.095442 11.952827 11.820623 11.697414 11.582052 11.473599 11.371272 11.274417 11.182478 11.094980 11.011514 10.931724 10.855300 10.803272 10.748515 10.690726 10.629550 10.564566 10.495266 10.421038 10.341125 10.254586 10.160219 10.056469 9.941259 9.811741 9.663849 9.491496 9.284954 9.027218 8.684240 # 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 79.904 # Specify which KIM Model to use pair_style kim Sim_LAMMPS_EIM_Zhou_2010_BrClCsFIKLiNaRb__SM_259779394709_000 pair_coeff * * Br # 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