M01 Introduction to MD++: Difference between revisions

From Micro and Nano Mechanics Group
Jump to navigation Jump to search
No edit summary
Line 71: Line 71:


== Installation ==
== Installation ==
The latest version of MD++ code can be downloaded from the web site,
http://micro.stanford.edu/~caiwei/Forum/2004-12-12-MD++/.
Here we assume that the reader is familiar with basic Unix/Linux shell
commands.<A NAME="tex2html2"
HREF="footnode.html#foot13"><SUP>2</SUP></A>Before you download MD++ code, we recommend
that you make a sub-directory <TT>Codes</TT> in your home directory.
<BR><TT>
$ mkdir Codes <BR>
$ cd Codes
<BR></TT>
<BR>
Save the MD++ package in this directory(<IMG
WIDTH="17" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img1.png"
ALT="$\sim$">/Codes). Suppose the
downloaded file is name <TT>md++-2007-01-07.tar.gz</TT>, then we can
extract it by,

<BR> <TT> $
tar -zxvf md++-2007-01-07.tar.gz
<BR></TT>
<BR>
This command creates the <TT>MD++</TT> sub-directory and extracts all the
files into it. Go to the <TT>MD++</TT> directory and make a
<TT>runs</TT> directory if it does not exist.
<TT>
$ cd MD++; mkdir runs
<BR></TT>

<BR>
To compile the codes in release(R)<A NAME="tex2html3"
HREF="footnode.html#foot147"><SUP>3</SUP></A> mode in a Linux system, type
<BR><TT>
$ make all build=R
<BR></TT>

<BR>
In a different system (such as Windows), you can specify the
<TT>SYS</TT> variable in the above command line, such as,
<BR><TT>
$ make all build=R SYS=cygwin
<BR></TT>

<BR>
provided that cygwin is installed.<A NAME="tex2html4"
HREF="footnode.html#foot150"><SUP>4</SUP></A> You can also
compile MD++ code in an Apple/Machintosh computer, using
<BR><TT>
$ make all SYS=mac build=R
<BR></TT>

<BR>
By default <TT>SYS=gpp</TT>, which corresponds to the GNU c++
compiler. Use <TT>SYS=intel</TT> to activate the intel c/c++ compiler
<TT>icc</TT>, which produces a faster executable that
<TT>gpp</TT>. For more <TT>SYS</TT> values, see the file
<TT><IMG
WIDTH="17" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img1.png"
ALT="$\sim$">/Codes/MD++/src/Makefie.base</TT>.
<BR>
After compilation, you have executable files such as <I>fs_gpp</I>,
<I>eam_gpp</I>, and <I>sw_gpp</I> in the <TT>bin</TT>
directory.<A NAME="tex2html5"
HREF="footnode.html#foot152"><SUP>5</SUP></A>If you just want to compile one executable file, such as
<TT>fs_gpp</TT>, use
<BR><TT>
$ make fs build=R
<BR></TT>

<BR>
The name of each execution file stands for the potential model used in
the MD simulation. For example, <TT>fs</TT> stands for the
Finnis-Sinclair (FS) potential&nbsp;[<A
HREF="node6.html#fin:sin">2</A>], <TT>lj</TT> for the
Lennard-Jones (LJ) pair potential&nbsp;[<A
HREF="node6.html#lj">3</A>], <TT>eam</TT> for the
embedded-atom method (EAM) potential&nbsp;[<A
HREF="node6.html#daw:bask">4</A>], and <TT>sw</TT>
for the Stillinger-Weber (SW)
potential&nbsp;[<A
HREF="node6.html#sti:web">5</A>,<A
HREF="node6.html#bal:hal:til">6</A>]. Each potential model is
applicable to a set of atomic species. For example, the FS potential
was designed for body-centered-cubic (BCC) metals such as Mo, Ta and
W. The SW potential was designed for diamond-cubic semiconductors such
as Si and Ge.
The executable, <TT>md_gpp</TT> does not contain any potential
model. Hence it cannot be used to compute any material properties but
it can still be used to display atomic structures.
<BR>
If you modify the source code (in the <TT>src</TT> directory), you
need to recompile MD++. we recommend you to clean the previous executables
and rebuild by,
<BR><TT>
$ make clean; make all build=R
<BR></TT>

<BR>
To see more help on <TT>make</TT>, type
<BR><TT>
$ make help
<BR></TT>

<BR>
To check if the installation and compilation is successful, try to run
a script in the <TT>Examples</TT> directory, e.g.
<BR><TT>
$ bin/fs_gpp scripts/Examples/example01-mo.script
<BR></TT>

<BR>
If you want to stop an MD++ run, press <TT>ctrl+c</TT> or close
the visualization window.
<HR>

== MD++ Directories ==
== MD++ Directories ==
== Script File ==
== Script File ==

Revision as of 01:09, 25 November 2007


Manual 01 for MD++
Introduction to MD++

Keonwook Kang and Wei Cai

Nov 24 , 2007



Overview

MD++ is a molecular dynamics simulation package written in C++. It is originally developed by Wei Cai when he was a graduate student at MIT and still being updated to include more features. MD++ is supposed to run in a Unix/Linux environment. However, if you have cygwin,[1] a linux-like environment installed in your Windows machine, you can also enjoy MD++ there. Currently, this code is designed mainly for studying the atomic behavior in solid crystal materials. It can also be extended to study other systems, such as fluids, polymers and bio-molecules. This document is the first of a series of manuals written for those new to MD simulations. These manuals explain how to use MD++ with simple examples.



Installation

The latest version of MD++ code can be downloaded from the web site, http://micro.stanford.edu/~caiwei/Forum/2004-12-12-MD++/. Here we assume that the reader is familiar with basic Unix/Linux shell commands.<A NAME="tex2html2"

 HREF="footnode.html#foot13">2</A>Before you download MD++ code, we recommend 

that you make a sub-directory Codes in your home directory.
$ mkdir Codes
$ cd Codes

Save the MD++ package in this directory(<IMG

WIDTH="17" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img1.png"
ALT="$\sim$">/Codes). Suppose the

downloaded file is name md++-2007-01-07.tar.gz, then we can extract it by,


$ tar -zxvf md++-2007-01-07.tar.gz

This command creates the MD++ sub-directory and extracts all the files into it. Go to the MD++ directory and make a runs directory if it does not exist.

   $ cd MD++; mkdir runs 



To compile the codes in release(R)<A NAME="tex2html3"

 HREF="footnode.html#foot147">3</A> mode in a Linux system, type 


$ make all build=R


In a different system (such as Windows), you can specify the SYS variable in the above command line, such as,
$ make all build=R SYS=cygwin


provided that cygwin is installed.<A NAME="tex2html4"

 HREF="footnode.html#foot150">4</A> You can also
compile MD++ code in an Apple/Machintosh computer, using


$ make all SYS=mac build=R


By default SYS=gpp, which corresponds to the GNU c++ compiler. Use SYS=intel to activate the intel c/c++ compiler icc, which produces a faster executable that gpp. For more SYS values, see the file <IMG

WIDTH="17" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img1.png"
ALT="$\sim$">/Codes/MD++/src/Makefie.base. 


After compilation, you have executable files such as fs_gpp,

eam_gpp, and sw_gpp in the bin
directory.<A NAME="tex2html5"
 HREF="footnode.html#foot152">5</A>If you just want to compile one executable file, such as

fs_gpp, use
$ make fs build=R


The name of each execution file stands for the potential model used in the MD simulation. For example, fs stands for the Finnis-Sinclair (FS) potential [<A

HREF="node6.html#fin:sin">2</A>], lj for the

Lennard-Jones (LJ) pair potential [<A

HREF="node6.html#lj">3</A>], eam for the

embedded-atom method (EAM) potential [<A

HREF="node6.html#daw:bask">4</A>], and sw

for the Stillinger-Weber (SW) potential [<A

HREF="node6.html#sti:web">5</A>,<A
HREF="node6.html#bal:hal:til">6</A>]. Each potential model is

applicable to a set of atomic species. For example, the FS potential was designed for body-centered-cubic (BCC) metals such as Mo, Ta and W. The SW potential was designed for diamond-cubic semiconductors such as Si and Ge. The executable, md_gpp does not contain any potential model. Hence it cannot be used to compute any material properties but it can still be used to display atomic structures.
If you modify the source code (in the src directory), you need to recompile MD++. we recommend you to clean the previous executables and rebuild by,
$ make clean; make all build=R


To see more help on make, type
$ make help


To check if the installation and compilation is successful, try to run a script in the Examples directory, e.g.
$ bin/fs_gpp scripts/Examples/example01-mo.script


If you want to stop an MD++ run, press ctrl+c or close the visualization window.


MD++ Directories

Script File

Visualization Window Control

Bibliography

About this document ...




Notes

  1. For download and installation, visit http://www.cygwin.com/. You must download and install the full package of cygwin. See http://micro.stanford.edu/~caiwei/Forum/2004-12-12-MD++/cygwin.html for installation instructions.