# Define looping variables variable loopcount loop 42 variable latticeconst index 17.923500 16.722559 15.978264 15.437494 15.012514 14.662379 14.364632 14.105617 13.876408 13.670847 13.484509 13.314102 13.157117 13.011592 12.875967 12.748982 12.629600 12.516963 12.410348 12.309145 12.212831 12.120954 12.033124 11.949000 11.891730 11.831456 11.767845 11.700505 11.628973 11.552692 11.470985 11.383021 11.287762 11.183888 11.069684 10.942867 10.800299 10.637507 10.447789 10.220438 9.936734 9.559200 # 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 132.90545 # Specify which KIM Model to use pair_style kim EAM_Dynamo_NicholAckland_2016v2_Cs__MO_144828415103_000 pair_coeff * * Cs # 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