Fix unhandled cases in docs LAMMPS syntax highlighting
This commit is contained in:
@ -48,8 +48,8 @@ Examples
|
||||
fix 1 ellipsoid rigid/meso single
|
||||
fix 1 rods rigid/meso molecule
|
||||
fix 1 spheres rigid/meso single force 1 off off on
|
||||
fix 1 particles rigid/meso molecule force 1\*5 off off off force 6\*10 off off on
|
||||
fix 2 spheres rigid/meso group 3 sphere1 sphere2 sphere3 torque \* off off off
|
||||
fix 1 particles rigid/meso molecule force 1*5 off off off force 6*10 off off on
|
||||
fix 2 spheres rigid/meso group 3 sphere1 sphere2 sphere3 torque * off off off
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
@ -120,12 +120,12 @@ specified atom types, atom IDs, or molecule IDs into the group. These
|
||||
The first format is a list of values (types or IDs). For example, the
|
||||
second command in the examples above puts all atoms of type 3 or 4 into
|
||||
the group named *water*\ . Each entry in the list can be a
|
||||
colon-separated sequence A:B or A:B:C, as in two of the examples
|
||||
colon-separated sequence ``A:B`` or ``A:B:C``, as in two of the examples
|
||||
above. A "sequence" generates a sequence of values (types or IDs),
|
||||
with an optional increment. The first example with 500:1000 has the
|
||||
with an optional increment. The first example with ``500:1000`` has the
|
||||
default increment of 1 and would add all atom IDs from 500 to 1000
|
||||
(inclusive) to the group sub, along with 10,25,50 since they also
|
||||
appear in the list of values. The second example with 100:10000:10
|
||||
appear in the list of values. The second example with ``100:10000:10``
|
||||
uses an increment of 10 and would thus would add atoms IDs
|
||||
100,110,120, ... 9990,10000 to the group sub.
|
||||
|
||||
@ -269,7 +269,7 @@ group and running further.
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable nsteps equal 5000
|
||||
variable rad equal 18-(step/v_nsteps)\*(18-5)
|
||||
variable rad equal 18-(step/v_nsteps)*(18-5)
|
||||
region ss sphere 20 20 0 v_rad
|
||||
group mobile dynamic all region ss
|
||||
fix 1 mobile nve
|
||||
|
||||
@ -1205,7 +1205,7 @@ coordinates of atoms in the unit cell of the cubic crystal. In the case of,
|
||||
e.g. a conventional fcc unit cell, the "source-value" key in the map associated
|
||||
with this key should be assigned the following value:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
.. code-block:: text
|
||||
|
||||
[[0.0, 0.0, 0.0],
|
||||
[0.5, 0.5, 0.0],
|
||||
|
||||
@ -40,7 +40,7 @@ class LAMMPSLexer(RegexLexer):
|
||||
(r'compute\s+', Keyword, 'compute'),
|
||||
(r'dump\s+', Keyword, 'dump'),
|
||||
(r'region\s+', Keyword, 'region'),
|
||||
(r'variable\s+', Keyword, 'variable'),
|
||||
(r'^\s*variable\s+', Keyword, 'variable_cmd'),
|
||||
(r'group\s+', Keyword, 'group'),
|
||||
(r'change_box\s+', Keyword, 'change_box'),
|
||||
(r'uncompute\s+', Keyword, 'uncompute'),
|
||||
@ -51,6 +51,7 @@ class LAMMPSLexer(RegexLexer):
|
||||
(r'#.*?\n', Comment),
|
||||
('"', String, 'string'),
|
||||
('\'', String, 'single_quote_string'),
|
||||
(r'[0-9]+:[0-9]+(:[0-9]+)?', Number),
|
||||
(r'[0-9]+(\.[0-9]+)?([eE]\-?[0-9]+)?', Number),
|
||||
('\$?\(', Name.Variable, 'expression'),
|
||||
('\$\{', Name.Variable, 'variable'),
|
||||
@ -58,6 +59,7 @@ class LAMMPSLexer(RegexLexer):
|
||||
(r'\$[\w_]+', Name.Variable),
|
||||
(r'\s+', Whitespace),
|
||||
(r'[\+\-\*\^\|\/\!%&=<>]', Operator),
|
||||
(r'[\~\.\w_:,@\-\/\\0-9]+', Text),
|
||||
],
|
||||
'keywords' : [
|
||||
(words(LAMMPS_COMMANDS, suffix=r'\b', prefix=r'^'), Keyword)
|
||||
@ -99,7 +101,7 @@ class LAMMPSLexer(RegexLexer):
|
||||
(r'[\w_\-\.\[\]]+', Name.Variable.Identifier),
|
||||
default('#pop')
|
||||
],
|
||||
'variable' : [
|
||||
'variable_cmd' : [
|
||||
(r'[\w_\-\.\[\]]+', Name.Variable.Identifier),
|
||||
default('#pop')
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user