关于lammps中的variable的碎碎念
(2018-12-19 18:47:43)分类: lammps学习笔记 |
Note:
(1)“immediate”variables
lammps中,将用圆括号声明的形如$(formula)的变量,称之为“immediate”变量。
(2)“string”
lammps变量定义命令的语法:
variable
很明显,name说的就是变量的“名字”,style后面的一串子就是指“string”,指的是一系列的输入参数。
(3)“value”
The “value” is the numeric quantity resulting from evaluation of the string. Note that the same string can generate different values when it is evaluated at different times during a simulation.
The
Many of the
styles store one or more strings. Note that a single string can
contain spaces (multiple words), if it is enclosed in quotes in the
variable command.
(4)“string”中如果有空格,可以加单引号,双引号,三引号,将该
If you want
text with spaces to be treated as a single argument, it can be
enclosed in either single or double or triple quotes. A long single
argument enclosed in single or double quotes can span multiple
lines if the “&” character is used, as described above. When
the lines are concatenated together (and the “&” characters and
line breaks removed), the text will become a single line. If you
want multiple lines of an argument to retain their line
breaks,
print"Volume = $v”
print'Volume = $v’
if"${steps} > 1000"thenquit
variableastring"red green blue &
print"""
Systemvolume = $v
Systemtemperature = $t
""”
In each case, the single, double, or triple quotes are removed when the single argument they enclose is stored internally.