# Define looping variables variable loopcount loop 42 variable latticeconst index 14.922400 13.922547 13.302878 12.852655 12.498835 12.207326 11.959435 11.743790 11.552960 11.381819 11.226681 11.084807 10.954108 10.832950 10.720035 10.614312 10.514919 10.421142 10.332379 10.248122 10.167934 10.091442 10.018318 9.948280 9.900599 9.850417 9.797457 9.741392 9.681838 9.618328 9.550302 9.477067 9.397758 9.311276 9.216194 9.110610 8.991914 8.856379 8.698427 8.509142 8.272941 7.958620 # 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 Sim_LAMMPS_EIM_Zhou_2010_BrClCsFIKLiNaRb__SM_259779394709_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