📄 xmd-9.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>XMD - Molecular Dynamics Program: Fill Command </TITLE> <LINK HREF="xmd-10.html" REL=next> <LINK HREF="xmd-8.html" REL=previous> <LINK HREF="xmd.html#toc9" REL=contents></HEAD><BODY><A HREF="xmd-10.html">Next</A><A HREF="xmd-8.html">Previous</A><A HREF="xmd.html#toc9">Contents</A><HR><H2><A NAME="fill"></A> <A NAME="s9">9. Fill Command </A></H2><P>The FILL command is used to create lattices. Essentially, youspecify a region which will contain the lattice, and youspecify the lattice geometry and orientation. The programthen generates atomic coordinates that match your specifications.<P>The lattice is generated according to FILL PARTICLE and FILL CELLcommands that you provide.The FILL PARTICLE command specifies a set of atoms that areplace repeatedly throughout the region. The FILL CELL commandspecifies the three vectors that describe how the set of atomsare placed in the region.<P><H2><A NAME="ss9.1">9.1 FILL Example 1: Filling a Sphere</A></H2><P>Here is an example were we create a sphere fill with a B2lattice.<P><BLOCKQUOTE><CODE><PRE>fill boundary sphere 4.0 2.0 2.0 2.0fill particle 2 1 0.0 0.0 0.0 2 0.5 0.5 0.5fill align 2 2 2fill cell 1 0 0 0 1 0 0 0 1fill orient 1 1 0 1 -1 0 0 0 1fill go</PRE></CODE></BLOCKQUOTE>The sphere is centered on point (2,2,2), and has a radiusof 4 angstroms, as specified by the FILL BOUNDARY command.The FILL PARTICLE command gives the coordinates and typesfor the atoms of the repeating cell. There are two atomsfor the repeating cell of a B2 lattice (a B2 lattice hasthe atom positions of a bcc lattice, but with two atomspecicies). The FILL CELL command says that the cellis repeatingby the three displacements (1,0,0), (0,1,0) and (0,0,1).The FILL ORIENT command say that the particles and displacementsshould be re-oriented so that the lattice directions that werepreviously the (100), (010) and (001) are now(110), (1-10) and (001).The FILL ALIGN command says that the origin of the repeatingcell (where according to the FILL PARTICLE command the firstatom is positioned) will lie on the point (2,2,2) in the lattice.In this example therefore, an atom of type 1 will be positionedat the center of the filled sphere.The FILL GO command tells XMD that we've entered all theFILL information and that it is time to create the particles.Default values are used for whatever information has notbeen entered. Sometimes more than one FILL GO command isused.If any information is specified earlier commands becomesthe default for later commands.<P><P><H2><A NAME="ss9.2">9.2 FILL Example 2: Creating an Diamond Cubic Lattice</A></H2><P>In this example, we fill an entire simulation box with a diamondcubic lattice. The diamond cubic lattice is made by duplicatinga pair of atoms using the repeating cell vectors for an FCC lattice.Since we not used a FILL BOUNDARY command, FILL BOUNDARY BOXis assumed with the system box as the region to fill.<BLOCKQUOTE><CODE><PRE>box 8 8 8fill particle 21 0 0 0 2 1/4 1/4 1/4fill cell 0 1/2 1/2 1/2 0 1/2 1/2 1/2 0fill go</PRE></CODE></BLOCKQUOTE><P><H2><A NAME="ss9.3">9.3 FILL Example 3: Twinning Plane</A></H2><P><BLOCKQUOTE><CODE><PRE>## Twinning plane in Diamond SiC lattice### Box commensurate with [11-2] [111] [1-10] orientation#box 6*sqrt(6)/2 4*sqrt(3) 10*sqrt(2)/2## Align particles so # (1) box boundaries fall midway between adjacent planes# (2) two twinned grains are properly aligned#fill align sqrt(6)/12 2*sqrt(3)-sqrt(3)/8 sqrt(2)/8## Basis atoms for Diamond SiC#fill particle 21 0 0 02 1/4 1/4 1/4## Cell vectors for fcc/diamond primitive lattice#fill cell0 1/2 1/21/2 0 1/21/2 1/2 0## Fill bottom y half of box#fill orient 1 1 -2 1 1 1 1 -1 0fill boundary box 0 0 0 6 2.75 2fill go## Fill top y half of box#fill orient -1 -1 2 1 1 1 -1 1 0fill boundary box 0 2.75 0 6 5.50 2fill go</PRE></CODE></BLOCKQUOTE><P><H2><A NAME="ss9.4">9.4 FILL commands</A></H2><P><DL><P><DT><B>FILL ALIGN x y z</B><DD><P>You can use this command to insure that one of the generatedatoms is positioned at (<CODE>x,y,z</CODE>).This commands makes theatom typepositioned at (0,0,0) in the FILL PARTICLE commandplaced at (<CODE>x,y,z</CODE>) in the generated coordinates.If (<CODE>x,y,z</CODE>) is outside the filled region, thenif the lattice was extended outside of the region theatom would have been at (<CODE>x,y,z</CODE>).Note that if no atom is at (0,0,0) in the FILLPARTICLE command, then no atom will appear at(<CODE>x,y,z</CODE>).<P><P><DT><B>FILL BOUNDARY BOX x1 y1 z1 x2 y2 z2</B><DD><P>Makes the fill region a rectangular box with points(<CODE>x1,y1,z1</CODE>) and (<CODE>x2,y2,z2</CODE>) as theopposite corners. This box is aligned with the coordinateaxis.<P>If no boundary is specified, then FILL BOUNDARY BOXis assumed, with the box begin the system box (specifiedby the BOX command). If neither FILL BOUNDARY BOX or BOXhas been specified before FILL GO is run, then an erroroccurs.<P><DT><B>FILL BOUNDARY SPHERE radius xcenter ycenter zcenter</B><DD><P>Makes the fill region a sphere centered on the point(<CODE>xcenter,ycenter,zcenter</CODE>) with a radius <CODE>radius</CODE>.Values are in angstroms.<P><DT><B>FILL BOUNDARY CYLINDER r length xc yc zc xorient yorient zorient</B><DD><P>Makes the fill region a cylinder with radius <CODE>r</CODE>,length <CODE>length</CODE>, centered at point(<CODE>xc,yc,zc</CODE>) and with its axis oriented along the direction(<CODE>xorient,yorient,zorient</CODE>).Values are in angstroms.<P><DT><B>FILL CELL</B><DD><P>This chooses the repeating cell vectors.By default, these are (100), (010), (001).Three lines follow this command, one for each vector.On each line are the three components for that vector.<P><DT><B>FILL GO</B><DD><P>Generate particles from values specified.The values specified become the defaults for the next FILL GO command.<P><DT><B>FILL MARGIN margin</B><DD><P>Sometimes when using FILL to generate particles in two or moreadjacent regions, particles in neighboring regions maylie too close to one another. This can cause a problem whencalculating energies or force, for some potential models failwhen atoms are too closes. To prevent this, one can choosea <CODE>margin</CODE>. After the boundary is filled, the particlesare then contracted toward the boundary center so that theminimum distance from any particle to the boundary walls is<CODE>margin</CODE> (units of angstroms).The default margin is zero.<P><DT><B>FILL ORIENT ax ay az bx by bz cx cy cz</B><DD><P>This command chooses the lattice orientation. One assumesthat the atom coordinates and cell vectors normallygive a lattice in a [100] [010] [001] orientation.The vectors(<CODE>ax,ay,az</CODE>),(<CODE>bx,by,bz</CODE>) and(<CODE>cx,cy,cz</CODE>)<B>must</B> be three mutually orthogonal vectorsof any length. If they are not orthogonal an error messageis written.<P><DT><B>FILL PARTICLE npart</B><DD><P>This is similar to the PARTICLE command above.It specifies a set of atoms that will be repeated to fill theregion. <CODE>npart</CODE> is the number of atoms. Followingthis command should be <CODE>npart</CODE> lines, one line foreach atom, and on each line is the atom type (a number between 1 and 255)and the x, y and z coordinates for that atom.<P></DL> <P><P><P><HR><A HREF="xmd-10.html">Next</A><A HREF="xmd-8.html">Previous</A><A HREF="xmd.html#toc9">Contents</A></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -