Micro and Nano Mechanics Group
Revision as of 16:43, 22 July 2009 by Caiwei (Talk)

Use MEAM in MD++

Keonwook Kang, Seunghwa Ryu and Wei Cai

This tutorial describes how to use the modified embedded-atom method (MEAM) potential in MD++. The MEAM potential was originally developed by Dr. Mike Baskes,

Modified embedded-atom potentials for cubic materials and impurities, Physical Review B, 46, 2727 (1992).

Since then MEAM potentials for many elements, as well as binary and ternary alloy systems have been developed. The MEAM potentials allows us to quickly set up a model for a wide range of materials systems. MEAM has also been implemented in LAMMPS, whose subroutines have been used in the MEAM implementation in MD++.

Through some examples, we will describe how to use MEAM in MD++ to model a binary system, as well as allowing the simulation cell to change its shape.


Contents

Download files

First, you need to install MD++ on your computer by following the instructions on MD++ Manuals.

Second, copy input file meam_test.tcl and several potential files (...) to your input file directory of MD++. You can do so by the following commands (assuming you have installed MD++ in ~/Codes/MD++).

 export MDPP=~/Codes/MD++
 mkdir -p ${MDPP}/scripts/work/meam
 cd ${MDPP}/scripts/work/meam
 wget http://micro.stanford.edu/mediawiki-1.11.0/images/Meam_test.tcl.txt -O meam_test.tcl

Compile executable file

There are several MEAM implementations in MD++,

meam-lammps         - MEAM (taken from lammps)
meam-baskes         - MEAM (taken from Baskes's code dynamo)
meam                - MEAM (directly implemented in MD++)

meam-lammps is the one that is most extensively tested. We will use meam-lammps exclusively in the following discussions.

You can compile meam-lammps by typing

 cd ${MDPP}
 make meam-lammps build=R SYS=su-ahpcrc

If compilation is successful, this will create binary file meam-lammps_su-ahpcrc file in your ${MDPP}/bin directory. (su-ahpcrc is one of our computer clusters at Stanford.)

meam-lammps requires Fortran compiler. This is because it uses a number of Fortran codes taken from LAMMPS (in ${MDPP}/Fortran/MEAM-Lammps). Make sure you have Fortran compiler installed on your computer (e.g. gfortran on Mac) and correctly specify the Fortran library paths in ${MDPP}/src/Makefile.base file.


MD in NVT ensemble

The following command will run NVT ensemble for a perfect crystal made of 1000 Si atoms.

 cd ${MDPP}
 bin/meam-lammps_su-ahpcrc scripts/work/meam/si-meam.tcl 0

This is assuming you have put the si-meam.tcl input file in your ${MDPP}/scripts/work/meam directory. An X-window should open and display the positions of the Si atoms during the MD simulation. Output of the simulation is saved in the prop.out file. The variables saved in this file is specified by the output_fmt variable in the input file. For more details about finite temperature simulations in MD++, please read manual 05.


MD in NσT ensemble

The following command will run NσT ensemble for a perfect crystal made of 1000 Si atoms.

 cd ${MDPP}
 bin/meam-lammps_su-ahpcrc scripts/work/meam/si-meam.tcl 1

A shear stress σxy = 1000 MPa is applied to the simulation cell. All other stress components are zero. The simulation cell is allowed to adjust its shape during the simulation. Three of the nine component of the H matrix (whose three column vectors are the repeat vectors) are fixed (specified by fixboxvec) to remove arbitrary rotation.

The 7,8,9 columns of the output file prop.out saves the instantaneous values of H12, H22, H32 (in angstrom). We can see that H12 changes from 0 to -0.43 in response to the applied shear stress. (The negative sign is due to the sign convention of the stress in the Parrinello-Rahman boundary condition, J. Appl. Phys. 52, 7182, 1981.) H22 changes from 27.2 to 27.5 due to thermal expansion.

The 10,11,12 columns of the output file prop.out saves the instantaneous values of σxy, σyy, σzy (in MPa). We can see that σxy eventually fluctuates around 1000 MPa as it should. The other stress components fluctuate around zero after equilibrium is reached.

After the MD simulation, the structure is relaxed by conjugate gradient algorithm with the box fixed.