xmd-8.html
来自「一个很好的分子动力学程序」· HTML 代码 · 共 1,092 行 · 第 1/4 页
HTML
1,092 行
for xdisp, ydisp and zdisp can contain the variables x, y and z, whichwill equal the coordinates of each atom moved. Thus you can apply adisplacement that is a function of individual atoms. The optionalformula expression can initialize one or more variables for subsequentuse in the expressions xdisp, ydisp and zdisp. As an example, supposewe want to use the MOVE command to displace atoms away from the point(x0,y0,z0) by an amount exp(-r/5), where r is the distance from point(x0,y0,z0). We can use the following code to do this,<P><BLOCKQUOTE><CODE><PRE>CALC x0=5.0CALC y0=5.0CALC z0=5.0MOVE dx=x-x0 dy=y-y0 dz=z-z0 r=sqrt(dx^2 + dy^2 + dz^2) / dx*exp(-r/5) dy*exp(-r/5) dz*exp(-r/5)</PRE></CODE></BLOCKQUOTE><P>The first three CALC statements initialize values for x0, y0 and z0,which will serve as the center for the atomic displacements. The MOVEcommand initializes four variables, dx, dy, dz and r, which are thenused to specify the displacements. Note that the last three expressionsare the actual displacements. Also note the use of the backslashcharacter, " / " .When this character is the last character on a line, the command iscontinued on the next line. The backslash character may be used for anynumber of lines, as long as the resulting command does not exceeded 1024characters. Typically this is about 12 to 20 lines.<P><P><DT><B>NRANGE ratio</B><DD><P>Set's the range needed by the neighbor search algorithm (see page 5).This neighbor range is longer than the interatomic potential range.The neighbor list includes all particle pairs whose separation is ratiotimes the maximum cutoff distance for the interatomic potentials (ionicand electron density for various species). By default ratio is 1.1.For a given potential the optimum value (in terms of computer time used)may vary.<P><DT><B>PARTICLE [ADD] np</B><DD><P>See the <A HREF="#command-position">POSITION command</A>.<P><P><P><DT><B>PLOT BOND { OFF | ON lo hi }</B><DD><P>Plots "bonds" between atoms. All atoms between lo and hiangstroms apart will be connected by lines.<P><DT><B>PLOT DEVICE { CANON | POSTSCRIPT }</B><DD><P>Specifies the printer to be used for plot output. The default dependson the installation.<P><DT><B>PLOT DISP { ON | OFF | SCALE scale }</B><DD><P>Switches on/off displacement plotting. If REFSTEP has been specifiedpreviously in a program, then when the PLOT statement is given, atomicdisplacements will be plotted (if switched on). scale specifies amagnification scale for the displacement lines.<P><DT><B>PLOT LAYER nlayer [layer1 [layer2 ..... ]]</B><DD><P>Chooses the layers for particle plot. <CODE>nlayer</CODE> is the number oflayers into which the box is divided (in the direction specified by PLOTORIENT). If parameters layer1, layer2, etc. are specified, then onlythese layers are plotted. Otherwise all layers are plotted.<P><DT><B>PLOT ORIENT { X/Y | Y/X | Y/Z | Z/Y | X/Z | Z/X }</B><DD><P>Chooses the orientation of the plot. The default is y/x (which means yin the vertical direction and x in the horizontal). Orientation y/xmeans that the y direction is plotted vertically, and the x direction isplotted horizontally. The z direction is used to divide layers (seePLOT LAYER above).<P><DT><B>PLOT PAGE page</B><DD><P>Number of pages used for plot. Default is one.<P><DT><B>PLOT SYMBOL [FILL] [ RGB red green blue | HSB hue saturation brightness ]{ AST | CIR | CRO | DIA | ITR | NON | SQR | TRI } radius</B><DD><P>Assigns a symbol to all of the selected particles. The FILL optioncauses the symbol to print as a solid block (valid for the circles,diamonds, triangles and squares, ignored otherwise). The RGB and HSBoptions assign a color to the atom (the default color is black). Seethe section <A HREF="xmd-6.html#implementation-plotcolor">Using Color in Plots</A>to learn about the meaning ofthe color parameters. radius specifies the distance from the center ofthe symbol to the furthest point. When no SYMBOL command is given thenSYMBOL CIR 0.25 is assumed. A list of symbol options follows:<P><BLOCKQUOTE><CODE><PRE>AST asteriskCIR circleCRO crossDIA diamondITR inverted triangle (point downward)NON no symbolNUM index number for particleSQU squareTRI triangle</PRE></CODE></BLOCKQUOTE><P>The option NUM prints the number of the particle in place of a symbol.This is useful for finding the location of a specific particle. The NONoption prints no symbol. This is useful when you want to plot bonds,but don't want to have a symbol.<P><DT><B>PLOT WRITE [SEL] [[+] file ]</B><DD><P>Places printer commands (either Canon LBP or PostScript commandsdepending on DEVICE command) describing the lattice plot in either theoutput file (specified on the command line) or in file. If a + isprefixed to the file name then the output is appended file. If the SELoption is specified than only the selected particles are plotted.Before PLOT is called symbols must first be assigned to the atoms (seethe SYMBOL command). Also one may further embellish the plot byspecifying DISP, PAGE or LAYER.<P><P><P><A NAME="command-position"></A> <DT><B>POSITION [ADD] np</B><DD><P>Reads in a set of particle types and coordinates. With the ADD option,previous selections are preserved and the new particles are added to theselection list. Without the ADD option, all previous selections areforgottenand all the new particles areselected. The parameter np is the number of particles for the programto read. For each particle enter its type and coordinates one aseparate line after the POSITION statement as illustrated below(you can substitute PARTICLE for POSITION).<BLOCKQUOTE><CODE><PRE>POSITION 41 1/4 1/4 1/42 1/4 3/4 3/42 3/4 1/4 3/42 3/4 3/4 1/4</PRE></CODE></BLOCKQUOTE><P><P><DT><B>POSVEL [ADD] np</B><DD><P>Reads in a set of particle types, coordinates and velocities. Coordinate units are angstroms, velocity units are cm/sec.With the ADD option,previous selections are preserved and the new particles are added to theselection list. Without the ADD option, all previous selections areforgottenand all the new particles areselected. The parameter np is the number of particles for the programto read. For each particle enter its type and coordinates one aseparate line after the POSVEL statement as illustrated below.<BLOCKQUOTE><CODE><PRE>POSVEL 41 1/4 1/4 1/4 0 0 02 1/4 3/4 3/4 0 0 02 3/4 1/4 3/4 20.0 0 02 3/4 3/4 1/4 -20.0 0 0</PRE></CODE></BLOCKQUOTE><P><P><P><DT><B>POTENTIAL SET { EAM ntype | PAIR ntype | STILL | TERSOFF }</B><DD><P>Sets the potential type. <CODE>EAM</CODE> selects the Embedded Atom Method,and <CODE>ntype</CODE> specifies the number of elements (or atom types)used in the simulation. Similarly for <CODE>PAIR</CODE>, it is used forpair potentials. Subsequent commands must specify the exact formof the potential functions. See the section on Interatomic Potentials.<P>The <CODE>STILL</CODE> option selects the Stillinger-Weber potential forSi, the <CODE>TERSOFF</CODE> option selects the Tersoff potential forCarbon/Silcon.<P><P><DT><B>PSTRAIN e dx dy dz nx ny nz</B><DD><P>Performs an invariant plane strain on the selected particles. The newparticle coordinates are given by<P><BLOCKQUOTE><CODE><PRE>r' = r + e d (n · r)</PRE></CODE></BLOCKQUOTE><P>where d is the vector (dx,dy,dz) and n is (nx,ny,nz). r is the originalparticle coordinate measured from the origin and r' is the new particlecoordinate.<P><P><A NAME="command-pressure"></A> <DT><B>PRESSURE ANDERSEN xmass [ ymass [ zmass ] ] </B><DD><P><DT><B>PRESSURE CLAMP bulkmodulus [ cstep ] </B><DD><P><DT><B>PRESSURE OFF</B><DD><P><DT><B>PRESSURE EXTERNAL pressureX [ pressure Y [ pressure Z ] ] </B><DD><P><DT><B>PRESSURE { ISOTROPIC | ORTHORHOMBIC }</B><DD><P>These commands control XMD's constant pressure algorithm(see section <A HREF="xmd-5.html#theory-pressure">Constant Pressure</A>).By default the constant pressure algorithm is off, consequentlythe box size if fixed.<P>The command PRESSURE ANDERSEN turns on Andersen's constantpressure algorithm. With this algorithm a one or more massesmust be specified. If only <CODE>xmass</CODE> is specified,then the volume mass is the same in all three directions. If only<CODE>xmass</CODE> and <CODE>ymass</CODE> is specified, then <CODE>zmass</CODE>is taken equal to <CODE>ymass</CODE>.<P>The command PRESSURE CLAMP turns on the pressure "clamp".It requires an estimate of the system bulk modules in units of Mbars.An optional value <CODE>cstep</CODE> controls how quickly the box sizefluctuates in response to internal stress.<P>The PRESSURE OFF command switches off both the PRESSURE ANDERSEN andPRESSURE CLAMP algorithms (note that only one algorithm can be used aone time).<P>The PRESSURE EXTERNAL command sets the external pressure of thesystem. The external pressure will have no effect until the PRESSUREANDERSEN or PRESSURE CLAMP algorithms are in use. By default the externalpressure is zero. You can also apply different pressures in the X, Y and Z directions when using PRESSURE CLAMP (you will get an error usingPRESSURE ANDERSEN on your first CMD or QUENCH command). If only one pressure (pressureX) is specified, then all pressures are equal.If two pressures are specified (pressureX pressure Y) then pressureZ isset equal to pressureY. You can specify three pressure to get independentX, Y and Z pressures.<P>The PRESSURE { ISOTROPIC | ORTHORHOMBIC } command controls the symmetryof the repeating box. With PRESSURE ISOTROPIC (the default) the boxcontracts or expands uniformly, so a cubic lattice will remain a cubiclattice, and a tetragonal lattice with maintain its a/c ratio, etc.PRESSURE ORTHORHOMBIC allows the x, y and z directions to change sizeindependently, which can result in an initialize cubic lattice losingits cubic symmetry, and a tetragonal lattice losing its a/c ratio, andeven its a/b ratio.<P><P><DT><B>QUENCH nstep [nquench]</B><DD><P>Similar to the CMD command. Performs CMD for nstep number of steps, butapplies one of two quench algorithms to the resulting velocities, as away to relax atomic configurations. If nquench is 1 (the default), thenwhenever the potential energy rises relative to the preceding time step,all the velocities are set to zero. If nquench is 2, then when anyindividual particle has f.v<0 where f and v are the force and velocityfor that particle, then the velocity for only that particle (not theentire system) is set to zero. This is equivalent to setting velocityto zero whenever the energy of an individual atom increases.<P><P><DT><B>RCV [file [ [run] step]]</B><DD><P>Reads an RCV step. If file is specified then that file is read;otherwise the lines following the RCV command are read. If step isspecified then the data for that step is read; otherwise the first stepin the file is read. If step is not in the file then an error messageis given and the program continues. If run is specified (which impliesthat step is also specified) then only the data that belongs to the runand step are read. If step is specified without run, and two RCV stepshave the same step number, then only the first is read. When both runand step are specified and no matching RCV step is found, then an errormessage is given and the program continues. The RCV command reads inparticle coordinates, as well as a Radial Distribution Function (RDF)table. The RCV file does not store atom types, so the RCV command setsthe atom types all to 1.<P><P><DT><B>READ file</B><DD><P>Opens the file named file and reads the commands as if they were in thecurrent command file. At the end of the file control returns to callingfile.<P><P><DT><B>REFSTEP [CLEAR | COPY | SWAP]</B><DD><P>When used without options the current particles, displacements, typesand RDF are copied to the reference step. The CLEAR option erases allof the information previously stored in the reference step. The SWAPoption switches the reference and current step. The COPY option copiesthe refstep state to the current state, while retaining the contents ofthe reference step.<P><P><DT><B>REMOVE</B><DD><P>Removes the selected particles from the list of current particles andreference particles.<P><DT><B>REPEAT { nrepeat | { COR | RCV } file [ step1 [ step2 ] ] } </B><DD><P><P><P>The first form of this command repeats nrepeat times each commandbetween a REPEAT statement and an END statement, for example<BLOCKQUOTE><CODE><PRE>REPEAT 10 CMD 100 WRITE COR +crack.corEND</PRE></CODE></BLOCKQUOTE><P><P><P>The second form reads a COR or RCV file, and for each step in the fileexecutes the commands between the REPEAT and END statements. Note that
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?