# Define looping variables variable loopcount loop 42 variable latticeconst index 17.345300 16.183094 15.462805 14.939477 14.528205 14.189362 13.901219 13.650558 13.428742 13.229811 13.049483 12.884572 12.732650 12.591819 12.460569 12.337679 12.222148 12.113144 12.009968 11.912029 11.818821 11.729908 11.644911 11.563500 11.508078 11.449748 11.388189 11.323022 11.253798 11.179978 11.100907 11.015781 10.923595 10.823072 10.712553 10.589827 10.451859 10.294319 10.110721 9.890705 9.616154 9.250800 # 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 223 # Specify which KIM Model to use pair_style kim LJ_ElliottAkerson_2015_Universal__MO_959249795837_003 pair_coeff * * Fr # 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