relax.xm

来自「一个很好的分子动力学程序」· XM 代码 · 共 65 行

XM
65
字号
########################################################################                                                                     ##  Example:  Relaxing a lattice using CMD and QUENCH commands         ##                                                                     #########################################################################                                                                     ##    This example shows a method for relaxing a lattice to a low      ##  energy state.  This is done by first performing a molecular        ##  dynamics run at a moderate or low temperature (in this case 200K)  ##  followed by a QUENCH command.  The QUENCH command acts like a      ##  normal adiabatic (constant energy, with CLAMP set to -1)           ##  molecular dynamics run only while the potential energy drops.      ##  When the potential energy starts to rise, all the atom velocities  ##  are automatically set to zero.  This removes the momentum that     ##  would have carried the lattice uphill in potential energy,         ##  allowing the lattice to beginning falling downhill again.          ##                                                                     ######################################################################### Relax lattice# Read potential for nialread ../nial.txt# Make repeating box and lattice (in units of a0)box 6 6 6particle 21 0.25 0.25 0.252 0.75 0.75 0.75dup 5   1 0 0dup 5   0 1 0dup 5   0 0 1# Scale up to units of angstroms (2.8712 unit cell)scale 2.8712# Save energies from every dynamics step in file "timestep.e'esave 10 relax.e# Set particle masses (in atomic mass units)select type 1mass 58.71select type 2mass 26.982# Set adiabtic simulation at starting temperature of 200Kclamp -1itemp 200#  This may not be the optimum step sizedtime  1e-15#  Equilibrate at 200K for 500 stepswrite rcv relax.rcvrepeat 5   cmd 100   write rcv +relax.rcvend#  Quench for 500 stepsrepeat 5   quench 100   write rcv +relax.rcvend

⌨️ 快捷键说明

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