LAMMPS—units命令解析

41 篇文章 15 订阅
25 篇文章 0 订阅

文章来源:“分子动力学”公众号

链接:https://mp.weixin.qq.com/s/4BIOPWJw-pCjCw_v9GGqDA

units命令用来定义模拟过程中使用的单位类型,它决定了所有输入脚本、数据文件和所有输出到屏幕、日志文件以及dump文件中物理量的单位。

使用语法

units style
style可取:lj/real/metal/si/cgs/electron

使用举例

units metal
units lj

使用介绍

该命令用来设置模拟中使用的单位类型。它决定了所有输入脚本、数据文件和所有输出到屏幕、日志文件以及dump文件中物理量的单位。一般来说,该命令用在输入脚本最开始的位置。

除了lj类型之外,其他所有的单位类型所用到的物理常量都来自网站:http://www.physics.nist.gov。real类型中Kcal的定义,LAMMPS使用热力学卡=4.184J。

LJ类型

对于lj类型,所有的物理量都是没有单位的。不失一般性,LAMMPS将基本量mass、sigma、epsilon和波尔兹曼常数设为1。你所指定的质量、距离、能量就是这些基本量的倍数。下面给出了无单位量(用*标出)与有单位量之间的换算关系。基于此,你可以将lj模拟无单位量转换为正常的物理量。

mass = mass or m
distance = sigma, where x* = x / sigma
time = tau, where tau = t* = t (epsilon / m / sigma2)1/2
energy = epsilon, where E* = E / epsilon
velocity = sigma/tau, where v* = v tau / sigma
force = epsilon/sigma, where f* = f sigma / epsilon
torque = epsilon, where t* = t / epsilon
temperature = reduced LJ temperature, where T* = T Kb / epsilon
pressure = reduced LJ pressure, where P* = P sigma^3 / epsilon
dynamic viscosity = reduced LJ viscosity, where eta* = eta sigma^3 / epsilon / tau
charge = reduced LJ charge, where q* = q / (4 pi perm0 sigma epsilon)^1/2
dipole = reduced LJ dipole, moment where mu = mu / (4 pi perm0 sigma^3 epsilon)^1/2
electric field = force/charge, where E
= E (4 pi perm0 sigma epsilon)^1/2 sigma / epsilon
density = mass/volume, where rho* = rho sigma^dim
需要注意的是,lj单位类型下,通过命令thermo_style设置的热力学信息的输出是将能量对原子数量进行了归一化,即能量/原子。这可以通过命令thermo_modify norm进行修改。

real类型

mass = grams/mole
distance = Angstroms
time = femtoseconds
energy = Kcal/mole
velocity = Angstroms/femtosecond
force = Kcal/mole-Angstrom
torque = Kcal/mole
temperature = Kelvin
pressure = atmospheres
dynamic viscosity = Poise
charge = multiple of electron charge (+1.0 is a proton)
dipole = charge*Angstroms
electric field = volts/Angstrom
density = gram/cm^dim

metal类型

mass = grams/mole
distance = Angstroms
time = picoseconds
energy = eV
velocity = Angstroms/picosecond
force = eV/Angstrom
torque = eV
temperature = Kelvin
pressure = bars
dynamic viscosity = Poise
charge = multiple of electron charge (+1.0 is a proton)
dipole = charge*Angstroms
electric field = volts/Angstrom
density = gram/cm^dim

si类型

mass = kilograms
distance = meters
time = seconds
energy = Joules
velocity = meters/second
force = Newtons
torque = Newton-meters
temperature = Kelvin
pressure = Pascals
dynamic viscosity = Pascalsecond
charge = Coulombs
dipole = Coulombs
meters
electric field = volts/meter
density = kilograms/meter^dim

cgs类型

mass = grams
distance = centimeters
time = seconds
energy = ergs
velocity = centimeters/second
force = dynes
torque = dyne-centimeters
temperature = Kelvin
pressure = dyne/cm^2 or barye = 1.0e-6 bars
dynamic viscosity = Poise
charge = statcoulombs or esu
dipole = statcoul-cm = 10^18 debye
electric field = statvolt/cm or dyne/esu
density = grams/cm^dim

electron类型

mass = atomic mass units
distance = Bohr
time = femtoseconds
energy = Hartrees
velocity = Bohr/atomic time units [1.03275e-15 seconds]
force = Hartrees/Bohr
temperature = Kelvin
pressure = Pascals
charge = multiple of electron charge (+1.0 is a proton)
dipole moment = Debye
electric field = volts/cm

不同的单位类型,也设置了默认的时间步和领域表层距离,如下:

For style lj these are dt = 0.005 tau and skin = 0.3 sigma.
For style real these are dt = 1.0 fmsec and skin = 2.0 Angstroms.
For style metal these are dt = 0.001 psec and skin = 2.0 Angstroms.
For style si these are dt = 1.0e-8 sec and skin = 0.001 meters.
For style cgs these are dt = 1.0e-8 sec and skin = 0.1 cm.
For style electron these are dt = 0.001 fmsec and skin = 2.0 Bohr.

使用限制
该命令不能在模拟盒子被定义(使用命令read_data或create_box)之后使用。

默认设置
units lj

  • 2
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值