# Define looping variables variable loopcount loop 42 variable latticeconst index 9.938430 9.272518 8.859813 8.559961 8.324313 8.130166 7.965068 7.821446 7.694352 7.580370 7.477047 7.382558 7.295511 7.214818 7.139616 7.069203 7.003007 6.940551 6.881434 6.825318 6.771912 6.720967 6.672266 6.625620 6.593864 6.560443 6.525171 6.487832 6.448168 6.405871 6.360565 6.311790 6.258970 6.201373 6.138048 6.067729 5.988677 5.898410 5.793214 5.667150 5.509839 5.300500 # 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 fcc lattice using a single conventional (orthogonal) # unit cell with a lattice constant from the 'latticeconst' variable defined on line 3 above lattice fcc ${latticeconst} region box block 0 1 0 1 0 1 units lattice create_box 1 box create_atoms 1 box mass 1 79.904 # Specify which KIM Model to use pair_style kim Sim_LAMMPS_EIM_Zhou_2010_BrClCsFIKLiNaRb__SM_259779394709_000 pair_coeff * * Br # 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