# Define looping variables variable loopcount loop 42 variable latticeconst index 15.000000 13.994945 13.372051 12.919486 12.563825 12.270800 12.021619 11.804852 11.613029 11.440997 11.285052 11.142440 11.011061 10.889273 10.775770 10.669497 10.569587 10.475322 10.386098 10.301402 10.220797 10.143907 10.070403 10.000000 9.952071 9.901629 9.848393 9.792037 9.732173 9.668334 9.599954 9.526338 9.446617 9.359686 9.264109 9.157977 9.038664 8.902425 8.743651 8.553383 8.315954 8.000000 # 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 bcc lattice using a single conventional (orthogonal) # unit cell with a lattice constant from the 'latticeconst' variable defined on line 3 above lattice bcc ${latticeconst} region box block 0 1 0 1 0 1 units lattice create_box 1 box create_atoms 1 box mass 1 4.002602 # Specify which KIM Model to use pair_style kim TT_Modified_HellmannBichVogel_2007_He__MO_126942667206_002 pair_coeff * * He # 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