Micro and Nano Mechanics Group
(Difference between revisions)
(Embed image of FCC)
(Embed image of BCC)

Revision as of 12:08, 26 November 2007

Manual 02 for MD++
MD++ Tour with Sample Scripts

Keonwook Kang and Wei Cai

Nov 25 , 2007



Contents

Making a Perfect Crystal

Many solid materials have a periodic crystal structure.<ref>Glass is a counter-example, which is noncrystalline. We call it an amorphous material. Sometimes people consider it as supercooled liquid instead of a true solid, because, like a liquid, glass can flow under shear stress, although at very slow rate.</ref> For example, copper and aluminum have the face-centered-cubic (FCC) structure, while molybdenum and tungsten have the body-centered-cubic (BCC) structure under ambient conditions. The periodic arrangement of atoms simplifies the process of setting up an atomistic simulation, because we can use a periodic array of atoms as the initial condition. Thus, building up a crystal structure is often the first step in the atomistic simulation of solids. In this manual, we will learn how to build several crystal structures in MD++ through several examples.



Face-centered-cubic crystal

First, let's make a perfect FCC aluminum crystal. The script file al.script, together with other script files discussed in this manual, can be found in the directory MD++/scripts/ME346. To run this script file, type

$ cd ~/Codes/MD++
$ bin/md_gpp scripts/ME346/al.script

The executable file, md_gpp does not contain any potential model, but can be used to visualize the atomic structure, as mentioned in the Manual 01.<ref>You can compile the executable alglue_gpp, which is a glue potential model for aluminum by typing

$ make alglue build=R.</ref> 

Here is the content of the al.script file.

# -*-shell-script-*-
setnolog
setoverwrite
dirname = runs/al-example     # To specify run directory

#--------------------------------------------
# Create Perfect Lattice Configuration
crystalstructure = face-centered-cubic
latticeconst = 4.05           # lattice constant for Al (unit: Angstrom)
latticesize = [ 1 0 0 1       # c1 = 1*[1 0 0] periodicity vec. in x
                0 1 0 1       # c2 = 1*[0 1 0] periodicity vec. in y
                0 0 1 1]      # c3 = 1*[0 0 1] periodicity vec. in z
makecrystal

#-------------------------------------------------------------
# Plot Configuration
atomradius = 1.0 bondradius = 0.3 bondlength = 0
atomcolor = blue highlightcolor = purple backgroundcolor = gray
bondcolor = red fixatomcolor = yellow
plotfreq = 10 win_width = 600 win_height = 600
rotateangles = [ 0 0 0 1.0 ]
openwin alloccolors rotate saverot eval plot
sleep quit

FCC, as well as HCP (Hexagonal Close Packed), is a close-packed crystal structure. In Fig.1(a), you can see the conventional image of FCC unit cell structure, where there is an atom at every corner and every face center of the cube. Since each corner atom is shared by 8 adjacent cubes and each face-centered atom is shared by 2 cubes, the total number of atoms per unit cell will be 81 / 8 + 61 / 2 = 4. In MD++, four atoms will be plotted per unti cell as shown in Fig.1(b), which is exactly what you see when you run al.script. Now imagine that the unit cell is replicated periodically in all 3 directions to fill the entire space. This would create an infinitely large crystal. We can create a larger crystal by modifying the latticesize variable, e.g.

latticesize = [ 1 0 0 3
                0 1 0 3
                0 0 1 3]

This creates a crystal with 3 * 3 * 3 = 27 unit cells as shown in the Fig.1(c). The plot section of this script file will be explained in Manual 06.

Ex. 1 Make a perfect crystal of copper (Cu) of 4 X 4 X 4 unit cells. Cu has an FCC crystal structure and its equilibrium lattice constant is a=3.6030 ºA. You can use md_gpp as the executable file<ref>For MD simulations of Cu or Al, the fourth column of latticesize should not be smaller than 4 due to the relatively large cut-off radius in their potential models (eam or alglue).</ref> if you only want to visualize the structure. Use eam_gpp if you would like to do some computation using the potential model. (For example, the eval command computes the total potential energy of the structure.) For the latter case, you need to insert the following two lines into your script file after dirname.

potfile = ~/Codes/MD++/potentials/EAMDATA/eamdata.Cu
eamgrid = 5000 readeam

This reads the data needed by the EAM potential model of Cu.

Ex. 2 Make a perfect crystal of argon (Ar) of 4 X 4 X 4 unit cells. Ar is inert gas at room temperature but its solid state is face-centered-cubic crystal below its melting temperature T_m = 83.81K. Ar can be simulated by the Leonard-Jones potential model or the executable lj_gpp. Modify scripts/ME346/ar.script and run it by typing

$ bin/lj gpp scripts/ME346/ar.script

Body-centered-cubic crystal

The BCC structure has an atom at every corner and body-center of each cube (unit cell), as shown in Fig.2(a). Molybdenum (Mo) is one example of BCC materials. Run mo.script file by typing

$ bin/fs gpp scripts/ME346/mo.script

Here is the content of the mo.script file.

# -*-shell-script-*-
setnolog
setoverwrite
dirname = runs/mo-example

#--------------------------------------------
# Read the potential file
potfile = ~/Codes/MD++/potentials/mo_pot readpot

#--------------------------------------------
# Create Perfect Lattice Configuration
crystalstructure = body-centered-cubic
latticeconst = 3.1472         # in Angstrom for Mo
latticesize = [ 1 0 0 3
                0 1 0 3
                0 0 1 3 ]
makecrystal finalcnfile = perf.cn writecn

#---------------------------------------------
# Plot Configuration
atomradius = 1.0 bondradius = 0.3 bondlength = 0
atomcolor = orange highlightcolor = purple backgroundcolor = gray
bondcolor = red fixatomcolor = yellow
plotfreq = 10 win_width = 600 win_height = 600
rotateangles = [ 0 0 0 1 ]
openwin alloccolors rotate saverot eval plot
sleep quit

In the Fig.2(c), the simulation box (i.e. supercell) is defined by three periodicity vectors, c1, c2, c3: c1 = 3[100];c2 = 3[010];c3 = 3[001]; The command makecrystal generates the perfect crystal of molybdenum based on the given variables, crystalstructure<ref>Other possible values for crystalstructure are “simple-cubic”, “face-centered-cubic”,“L1_2”, “L1_0”, “diamond-cubic”, “zinc-blende”, etc. For a complete list, please read src/lattice.h.</ref> , latticeconst, and latticesize. The configuration will be saved as perf.cn in the directory of runs/mo-example by the command writecn. The configuration file contains the number of atoms and the position of all the atoms in terms of scaled coordinates followed by a 3 X 3 matrix, H, whose columns are the three periodicity vectors, c1, c2, and c3. The real coordinates of an atom, r = (x; y; z)T is related to the scaled coordinates s = (sx; sy; sz)T through matrix multiplication r = Hs

Ex. 3 Make a perfect crystal of tantalum (Ta) with repeat vector c1 = 3[1 1 0], c2 = 3[1 1 0], c3 = 4[0 0 1]. Ta has a BCC lattice structure with an equilibrium lattice constant a0 = 3:3058ºA. Read the FS potential file for Ta by inserting the following line in the script.

potfile = ~/Codes/MD++/potentials/ta_pot readpot


Notes

<references/>