📄 xmd-6.html
字号:
particles are defined or displaced, and whenever repeating boundaryconditions are created using the SURFACE command. Because the repeatingboundary conditions can only be in the form of a rectangular box, theiruse enforces a orthonormal, tetragonal or cubic symmetry depending onthe box symmetry.<P><P><H2><A NAME="ss6.11">6.11 Constraints</A></H2><P>It is possible to apply a variety of constraints to particles using theCONSTRAIN command. The first form of the command restricts particles tomotion along a line, or within a plane. This constraint can be appliedindividually to particles, each particle can have its own line or plane.The second form of the constraint command imposes a spherical wallaround the particles. Any particles which attempt to pass through thewall are reflected back by a harmonic spring. This can be used toimpose a pressure on a simulation - the resulting pressure can bemonitored by using the WRITE or SSAVE commands to display the systemstress. Care must be taken with the choice of spring constant, if thechoice is too large then the motion integration may become unstable. Itis recommended that before doing a production run, the user first do ashort run with no temperature clamp to insure that the total energy isconserved (see discussion of under TIME STEP SIZE, page 3).<P><P><H2><A NAME="implementation-run"></A> <A NAME="ss6.12">6.12 Run Identification</A></H2><P>Typically in research one will conduct a series of runs. To aid in thesubsequent identification of a computer run, the user can assign a runnumber (with the <A HREF="xmd-8.html#command-run">RUN command</A>) that will be stored in the STATE and RCVfiles produced by XMD. Furthermore every step is identified by anumber, starting with 0 for the first step (i.e. the particlecoordinates before the first integration step). In addition to theabove output files, the step is also saved in the ESAVE, BSAVE and SSAVEfiles. Additional identification can be provided by a user specifiedtitle, entered with the TITLE command. The title is composed of 8 ASCIIstrings each up to 80 characters long, it is stored in the STATE, RCV,and COR files and is written out to the plot output. The current valueof the run, step or title can be displayed into the standard output viathe WRITE RUN, WRITE STEP, or WRITE TITLE command.<P><P><H2><A NAME="ss6.13">6.13 RCV File Format</A></H2><P>The RCV file format was originally designed for sending moleculardynamics results (particle coordinates for various time steps) fromremote super computers to local workstations using normal phone lines.Some computers would freely translate non-ASCII characters from onevalue to another, so the RCV file format avoids these characters. Theresulting format uses standard ASCII text for miscellaneous data (i.e.temperature, box size, time step, etc.) but the file format uses a typeof encoding for particle coordinates. Although better schemes could beimplemented today, the RCV format persists because of the many utilityprogram written that require it. The RCV file consists of one or moreequivalent sections, each containing coordinate data and other data fora single simulation step. Besides coordinate data each section containsa 100 point histogram of the coordinate RDF (radial distributionfunction). This was originally included in the RCV file because the RDFwas used regularly and calculating the RDF was too slow on PC classworkstations. The RDF is calculated as the number of atom pairs whoseradii fall between 0 and twice the "unit cell distance". This unit celldistance can be an arbitrary number but is intended to be the unit celllength of a BCC lattice of the same density as the system beingsimulated. The assumption about the identity of the "unit cell length"is important only for some existing RCV analysis programs. The RDFfunction is encoded using the same encoding scheme as the particleencoding.<P><P><H3>Coordinate and RDF Encoding Scheme</H3><P>All the particle coordinates are mapped onto a range of integers from 0to 9999. For dimensions with repeating boundaries the integer 0corresponds to a coordinate of 0, and the integer 9999 corresponds to acoordinate equal to the box size. For dimensions with free surfaces, 0corresponds to the smallest coordinate (which could be less than zero)and 9999 corresponds to the largest. Each resulting integer is coded asa pair of ASCII characters. Each ASCII character serves as a singledigit in a base 100 representation and ranges from 0 to 99. The firstdigit (call it i) is the low order digit, the second (call it j) is thehigh order digit, so that the resulting integer is 100*j+i. The ASCIIcharacters 27 to 126 are mapped into the digits 0 to 99.<P><P>When coding dimensions with free surfaces the box size becomes thedistance between the smallest and greatest coordinate. In addition asecond value is stored in ASCII format: the translation. This number issubtracted from 0 or the box size to obtain the smallest or greatestcoordinate respectively. The x, y and z coordinates of each particleare stored sequentially, up to 13 particles (or 39 coordinates or 78characters) per line. The encoding for the RDF is very similar, themain difference being that (1) only 100 points are encoded (the pointsof the RDF) and (2) the integers 0 to 9999 are mapped onto the intervalfrom 0 to MAXTABLE, where MAXTABLE is the maximum value of the RDF.<P><P><P><H2><A NAME="ss6.14">6.14 COR File Format</A></H2><P>The COR file format is a replacement for the RCV file format. Itsdesign was not restricted by the requirement to send files over normalphone lines. The primary differences between the COR and RCV formatsare<P><UL><LI> the COR file stores the atom types along with the coordinates,</LI><LI> the particle coordinates are stored as two byte integers (i.e.integers between 0 and 65355).</LI><LI> the RDF is not stored in the COR file and</LI><LI> the COR file uses non-ascii characters, consequently it isdifficult (or impossible) to edit with a typical text editor. Otherinformation stored in a COR file</LI><LI> Number of particles,</LI><LI> Boundary conditions,</LI><LI> Run and Step Number,</LI><LI> Title,</LI><LI> Energies - Kinetic, Potential, Total and "Bath".</LI></UL><P><P><P><H2><A NAME="ss6.15">6.15 Atom Plots</A></H2><P>XMD can produce graphical output of the simulation atoms. This is donewith the PLOT commands. With these commands you can<P><UL><LI> assign various symbols, sizes and colors to atoms,</LI><LI> select the orientation of the plot,</LI><LI> set the number of pages,</LI><LI> plot 'tails' (lines which emanate from each atom to show their motion),</LI><LI> plot bonds (lines connecting atoms within a certain distance fromone another),</LI><LI> set the output destination (typically a file or device) andformat (typically Postscript).</LI></UL><P><P><P><H2><A NAME="ss6.16">6.16 REPEAT Command</A></H2><P>Often XMD simulations involve repeating blocks of instructions.To make these easier to handle there is the REPEAT command.The REPEAT command is a simple loop command that looks like this,<BLOCKQUOTE><CODE><PRE>repeat 10 cmd 100 write cor +femelt.corend</PRE></CODE></BLOCKQUOTE>All commands between the REPEAT and the END are repeated 10 times inthis example. You can even have REPEAT commands within other REPEATcommands.<P><P><P><H2><A NAME="implementation-calc"></A> <A NAME="ss6.17">6.17 Built-in Calculator </A></H2><P>A useful feature of XMD is the built-in line calculator. It can be usedin two ways. You can use expressions such as <CODE>sqrt(2)</CODE> in placeof a number for any XMD command. For example, you can have the commmand<BLOCKQUOTE><CODE><PRE>fill cell sqrt(2)/2 0 0 0 sqrt(2)/2 0 0 0 1</PRE></CODE></BLOCKQUOTE>and the value of sqrt(2) will be usedthe <CODE>FILL CELL</CODE> command.Note that you cannot have any spaces in these expressions whenused this way, otherwise the expression will be considered tobe two (or more) separate values.<P>The calculator can also be used to set values. We could havewritten the above command as<BLOCKQUOTE><CODE><PRE>fill cell x=sqrt(2)/2 0 0 0 x 0 0 0 1</PRE></CODE></BLOCKQUOTE>Thisi will set the varible X to sqrt(2)/2 and use this valuefor the first number. Then, it will use this value of X toset the 5'th number on the line.<P>You can also use the command CALC to perform calculations onvariables(see the section on the <A HREF="xmd-8.html#command-calc">CALC command</A>).This is especially useful when used with the REPEATcommand, for example<BLOCKQUOTE><CODE><PRE>calc TEMP=100repeat 5 itemp TEMP cmd 100 write cor +fetest.cor calc TEMP = TEMP + 100end</PRE></CODE></BLOCKQUOTE>Here we are simulating at system at increasing temperatures, startingwith 100 Kelvin and increasing to 500 Kelvin.Note that in the CALC command you do not need to remove spacesas you did in the first two examples. Also, variables arecase insensitive, <CODE>temp</CODE> means the same as <CODE>TEMP</CODE>.Variables set at one place in the program, either by the CALCcommand or within other commands as in the first two examples,are available for the remainder of the program (except for thelimited exception covered in the next paragraph).<P>Some commands offer an additional capability.The commands MOVE, DAMP, EXTFORCE and EXTSPRING interpret thevariables X, Y and Z in a special manner (and as a consequence,if you used variables named X, Y or Z previously, they arenot available for this command). These commands apply changesto each individual atom. You can use the special X, Y and Zvariables to make these changes a function of the atom's position.See the<A HREF="xmd-8.html#command-move">MOVE command</A>for an example.See the MOVE command for an example.<P><P><P><H2><A NAME="implementation-macros"></A> <A NAME="ss6.18">6.18 Macros </A></H2><P>XMD allows the use of "Macros". The first use is toallow options to be set from the command line. For example, if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -