# The Pd dimer # This script calculates the bond energy as a function of bond length. # The bond length is varied by giving one of the two atoms a constant verlocity. units metal atom_style atomic boundary s s s lattice sc 1.0 region box block -10 +10 -10 +10 -10 +10 units box atom_modify map array neighbor 2.0 nsq create_box 2 box create_atoms 1 single 0 0 0 units box create_atoms 2 single 0.1 0 0 units box timestep 0.001 pair_style eam/opt pair_coeff * * eam.Pd.Pd.LAMMPS.Foiles # Directly control the position of both atoms. fix 1 all setforce 0 0 0 # Give one of the atoms a constant velocity. group myatom type 2 velocity myatom set 50.0 0 0 units box # This is required to print the current bond length. variable dimerdistance equal x[2] thermo 1 thermo_style custom step pe v_dimerdistance fix 2 all nve run 60