# Define looping variables variable loopcount loop 42 variable latticeconst index 16.535000 15.427087 14.740447 14.241567 13.849507 13.526494 13.251811 13.012860 12.801406 12.611769 12.439864 12.282658 12.137833 12.003581 11.878462 11.761313 11.651179 11.547267 11.448911 11.355547 11.266694 11.181934 11.100908 11.023300 10.970467 10.914862 10.856179 10.794057 10.728066 10.657694 10.582317 10.501168 10.413289 10.317462 10.212106 10.095113 9.963590 9.813410 9.638389 9.428651 9.166926 8.818640 # 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 85.4678 # Specify which KIM Model to use pair_style kim EAM_Dynamo_NicholAckland_2016v2_Rb__MO_874930365376_000 pair_coeff * * Rb # 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