merged in current master
This commit is contained in:
57
doc/utils/sphinx-config/LAMMPSLexer.py
Normal file
57
doc/utils/sphinx-config/LAMMPSLexer.py
Normal file
@ -0,0 +1,57 @@
|
||||
from pygments.lexer import RegexLexer, words
|
||||
from pygments.token import *
|
||||
|
||||
LAMMPS_COMMANDS = ("angle_coeff", "angle_style", "atom_modify", "atom_style",
|
||||
"balance", "bond_coeff", "bond_style", "bond_write", "boundary", "box",
|
||||
"change_box", "clear", "comm_modify", "comm_style", "compute",
|
||||
"compute_modify", "create_atoms", "create_bonds", "create_box", "delete_atoms",
|
||||
"delete_bonds", "dielectric", "dihedral_coeff", "dihedral_style", "dimension",
|
||||
"displace_atoms", "dump", "dump_modify", "dynamical_matrix", "echo", "fix",
|
||||
"fix_modify", "group", "group2ndx", "hyper", "if", "improper_coeff",
|
||||
"improper_style", "include", "info", "jump", "kim_init", "kim_interactions",
|
||||
"kim_param", "kim_query", "kspace_modify", "kspace_style", "label", "lattice",
|
||||
"log", "mass", "message", "minimize", "min_modify", "min_style", "molecule",
|
||||
"ndx2group", "neb", "neb/spin", "neighbor", "neigh_modify", "newton", "next",
|
||||
"package", "pair_coeff", "pair_modify", "pair_style", "pair_write",
|
||||
"partition", "prd", "print", "processors", "python", "quit", "read_data",
|
||||
"read_dump", "read_restart", "region", "replicate", "rerun", "reset_ids",
|
||||
"reset_timestep", "restart", "run", "run_style", "server", "set", "shell",
|
||||
"special_bonds", "suffix", "tad", "temper", "temper/grem", "temper/npt",
|
||||
"thermo", "thermo_modify", "thermo_style", "then", "third_order", "timer", "timestep",
|
||||
"uncompute", "undump", "unfix", "units", "variable", "velocity", "write_coeff",
|
||||
"write_data", "write_dump", "write_restart")
|
||||
|
||||
class LAMMPSLexer(RegexLexer):
|
||||
name = 'LAMMPS'
|
||||
tokens = {
|
||||
'root': [
|
||||
(words(LAMMPS_COMMANDS, suffix=r'\b', prefix=r'^'), Keyword),
|
||||
(r'#.*?\n', Comment),
|
||||
('"', String, 'string'),
|
||||
('\'', String, 'single_quote_string'),
|
||||
(r'[0-9]+(\.[0-9]+)?([eE]\-?[0-9]+)?', Number),
|
||||
('\$?\(', Name.Variable, 'expression'),
|
||||
('\$\{', Name.Variable, 'variable'),
|
||||
(r'[\w_\.\[\]]+', Name),
|
||||
(r'\$[\w_]+', Name.Variable),
|
||||
(r'\s+', Whitespace),
|
||||
(r'[\+\-\*\/&=<>]', Operator),
|
||||
],
|
||||
'variable' : [
|
||||
('[^\}]+', Name.Variable),
|
||||
('\}', Name.Variable, '#pop'),
|
||||
],
|
||||
'string' : [
|
||||
('[^"]+', String),
|
||||
('"', String, '#pop'),
|
||||
],
|
||||
'single_quote_string' : [
|
||||
('[^\']+', String),
|
||||
('\'', String, '#pop'),
|
||||
],
|
||||
'expression' : [
|
||||
('[^\(\)]+', Name.Variable),
|
||||
('\(', Name.Variable, 'expression'),
|
||||
('\)', Name.Variable, '#pop'),
|
||||
]
|
||||
}
|
||||
@ -20,6 +20,7 @@ import os
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '../../src/_ext'))
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
@ -31,6 +32,9 @@ import os
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.imgmath',
|
||||
'sphinx.ext.autodoc',
|
||||
'table_from_list',
|
||||
]
|
||||
# 2017-12-07: commented out, since this package is broken with Sphinx 16.x
|
||||
# yet we can no longer use Sphinx 15.x, since that breaks with
|
||||
@ -201,6 +205,11 @@ htmlhelp_basename = 'LAMMPSdoc'
|
||||
|
||||
html_add_permalinks = ''
|
||||
|
||||
if 'epub' in sys.argv:
|
||||
html_math_renderer = 'imgmath'
|
||||
else:
|
||||
html_math_renderer = 'mathjax'
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
@ -312,3 +321,11 @@ if spelling_spec:
|
||||
|
||||
spelling_lang='en_US'
|
||||
spelling_word_list_filename='false_positives.txt'
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '.'))
|
||||
import LAMMPSLexer
|
||||
from sphinx.highlighting import lexers
|
||||
|
||||
lexers['LAMMPS'] = LAMMPSLexer.LAMMPSLexer(startinline=True)
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '../../../python'))
|
||||
|
||||
@ -71,6 +71,7 @@ AlO
|
||||
Alonso
|
||||
amap
|
||||
Amatrix
|
||||
AMD
|
||||
amino
|
||||
Amirjalayer
|
||||
Amit
|
||||
@ -108,6 +109,7 @@ Archlinux
|
||||
arcsin
|
||||
arg
|
||||
args
|
||||
arrhenius
|
||||
Arun
|
||||
arXiv
|
||||
asin
|
||||
@ -162,6 +164,7 @@ azimuthal
|
||||
Azuri
|
||||
ba
|
||||
Babadi
|
||||
Babaei
|
||||
backcolor
|
||||
Baczewski
|
||||
Bagi
|
||||
@ -210,6 +213,7 @@ Berne
|
||||
Bertotti
|
||||
Bessarab
|
||||
Beutler
|
||||
Bext
|
||||
bgq
|
||||
Bh
|
||||
Biersack
|
||||
@ -275,10 +279,12 @@ Broadwell
|
||||
Broglie
|
||||
brownian
|
||||
brownw
|
||||
Broyden
|
||||
Bryantsev
|
||||
Btarget
|
||||
btype
|
||||
buckPlusAttr
|
||||
builtin
|
||||
Bulatov
|
||||
Bureekaew
|
||||
burlywood
|
||||
@ -305,6 +311,7 @@ Cavium
|
||||
Cawkwell
|
||||
cbecker
|
||||
ccache
|
||||
ccachepiecewise
|
||||
ccmake
|
||||
ccNspecies
|
||||
CCu
|
||||
@ -408,6 +415,8 @@ computable
|
||||
compute
|
||||
concat
|
||||
cond
|
||||
conda
|
||||
Conda
|
||||
Condens
|
||||
conf
|
||||
config
|
||||
@ -516,6 +525,7 @@ Dasgupta
|
||||
dashpot
|
||||
dat
|
||||
datafile
|
||||
datatype
|
||||
datums
|
||||
Davidchack
|
||||
Daw
|
||||
@ -622,6 +632,7 @@ Doye
|
||||
dpd
|
||||
DPD
|
||||
dpdTheta
|
||||
dphi
|
||||
DPhil
|
||||
dr
|
||||
dR
|
||||
@ -705,6 +716,7 @@ Eike
|
||||
eim
|
||||
eimp
|
||||
Eindhoven
|
||||
Eisenforschung
|
||||
Ejtehadi
|
||||
El
|
||||
elaplong
|
||||
@ -778,6 +790,7 @@ erotate
|
||||
Ertas
|
||||
ervel
|
||||
Espanol
|
||||
eskm
|
||||
esu
|
||||
esub
|
||||
esw
|
||||
@ -922,6 +935,7 @@ funcs
|
||||
functionalities
|
||||
functionals
|
||||
funroll
|
||||
fuer
|
||||
fx
|
||||
fy
|
||||
fz
|
||||
@ -986,6 +1000,7 @@ gmask
|
||||
Gmask
|
||||
gneb
|
||||
GNEB
|
||||
Goldfarb
|
||||
googlemail
|
||||
Gordan
|
||||
GPa
|
||||
@ -1028,6 +1043,7 @@ Gunsteren
|
||||
Gunzenmuller
|
||||
Guo
|
||||
gw
|
||||
gyromagnetic
|
||||
gz
|
||||
gzipped
|
||||
Haak
|
||||
@ -1047,6 +1063,7 @@ Haswell
|
||||
Haugk
|
||||
Hayoun
|
||||
Hayre
|
||||
hbar
|
||||
hbcut
|
||||
hbn
|
||||
hbnewflag
|
||||
@ -1166,6 +1183,7 @@ initio
|
||||
initializations
|
||||
InP
|
||||
inregion
|
||||
Institut
|
||||
integrators
|
||||
Integrators
|
||||
intel
|
||||
@ -1242,6 +1260,7 @@ Jacobsen
|
||||
jagreat
|
||||
Jalalvand
|
||||
james
|
||||
Janssen
|
||||
Janssens
|
||||
Jaramillo
|
||||
Jarzynski
|
||||
@ -1325,6 +1344,7 @@ Khersonskii
|
||||
Khrapak
|
||||
Khvostov
|
||||
Ki
|
||||
Kikugawa
|
||||
kim
|
||||
kJ
|
||||
kk
|
||||
@ -1386,6 +1406,7 @@ Lammps
|
||||
LAMMPS
|
||||
lammpsplot
|
||||
Lamoureux
|
||||
Lande
|
||||
Landron
|
||||
langevin
|
||||
Langevin
|
||||
@ -1403,6 +1424,7 @@ Laupretre
|
||||
lavenderblush
|
||||
lawngreen
|
||||
lB
|
||||
lbfgs
|
||||
lbl
|
||||
LBtype
|
||||
lcbop
|
||||
@ -1503,6 +1525,7 @@ logfreq
|
||||
logicals
|
||||
Lomdahl
|
||||
Lond
|
||||
lookup
|
||||
lookups
|
||||
Lookups
|
||||
LoopVar
|
||||
@ -1532,6 +1555,7 @@ Mackay
|
||||
Mackrodt
|
||||
Macromolecules
|
||||
macroparticle
|
||||
macOS
|
||||
Madura
|
||||
Magda
|
||||
Magdeburg
|
||||
@ -1576,6 +1600,8 @@ Materias
|
||||
mathbf
|
||||
matlab
|
||||
matplotlib
|
||||
Matsubara
|
||||
Mattice
|
||||
Mattox
|
||||
Mattson
|
||||
maxangle
|
||||
@ -1753,6 +1779,7 @@ mtk
|
||||
Mtotal
|
||||
muB
|
||||
Muccioli
|
||||
mui
|
||||
Mukherjee
|
||||
Mulders
|
||||
multi
|
||||
@ -1998,6 +2025,7 @@ Nz
|
||||
ocl
|
||||
octahedral
|
||||
octants
|
||||
Ohara
|
||||
ohenrich
|
||||
ok
|
||||
Okabe
|
||||
@ -2028,6 +2056,7 @@ openmp
|
||||
openmpi
|
||||
opls
|
||||
Oppelstrup
|
||||
optimizations
|
||||
orangered
|
||||
organometallic
|
||||
orientational
|
||||
@ -2039,6 +2068,7 @@ Orsi
|
||||
ortho
|
||||
orthonormal
|
||||
orthorhombic
|
||||
oso
|
||||
ot
|
||||
Otype
|
||||
Ouldridge
|
||||
@ -2049,7 +2079,9 @@ Ouyang
|
||||
overlayed
|
||||
Ovito
|
||||
oxdna
|
||||
oxrna
|
||||
oxDNA
|
||||
oxRNA
|
||||
padua
|
||||
Padua
|
||||
palegoldenrod
|
||||
@ -2123,6 +2155,7 @@ ph
|
||||
Phillpot
|
||||
phiphi
|
||||
phonon
|
||||
phonons
|
||||
phophorous
|
||||
phosphide
|
||||
Phs
|
||||
@ -2136,6 +2169,7 @@ picograms
|
||||
picosecond
|
||||
picoseconds
|
||||
pid
|
||||
piecewise
|
||||
Pieniazek
|
||||
Pieter
|
||||
pimd
|
||||
@ -2269,6 +2303,7 @@ qoffload
|
||||
qopenmp
|
||||
qoverride
|
||||
qtb
|
||||
quadratically
|
||||
quadrupolar
|
||||
Quant
|
||||
quartic
|
||||
@ -2418,6 +2453,7 @@ Rodrigues
|
||||
Rohart
|
||||
Ronchetti
|
||||
Rosati
|
||||
Rosenberger
|
||||
Rossky
|
||||
rosybrown
|
||||
rotationally
|
||||
@ -2478,10 +2514,12 @@ Schulten
|
||||
Schunk
|
||||
Schuring
|
||||
Schwen
|
||||
screenshots
|
||||
Scripta
|
||||
sdk
|
||||
sdpd
|
||||
SDPD
|
||||
se
|
||||
seagreen
|
||||
Secor
|
||||
sectoring
|
||||
@ -2508,6 +2546,7 @@ setvel
|
||||
sfftw
|
||||
Sg
|
||||
Shan
|
||||
Shanno
|
||||
shapex
|
||||
shapey
|
||||
shapez
|
||||
@ -2575,6 +2614,7 @@ Snodin
|
||||
Sodani
|
||||
Soderlind
|
||||
solvated
|
||||
solvation
|
||||
Sorensen
|
||||
soundspeed
|
||||
Souza
|
||||
@ -2659,6 +2699,7 @@ Sunderland
|
||||
superset
|
||||
supersphere
|
||||
Supinski
|
||||
Surblys
|
||||
surfactants
|
||||
Suter
|
||||
Sutmann
|
||||
@ -2935,6 +2976,7 @@ vectorial
|
||||
vectorization
|
||||
Vectorization
|
||||
vectorized
|
||||
Vegt
|
||||
vel
|
||||
Verlag
|
||||
verlet
|
||||
@ -3134,3 +3176,4 @@ zx
|
||||
zy
|
||||
Zybin
|
||||
zz
|
||||
Zm
|
||||
|
||||
Reference in New Issue
Block a user