# Define looping variables variable loopcount loop 42 variable latticeconst index 17.947400 16.744851 15.999559 15.458065 15.032517 14.681912 14.383767 14.124405 13.894889 13.689053 13.502465 13.331830 13.174634 13.028915 12.893109 12.765953 12.646411 12.533623 12.426866 12.325527 12.229084 12.137084 12.049137 11.964900 11.907554 11.847200 11.783504 11.716075 11.644448 11.568064 11.486249 11.398168 11.302782 11.198770 11.084414 10.957428 10.814671 10.651662 10.461692 10.234038 9.949956 9.571920 # 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 126.90447 # Specify which KIM Model to use pair_style kim Sim_LAMMPS_EIM_Zhou_2010_BrClCsFIKLiNaRb__SM_259779394709_000 pair_coeff * * I # 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