lammps模拟实例详解

2026/1/16 6:17:58

type/fraction values = type fraction seed type = new atom type fraction = fraction of selected atoms to set to new atom type seed = random # seed (positive integer) mass mass

1 9 第一种原子类型质量为 9 g/mol 2 1 第二种原子类型质量为 1 g/mol

velocity all create 1.44 87287 loop geom

velocity group-ID style args keyword value ...

Set or change the velocities of a group of atoms in one of several styles. For each style, there are required arguments and optional keyword/value parameters. Not all options are used by each style. Each option has a default as listed below. 设定或是改变在一个或是几个类型里一群原子的速度。对于每个类型,都有需要的参数和可选项keyword/value参数。不是所有的可选项都在每一个类型中使用到,每一个可选项有一个默认值。

The create style generates an ensemble of velocities using a random number generator with the specified seed as the specified temperature. Creat类型引发了全体的速度用一个被指定温度指定的种子的随即数发生器。

group-ID = ID of group of atoms whose velocity will be changed create args = temp seed

temp = temperature value (temperature units)

seed = random # seed (positive integer)

loop value = all or local or geom The loop option is used by create in the following ways.

If loop = geom, then each processor loops over only its atoms. For each atom a unique random number seed is created, based on the atom's xyz coordinates. A velocity is generated using that seed. This is a fast loop and the velocity assigned to a particular atom will be the same, independent of how many processors are used.对于每个原子都有基于xyz坐标的独一无二的随机数产生。这是一个快速回路并且分配给特别原子的速度将是一样的,独立于有多少处理器被使用。

Note that the loop geom option will not necessarily assign identical velocities for two simulations run on different machines. This is because the computations based on xyz coordinates are sensitive to tiny differences in the double-precision value for a coordinate as stored on a particular machine.geom 选项将不必要对不同机器上运行的两个模拟分配完全相同的速度。这是因为基于xyz坐标的运算指令对储存在一个特定机器的双精度坐标值的微小变化是敏感的。

If units = box, the velocities and coordinates specified in the velocity command are in the standard units described by the units command (e.g. Angstroms/fmsec for real units). 如果units = box,被velocity command 指定的速度和坐标是被the units command描述的标准单元

# multi neighbor and comm for efficiency

neighbor 1 multi

neighbor skin style

skin = extra distance beyond force cutoff (distance units) style = bin or nsq or multi

This command sets parameters that affect the building of pairwise neighbor lists. All atom pairs within a neighbor cutoff distance equal to the their force cutoff plus the skin distance are stored in the list. Typically, the larger the skin distance, the less often neighbor lists need to be built, but more pairs must be checked for possible force interactions every timestep. The default value for skin depends on the choice of units for the simulation; see the default values below. 这个指令设定影响成对建造的邻域列表的参数。所有截止距离等于它的力的截断距离加上缓冲距离的原子对都被储存在列表里。代表性的是,缓冲距离越大所需要构建的临域列表越小,但是每一步的时候必须检查更多的原子对间可能的相互作用。缓冲距离的默认值依靠模拟单元的选择。

The skin distance is also used to determine how often atoms migrate to new processors if the check option of the neigh_modify command is set to yes. Atoms are migrated (communicated) to new processors on the same timestep that neighbor lists are re-built. 那种距离也被用来定义如果检查neigh_modify command设定的是yes的情况下,原子迁移至新的处理器一次要多长时间。在neighbor 列表被重新构建的同一步里原子迁移到新的处理器内。

The style value selects what algorithm is used to build the list. Style值构建列表的算法。

The multi style is a modified binning algorithm that is useful for systems with a wide range of cutoff distances, e.g. due to different size particles. For the bin style, the bin size is set to 1/2 of the largest cutoff distance between any pair of atom types and a single set of bins is defined to search over for all atom types. This can be inefficient if one pair of types has a very long cutoff, but other type pairs have a much shorter cutoff. For style multithe bin size is set to 1/2 of the shortest cutoff distance and multiple sets of bins are defined to search over for different atom types. This imposes some extra setup overhead, but the searches themselves may be much faster for the short-cutoff cases. multi 风格是一个改良的bining算法,对于有广泛截止距离的系统有很大作用。举例来说由于不同的粒子大小,对于bin风格,bin大小设定为任意两个原子类型之间最大的截止距离1/2,并且bin的基本设置被定义来搜索所有的原子类型。如果子类型有很长的截至距离这可能是低效的,但是其他的类型可能会有断的截至距离。例如对于multithe bin大小被设置成两个原子类型之间最小的截止距离1/2 ,并且bins在multiple中得设置来定义搜索不同的原子类型。这个利用其它的设置控制信息,但是搜索本身对于短截止距离的情况可能是很快的。

neigh_modify delay 0

neigh_modify keyword values delay value = N

N = delay building until this many steps since last build

自上次构建neighbor列表之后无延迟

communicate multi

communicate style keyword value style = single or multi

This command sets the style of inter-processor communication that occurs each timestep as atom coordinates and other properties are exchanged between neighboring processors and stored as properties of ghost atoms. 这条指令设置在在每一步中发生的处理器之间的交流方式,就想原子坐标和其他的属性在相近的处理器之间交换并且作为ghost原子储存。

For many systems this is an efficient algorithm, but for systems with widely varying cutoffs for different type pairs, the multi style can be faster. In this case, each atom type is assigned its own distance cutoff for communication purposes, and fewer atoms will be communicated. 对于很多的系统这会是有效的算法。但是对于有着广泛截止距离的不同类型的原子对,multi格式会更快一些,既然这样,每一个类型的原子为了交流(信息)被分配自己的截至距离,很少的原子会被联系。

# colloid potential pair_style colloid 12.5

pair_style style args

style = one of the styles from the list below args = arguments used by a particular style

Set the formula(s) LAMMPS uses to compute pairwise interactions. In LAMMPS, pair potentials are defined between pairs of atoms that are within a cutoff distance and the set of active interactions typically changes over time. See the bond_style command to define potentials between pairs of bonded atoms, which typically remain in place for the duration of a simulation. 设置lammps实用的公式来计算成对发生的相互作用力。在lammps中电位对。被定义在两个在截止距离内的原子之间,有活性的相互作用的设置随时间典型变化。

In LAMMPS, pairwise force fields encompass a variety of interactions, some of which include many-body effects, e.g. EAM, Stillinger-Weber, Tersoff, REBO potentials. They are still classified as \atoms changes with time (unlike molecular bonds) and thus a neighbor list is used to find nearby interacting atoms. 在lammps中承兑发生的力场包括大量的相互作用,有些包括多体作用。这些依然被分类为 \因为原子相互作用的设置随时间变化并且因此neighbor列表被用来发现在相互作用附近的原子。

pair_style colloid - integrated(完全的) colloidal(胶体) potential pair_style colloid cutoff

cutoff = global cutoff for colloidal interactions (distance units) 对于胶体的相互作用球形的截至距离。

pair_coeff 1 1 1.0 1.0 5.0 5.0 12.5

pair_coeff 1 2 5.0 1.0 5.0 0.0 7.0 pair_coeff 2 2 10.0 1.0 0.0 0.0 2.5

pair_coeff I J args

I,J = atom types (see asterisk form below)

args = coefficients for one or more pairs of atom types

Specify the pairwise force field coefficients for one or more pairs of atom types. The number and meaning of the coefficients depends on the pair style. Pair coefficients can also be set in the data file read by the read_data command or in a restart file. 为一个或更多原子类型制定成对的力场系数。系数的数量和意义取决于pair style 。每一个系数也可以在数据文件中被设定。在read data 指令或是在一个重启文件。

I and J can be specified in one of two ways. Explicit numeric values can be used for each, as in the 1st example above. I <= J is required. LAMMPS sets the coefficients for the symmetric J,I interaction to the same values. I和J可以被定义在通过两种方式。明确的数值可以被用于每个, I <= J 是必须的。Lammps设置对称的i,j相互作用系数是一样的。

The following coefficients must be defined for each pair of atoms types via the pair_coeff command 紧跟的系数一定通过 pair_coeff command 被确定为每一个原子对类型

A (energy units) sigma (distance units) d1 (distance units) d2 (distance units) cutoff (distance units)

A is the Hamaker energy prefactor A是Hamaker能量速率

Sigma is the size of the solvent particle or the constituent particles integrated over in the colloidal particle sigma是溶剂粒子的大小或是胶体粒子的整体的粒子构成。fix

1 all npt temp 2.0 2.0 1.0 iso 0.0 1.0 10.0 drag 1.0 &

mtk no pchain 0 tchain 1 2 all enforce2d

fix

fix ID group-ID style args

ID = user-assigned name for the fix

group-ID = ID of the group of atoms to apply the fix to

style = one of a long list of possible style names (see below) args = arguments used by a particular style Set a fix that will be applied to a group of atoms. In LAMMPS, a \is any operation that is applied to the system during timestepping or minimization.设置一个fix会应用为一个原子群里。在lammps里面一个\是一个任意的操作在整个时间步伐里应用于系统中。


lammps模拟实例详解.doc 将本文的Word文档下载到电脑
搜索更多关于: lammps模拟实例详解 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219