# Define looping variables variable loopcount loop 42 variable latticeconst index 4.218030 3.935407 3.760248 3.632986 3.532973 3.450574 3.380504 3.319549 3.265608 3.217232 3.173380 3.133278 3.096334 3.062087 3.030169 3.000285 2.972191 2.945683 2.920593 2.896776 2.874110 2.852488 2.831819 2.812022 2.798544 2.784359 2.769390 2.753542 2.736708 2.718757 2.699528 2.678827 2.656410 2.631965 2.605089 2.575244 2.541693 2.503383 2.458735 2.405232 2.338467 2.249620 # 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 EAM_Dynamo_Bonny_Pasianot_FeCuNi__MO_469343973171_004 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