Use Au-Si MEAM Potential in LAMMPS: Difference between revisions

From Micro and Nano Mechanics Group
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
<P ALIGN="CENTER"><STRONG>Yanming Wang, Seunghwa Ryu and Wei Cai</STRONG></P>
<P ALIGN="CENTER"><STRONG>Yanming Wang, Seunghwa Ryu and Wei Cai</STRONG></P>
</DIV>
</DIV>
<P ALIGN="CENTER">[[June]], [[2012]]</P>
<P ALIGN="CENTER"> Created June, 2012, Last modified July, 2014</P>
<P>
<P>


Line 22: Line 22:
svn update
svn update



== Compiling MEAM potential in LAMMPS==
== Compiling MEAM potential in LAMMPS==

The compilation of MEAM potential has been changed starting from LAMMPS '''svn''' revision 24. Please refer to [http://micro.stanford.edu/wiki/How_to_compile_LAMMPS How to compile LAMMPS].



=== Preparing for parallel run ===
=== Preparing for parallel run ===

Revision as of 05:13, 24 July 2014

Use Au-Si MEAM Potential in LAMMPS

Yanming Wang, Seunghwa Ryu and Wei Cai

Created June, 2012, Last modified July, 2014

This tutorial explains how to use Au-Si MEAM potential in LAMMPS on a cluster like mc2. It starts with the installation of LAMMPS on mc2, then talks about the compiling of the Au-Si MEAM potential. This tutorial also includes a test case to make sure the result from LAMMPS with this MEAM potential is consistent with that from MD++.


Installing LAMMPS on mc2

LAMMPS is a classical molecular dynamics code for large-scale atomic/molecular massively parallel simulation. On mc2, you can get LAMMPS from our SVN server using the following commands.

mkdir -p ~/Codes/LAMMPS.svn
cd ~/Codes/LAMMPS.svn
svn co https://micro.stanford.edu/svn/LAMMPS .

Typing the following SVN command from within the "LAMMPS.svn" directory, you can update your LAMMPS package.

svn update


Compiling MEAM potential in LAMMPS

The compilation of MEAM potential has been changed starting from LAMMPS svn revision 24. Please refer to How to compile LAMMPS.


Preparing for parallel run

First, you need to download the fftw.tar.gz and upload this archive file to your account on mc2. In your home directory, make a new folder named usr, then type the following command to unzip the fftw library in your usr folder.

cd ~/usr
tar zxvf fftw.tar.gz

ALso add the following lines at the end of your ~/.bash_profile file to clarify the compiler.

module load intel/intel-11
module load mvapich/1.2rc1-intel-11-dell-gen2

Preparing for compiling MEAM potential

Au-Si MEAM potential is a potential developed by Dr. Seunghwa Ryu and Prof. Wei Cai[1][2]for gold-silicon binary system. To compile this potential in LAMMPS, you need to open the Makefile file under the LAMMPS.svn directory, finding the following line

cd lib/meam;  make -f Makefile.$(libFC.$(SYS)) F90FLAGS="-O -D_EROSE_FUNCTION=1"

and replace it with

cd lib/meam;  make -f Makefile.$(libFC.$(SYS)) F90FLAGS="-O -D_EROSE_FUNCTION=3"

Next, in the ~/.bash_profile file, add the following line to specify the system you are using.

export TARGET=mc2

Finally, go to LAMMPS.svn directory and type

make

This will make lmp_mc2 in LAMMPS.svn/src/ directory.

Test case:Comparsion with MD++

This section illustrates how to compare the simulation result from LAMMPS using the MEAM potential with that from MD++. A successful test will show MD++ and LAMMPS report the same potential energy and forces from a given atoms' configuration.

MD++ test case

Supposing you've known how to run MD++ code from our manuals and downloaded the MD++ package from our SVN server, you can do the following test case.

Downlaod md++_meam_testcase.tar.gz, which contains a input tcl script, three configuration cn files and a help text file.

Unzip this gz file under the certain folder using the command

mkdir -p ~/Codes/MD++.svn/scripts/work/si_au
cd ~/Codes/MD++.svn/scripts/work/si_au
tar zxvf md++_meam_testcase.tar.gz 

Compile the MEAM potential typing the below command and make sure that in src/Makefile file -D_EROSE_FUNCTION=3 is specified under meam-lammps.

make meam-lammps build=R SYS=mc2

Run the simulation within the MD++ home folder. for example,

bin/meam-lammps_mc2 scripts/work/si_au/si_au_compare.tcl AuSiTestCase1

This will read the atoms' configuration from AuSiTestCase1.cn, visualize the atoms and calculate the potential and forces of the system. Meanwhile, it provides one .lammps file for LAMMPS and one .cfg file for Atomeye. The potential energy in this case should be -18874.6969309944. You can compare this value with the number from LAMMPS later.

LAMMPS test case

Download lammps_meam_testcase.tar.gz and unzip it by the command

mkdir ~/Codes/LAMMPS.svn/runs/AuSi_meam_test
cd ~/Codes/LAMMPS.svn/runs/AuSi_meam_test
tar zxvf lammps_meam_testcase.tar.gz

In this archive file, the in.md is the input script forLAMMPS. The golammps.pbs can submit your simulation request onto the server. Run this LAMMPS test case, you should type

qsub golammps.pbs

When the simulation is finished, in the same folder, you can check the potential information in the lammps.out file and the forces information in the dump.mdfile. Specifically, if you read the configuration from AuSiTestCase1.lammpsdata, you would expect the potential and forces results are exactly the same as those come from MD++ simulation, like the potential should be -1.88746969e+04.