# Define looping variables variable loopcount loop 42 variable latticeconst index 3.564790 3.325937 3.177905 3.070352 2.985828 2.916190 2.856972 2.805457 2.759870 2.718986 2.681925 2.648033 2.616811 2.587867 2.560893 2.535637 2.511894 2.489491 2.468287 2.448159 2.429003 2.410730 2.393261 2.376530 2.365140 2.353152 2.340500 2.327107 2.312880 2.297708 2.281457 2.263962 2.245016 2.224356 2.201642 2.176419 2.148064 2.115686 2.077952 2.032734 1.976308 1.901220 # 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 sc lattice using a single conventional (orthogonal) # unit cell with a lattice constant from the 'latticeconst' variable defined on line 3 above lattice sc ${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 Sim_LAMMPS_MEAM_KoGrabowskiNeugebauer_2015_NiTi__SM_770142935022_000 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