# Define looping variables variable loopcount loop 42 variable latticeconst index 14.343100 13.382064 12.786452 12.353709 12.013625 11.733434 11.495166 11.287893 11.104471 10.939974 10.790859 10.654494 10.528868 10.412414 10.303883 10.202264 10.106731 10.016594 9.931278 9.850291 9.773217 9.699694 9.629409 9.562090 9.516260 9.468026 9.417122 9.363234 9.305991 9.244947 9.179562 9.109169 9.032939 8.949815 8.858424 8.756939 8.642851 8.512577 8.360757 8.178821 7.951788 7.649670 # 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 227 # Specify which KIM Model to use pair_style kim LJ_ElliottAkerson_2015_Universal__MO_959249795837_003 pair_coeff * * Ac # 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