Introduction

As a part of my graduate studies, I have been learning how to perform basic molecular dynamics simulations using the LAMMPS software package. This is in service of generating dynamic trajectory data for use in machine learning applications.

In past posts, I’ve written about simulating:

In this post, I’ll be simulating Pt adatom diffusion on Pt(100) surface.

Pt Adatom Diffusion on Pt(100)

Simple example of Pt adatom diffusion on Pt(100) surface:

  • Derived from Eric N. Hahn’s example.
  • See this post for more details.
  • We use the EAM potential from this study and linked here.
  • Atoms are initialized at 600 K.
  • A heat-bath is applied to the lowest atoms within the bulk to maintain a temperature of 850 K through scaling their velocities.

You can see this system being simulated in this YouTube video:

Input Script

If you want to run this simulation yourself, you can use the following input script:

### Original Created by Eric N. Hahn  ###
### [email protected] ###

### Modifications by Hunter Heidenreich, CSE lab (Harvard, 2023)
### [email protected]
### 2023-09-01

### Simulating adatoms ###
### Version 0.2 ###


units metal
dimension 3
boundary p p s
atom_style atomic

lattice fcc 3.96
variable cubel equal 4
variable fixer1 equal "v_cubel+2"
variable fixer2 equal "v_cubel+1.49"
region  box block -${cubel} ${cubel} -${cubel} ${cubel} -${fixer1} 1 units lattice
region cbox block -${cubel} ${cubel} -${cubel} ${cubel} -${fixer1} 0 units lattice
create_box 1 box
create_atoms 1 region cbox
create_atoms 1 single -0.5 0 0.5 units lattice
region hold block INF INF INF INF -${fixer1} -${fixer2} units lattice
region temp block INF INF INF INF -${fixer2} -${cubel} units lattice
group hold region hold
group temp region temp

pair_style eam/alloy
pair_coeff * * Pt_Zhou04.eam.alloy Pt

timestep        0.005
compute         new all temp
velocity        temp create 600 12345
fix heater temp temp/rescale 1 850 850 5 1
fix nve all nve
fix freeze hold setforce 0 0 0

variable e     equal pe
variable k     equal ke
variable t     equal etotal
variable T     equal temp
fix energy all ave/time 1 50 50 v_k v_e v_t v_T file energy_avg.txt

minimize 1.0e-4 1.0e-6 1000 10000

dump eve all custom 5 dump.lammpstrj id type xu yu zu   # fx fy fz  # uncomment for forces
dump_modify eve sort id

thermo 50
run 100000  # 100_000 * 5 fs = 500 ps

Conclusion

Thanks for reading!

If you have any questions or comments, please feel free to reach out.