# Define looping variables variable loopcount loop 42 variable latticeconst index 9.544580 8.905057 8.508707 8.220737 7.994427 7.807974 7.649418 7.511488 7.389430 7.279965 7.180736 7.089992 7.006394 6.928899 6.856677 6.789055 6.725482 6.665500 6.608726 6.554834 6.503545 6.454619 6.407848 6.363050 6.332553 6.300456 6.266582 6.230722 6.192630 6.152009 6.108499 6.061656 6.010929 5.955615 5.894799 5.827267 5.751347 5.664657 5.563629 5.442561 5.291483 5.090440 # 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 72.64 # Specify which KIM Model to use pair_style kim EDIP_BelkoGusakovDorozhkin_2010_Ge__MO_129433059219_001 pair_coeff * * Ge # 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