📄 xmd.sgml
字号:
The SELECTION, SET and TAG values are lost whenever a new set ofparticles is read, the commands that do this are PARTICLE, COR, RCVand STATE. Sometimes it is desireable to read in coordinateswith the COR or RCV command but preserve the SELECTION, SET and TAGvalues from a previous set of particles. For instance, in a simulationyou might be curious about the current position of a set of particlewhich started inside a spherical region at step 0. If these particlepositions are storead in a COR file at steps 0 and 2000, youcan do the following, <tscreen><verb>cor input.cor 0select ellipse 5 5 5 2 2 2select keep on cor input.cor 2000write sel particle</verb></tscreen>This reads the particle positions from file input.cor at step 0, and selects those particle within an ellipsoid centered at (5,5,5)with axises of length (2,2,2). Since the axises lengths are equal, this is a sphere. The <em>select keep on</em> commmand says thatSELECT, SET and TAG information will not be forgotten when theCOR command is used. The next command reads the positions atstep 2000, and lastly these positions are written to the output file.<sect1> Neighbor List<p>When calculating the energy and forces over all the atoms, the neighborsfor each atom must be known. This calculation is done separately andstored for future use in a set of arrays called the neighbor list. Thislist is calculated at the beginning of each run, and it includes all theatom pairs that fall within the potential cutoffs plus an extra 10 %.This extra insures that the neighbor list will be valid until the atomsmove enough to warrant a recalculation of the neighbor list. When twoparticles move a total of more than 10 %, then it is time torecalculate.This value of 10 % can be changed by the command NRANGE. It specifiesthe neighbor list cutoff range as a factor of the potential cutoffrange. The default value is 1.1 (which yields a difference of 10 %).<sect1> External Forces<p>The term external force means a force that is applied by an externalagent, in other words a force which is not due to the atoms themselves.For some simulations it is necessary to apply an external force to someor all of the particles. This is sometimes the case in crack simulations.Each atom can experience a unique external force, the only limitationbeing the convenience (or lack) of setting the forces. The commandEXTFORCE assigns a single value of the external force to the selectedparticles.<sect1> Velocity Damping<p>In some simulations it is desirable to dampen the atomic motion, perhapsto absorb lattice vibrations generated by a moving dislocation, forexample. This can be done with the DAMP command. This command assignsa damping term to the selected particles. The force is altered by theaddition of the damping term,<tscreen><verb>-Fdamp * v</verb></tscreen>where Fdamp is the vector force due to the damping term, and v is the vector velocity.<sect1> Temperature Control <label id="implementation-temp"><p>In molecular dynamics it is usually necessary to control the temperatureof the simulation. There are two types of control, temperatureinitialization and temperature maintenance. Typically at the beginningof a simulation the position of every particle is specified but thevelocities are not known, only the desired temperature is known. Thecommand ITEMP will assign random velocities to all the particles withthe appropriate Maxwell-Boltzmann distribution for the specifiedtemperature. The command also has the option of assigning velocities inonly one or two of the three x,y,z directions (leaving the othervelocities unchanged). This can be employed to simulate a two or onedimensional solid, for if the initial coordinates are all confined to aplane or line, and all the velocities normal to the plane or line arezero, then the particles will remained confined to the requiredgeometry. The velocities default to zero at the beginning of a run, andif a run has already been in progress, you can initialize the velocitiesto zero explicitly (using the command ITEMP 0). Temperature maintenanceis used to obtain a simulation at a constant temperature. Often onewill simulate a phenomena which liberates heat, such as a phasetransformation or work done by an external force, or perhaps one willsimulate a system which absorbs heat. In order to maintain anapproximate constant temperature a "temperature clamp" is applied. Thisis an algorithm which scales the instantaneous velocities in order tobring the temperature to its desired value. Scaling is accomplished bymultiplying each particle velocity component by the same factor.Typically you do not want to reach your desired temperature in one step,because the temperature change will be too abrupt. Early simulationsusing just such a scheme produced marked noise in the high frequency endof the phonon spectrum. So instead the velocities are scaled by the33'rd (default value) root of this "one step" factor. This has theapproximate effect of reaching the desired temperature after 33 steps.This number along with the desired temperature is specified by the CLAMPcommand. If no clamp is specified (or if a negative clamp is specified)then no temperature maintenance is done, and a adiabatic simulationresults. Such a simulation is useful for testing the stability of thesimulation (and hence time step size, see the THEORY section above). Ifthe total energy reported by the program for an adiabatic simulation isnot constant, then most likely the time step size is too large. See thesection on TECHNIQUES below for more information on adjusting the timestep size. Note that the temperature can also be affects by theVELOCITY command.<sect1> Quenching <label id="implementation-quench"><p>In some simulations it is desirable to "quench" the atomic motionsduring a dynamics simulation. The purpose of quenching is to rapidlyrelax the system to the current local minimum potential energy.Quenching acts to alter the atomic motion but differs from the algorithmused by the CLAMP command. Whereas CLAMP scales velocities up or downin order to maintain a specific temperature, quenching sets the atomicvelocities to zero whenever certain conditions are met. XMD currentlyimplements two styles of quenching. In the first method, every atoms'velocity is zeroed whenever the total potential energy rises relative tothe preceding time step. In the second method, an individual atom'svelocity is zeroed whenever its energy alone rises relative to thepreceding step. A rise in energy for a particular atom is determined bycalculated for each atom. Whenever this quantity is negative for anatom, its velocity is set to zero. Quenching is controlled with theQUENCH command.<sect1> Fixing Particle Positions for Molecular Dynamics<label id="implementation-fix"><p>For molecular dynamics simulations the box dimensions for a repeatingbox is always fixed, there is currently no provision for dynamicsimulations with a varying box. However individual particles may befixed using the FIX command. For example to study the structure oftransformation interface you may want to hold BCC and FCC structuresfixed at opposite ends of the box (to insure that neither BCC or FCCdisappears entirely from the box) and allow the atoms in between movefreely in order to study the resulting arrangement. The informationabout which particles are fixed are stored in an array of flags, one foreach particle. The command FIX [ON|OFF] will set or unset the flags ofthe currently selected particles. Initially all flags are unset. Theparticles which are fixed are totally equivalent to other particles asfar as the force and energy calculations are concerned, but theirpositions are not updated, and their velocities and higher timederivatives are set to zero. When particles are fixed, they cannotcontribute kinetic energy to the system. However, when the kineticenergy per atom is reported (using the ESAVE or the WRITE EKIN commands)it is normalized by the number of both fixed and free particles.On the other hand, when the temperature is calculated (whose value isreported by the WRITE TEMP command), it is the temperature of the freeparticles only (that is, the total system kinetic energy divided by thenumber of free particles).<sect1> Repeating Boundary Conditions<p>By default repeating boundary conditions are in effect - this can bealtered with the SURFACE command. The purpose of the repeating boundaryis to avoid the free surface inherent in a finite system of particles.In the simulation the repeating boundaries form a rectangular box. Thecoordinates of the box range from 0 to some value specified with the BOXcommand. Repeating boundaries have primarily two effects on asimulation: (1) particles close to opposite walls are considered to beneighbors (and hence interact via the potential) with particles close tofar wall and (2) particles which travel through one wall are translatedby the length of the box so they come back in the opposite wall. Thistranslation is called "wrapping". Wrapping takes place wheneverparticles 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.<sect1> Constraints<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).<sect1> Run Identification<label id="implementation-run"><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 <ref id="command-run" name="RUN command">) 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.<sect1> RCV File Format<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.<sect2> Coordinate and RDF Encoding Scheme<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>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.<sect1> COR File Format<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<itemize><item> the COR file stores the atom types along with the coordinates,<item> the particle coordinates are stored as two byte integers (i.e.integers between 0 and 65355).<item> the RDF is not stored in the COR file and<item> 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<item> Number of particles,<item> Boundary conditions,<item> Run and Step Number,<item> Title,<item> Energies - Kinetic, Potential, Total and "Bath".</itemize><sect1> Atom Plots<p>XMD can produce graphical output of the simulation atoms. This is donewith the PLOT commands. With these commands you can<itemize><item> assign various symbols, sizes and colors to atoms,<item> select the orientation of the plot,<item> set the number of pages,<item> plot 'tails' (lines which emanate from each atom to show their motion),<item> plot bonds (lines connecting atoms within a certain distance fromone another),<item> set the output destination (typically a file or device) andformat (typically Postscript).</itemize><sect1> REPEAT Command<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,<tscreen><verb>repeat 10
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -