-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglossary.py
129 lines (86 loc) · 2.6 KB
/
glossary.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
glossary = '''
\\section*{List of Abbreviations}
\\addcontentsline{toc}{section}{\\protect\\numberline{}List of Abbreviations}%
'''
def parse(x):
data = x.split('=')
return '\\textbf{%s} & %s\\\\'%(data[0],data[1])
#'\\item [] \\textbf{%s} - %s'%(data[0],data[1])
# Atmos
datastr ='''
HOx = OH + \\ce{HO2}
NOx = NO + NO2
NOy = $\\Sigma$ oxidized atmospheric odd-nitrogen species
NOz = NOy - NOx
pp\\{m,b,t\\}v = parts per \\{million, billion, trillion\\} by volume
PAN = PeroxyAcyl Nitrate
'''
atmos = '''
\\subsection*{Atmosphere}
\\begin{center}
\\begin{tabular}{ p{.18\\textwidth}p{.65\\textwidth} }
%s
\\end{tabular}
\\end{center}
'''%'\n'.join(list(map(parse,sorted(datastr.split('\n')[1:-1]))))
# Modelling
datastr ='''
ROPA = Rate of Production (and Loss) Analysis
TUV = Tropospheric, Ultraviolet and Visible Radiation Model
KPP = Kinetic Pre Processor
GEOSChem = Chemistry component of NASA's Goddard Earth Observing System
DSMACC = Dynamically Simple Model of Atmospheric Chemical Complexity
'''
modelling = '''
\\subsection*{Modelling}
\\begin{center}
\\begin{tabular}{ p{.18\\textwidth}p{.65\\textwidth} }
%s
\\end{tabular}
\\end{center}
'''%'\n'.join(list(map(parse,sorted(datastr.split('\n')[1:-1]))))
# Mechanisms
datastr ='''
SMILES = Simplified Molecular-Input Line-Entry System
IUPAC = International Union of Pure and Applied Chemistry
INCHI = International Chemical Identifier (developed by IUPAC)
MACCS = Molecular ACCess System
MCM = Master Chemical Mechanism
CRI = Common Representative Intermediates
MQN = Molecular Quantum Number
SMARTS = SMILES arbitrary target specification
'''
mech = '''
\\subsection*{Artificial Intelligence}
\\begin{center}
\\begin{tabular}{ p{.18\\textwidth}p{.65\\textwidth} }
%s
\\end{tabular}
\\end{center}
'''%'\n'.join(list(map(parse,sorted(datastr.split('\n')[1:-1]))))
# Machine Learning
datastr ='''
DR = Dimensionality Reduction
AE = Auto Encoder
t-SNE = t-distributed Stochastic Neighbor Embedding
OPTICS = Ordering Points To Identify the Clustering Structure
DBSCAN = Density-Based Spatial Clustering of Applications with Noise
GNN = Graph Neural Network
GMM = Gaussian Mixture Model
ML = Machine Learning
PCA = Principle Component Analysis
'''
ml = '''
\\subsection*{Artificial Intelligence}
\\begin{center}
\\begin{tabular}{ p{.18\\textwidth}p{.65\\textwidth} }
%s
\\end{tabular}
\\end{center}
'''%'\n'.join(list(map(parse,sorted(datastr.split('\n')[1:-1]))))
glossary+= atmos
glossary+= modelling
glossary+= mech
glossary+= ml
with open('glossary.tex','w') as f:
f.write(glossary)