# Define looping variables variable loopcount loop 42 variable latticeconst index 7.336050 6.844507 6.539869 6.318532 6.144589 6.001279 5.879412 5.773398 5.679583 5.595447 5.519179 5.449432 5.385178 5.325615 5.270104 5.218129 5.169266 5.123164 5.079527 5.038105 4.998684 4.961079 4.925130 4.890698 4.867258 4.842588 4.816552 4.788990 4.759712 4.728490 4.695048 4.659045 4.620055 4.577540 4.530797 4.478891 4.420538 4.353908 4.276257 4.183203 4.067083 3.912560 # 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 bcc lattice using a single conventional (orthogonal) # unit cell with a lattice constant from the 'latticeconst' variable defined on line 3 above lattice bcc ${latticeconst} region box block 0 1 0 1 0 1 units lattice create_box 1 box create_atoms 1 box mass 1 58.6934 # Specify which KIM Model to use pair_style kim LAMMPSvirial IMD_EAM_Schopf_AlNiCo_B__MO_128037485276_002 pair_coeff * * Ni # 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