⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stress.xmo

📁 一个很好的分子动力学程序
💻 XMO
字号:
XMD (Version 2.5.29 Nov 27 2000)Not using pthread library.Not using asm("finit"); patch in thread routines.########################################################################                                                                     ##  Example:  Calculate the internal stress                            ##               Use this to find lattice parameter at a finite        ##               temperature.                                          ##                                                                     ##   NOTE:  This method is obsolete.  Instead, see xmd documentaiton   ##          about the PRESSURE CLAMP command. (JR 30 Jun 1999).        ##                                                                     #########################################################################                                                                     ##    In order to do simulations at a finite temperature, one needs    ##  to know what the lattice parameters are at that temperature.  (At  ##  this point, we are including all lattice, such as tetragonal and   ##  monoclinic, which can have up to 6 lattice parameters.  Later on   ##  we will restrict the discussion to cubic lattice, which have only  ##  one lattice parameter).  This can be done by plotting the time     ##  averaged internal stress of a lattice versus the lattice           ##  parameters.  From this plot one can interpolate the value of the   ##  lattice parameter that gives zero stress.                          ##                                                                     ##    Here we show how to calculate the internal stress for at         ##  lattice at a finite temperature and for one value of the lattice   ##  parameter.  This example uses a cubic NiAl lattice, so there is    ##  only one lattice parameter, which we choose to be 2.9 angstroms.   ##  We run this simulation with a CLAMP value of 300K.  The stress     ##  values are calculated and written to a file using the SSAVE        ##  command, which is analogous to the ESAVE command.  The command     ##                                                                     ##                      SSAVE 1 stress.str                             ##                                                                     ##    saves the stresses in a text file called <stress.str>.  The      ##  first column of this file holds the step number, the next six      ##  columns holds the Voight stresses, s1 through s6.                  ##                                                                     ##    After the run, each column of stress values should be plotted    ##  versus time step.  During the early time steps the stresses will   ##  be equilibrating.  After this initial period the stresses should   ##  settle into a period of steady fluctuation.  The time averages of  ##  the stresses after the initial period should be calculated.        ##  These average stresses can now be plotted on a different graph as  ##  a function of lattice constant.                                    ##                                                                     ##    With a cubic lattice, as we have in our example, symmetry        ##  dictates that on average, s1, s2 and s3 will be equal and s4, s5   ##  and s6 will be zero.  Thus instead of plotting 6 stress in our     ##  second graph, we need only plot one, the average of s1, s2 and     ##  s3.  The other three can be taken to be zero.                      ##                                                                     ##    We then repeat the process for another value of the lattice      ##  parameters, producing a stress versus time step plot from each     ##  run, which in turn produces new points to add to the second plot,  ##  the average stress versus lattice parameter.                       ##                                                                     ######################################################################### Set cubic lattice parametercalc A0 = 2.9# Read potential for nialread ../nial.txt# Make room for all particlesallocate 500 15000WARNING:  Allocate command is now obsolete.# Make repeating box and lattice (in units of a0)box 6 6 6particle 2dup 5   1 0 0dup 5   0 1 0dup 5   0 0 1# Scale up to units of angstroms (2.8712 unit cell)scale A0# Save stresses from every dynamics step in file "stress.str"ssave 1 stress.str# Set particle masses (in atomic mass units)select type 1***  NUMBER SELECTED 216mass 58.71select type 2***  NUMBER SELECTED 216mass 26.982dtime 3.5e-15# Set adiabtic simulation at starting temperature of 200Kclamp 300itemp 300# Perform dynamicscmd   100***   Current step is 100TIME INFORMATION   Ending   Time: 03/19/2001   13:41:09   Elapsed  Time: 0 min 06 secDYNAMICS STATISTICS   Number of MD Steps:                 100   Number of Neighbor Searchs:           8   Time spent on MD steps:               5 (secs)   Time spent on Neighbor Search:        0 (secs)ERROR STATISTICS   Number of Fatal Errors:               0   Number of Unknown Command Errors:     0   Number of Misc. Warnings:             1   <=======  !!!

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -