-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathperovskite_ions_app.py
165 lines (164 loc) · 5.08 KB
/
perovskite_ions_app.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import yaml
from nomad.config.models.ui import (
App,
Axis,
Column,
Dashboard,
Menu,
MenuItemHistogram,
MenuItemTerms,
SearchQuantities,
)
schemas = [
'*#perovskite_solar_cell_database.composition.PerovskiteAIon',
'*#perovskite_solar_cell_database.composition.PerovskiteBIon',
'*#perovskite_solar_cell_database.composition.PerovskiteXIon',
]
# noqa: E501
perovskite_ions_app = App(
label='Halide Perovskite Ions Database',
path='perovskite-ions',
category='Solar cells',
description='Search ions used in halide perovskites compunds',
search_quantities=SearchQuantities(include=schemas),
columns=[
Column(quantity='results.material.elements', selected=True),
Column(
quantity='results.material.chemical_formula_iupac',
selected=True,
),
Column(
quantity='data.iupac_name#perovskite_solar_cell_database.composition.PerovskiteAIon',
selected=True,
title='IUPAC Name',
),
Column(
quantity='data.smiles#perovskite_solar_cell_database.composition.PerovskiteAIon',
selected=True,
title='SMILES',
),
],
menu=Menu(
title='Ions Database',
items=[
MenuItemTerms(
quantity='data.abbreviation#perovskite_solar_cell_database.composition.PerovskiteAIon',
show_input=True,
title='A cation Abbreviation',
),
MenuItemTerms(
quantity='data.smiles#perovskite_solar_cell_database.composition.PerovskiteAIon',
show_input=True,
title='A cation SMILES',
),
MenuItemTerms(
quantity='data.iupac_name#perovskite_solar_cell_database.composition.PerovskiteAIon',
show_input=True,
),
MenuItemHistogram(
x=Axis(
search_quantity='data.pure_substance.molar_mass#perovskite_solar_cell_database.composition.PerovskiteAIon',
title='A cation Molar Mass',
)
),
MenuItemHistogram(x=Axis(search_quantity='results.material.n_elements')),
],
),
dashboard=Dashboard.parse_obj(
yaml.safe_load(
"""
widgets:
- type: periodictable
scale: linear
search_quantity: results.material.elements
layout:
xxl:
minH: 8
minW: 12
h: 9
w: 13
y: 0
x: 0
xl:
minH: 8
minW: 12
h: 9
w: 12
y: 0
x: 0
lg:
minH: 8
minW: 12
h: 8
w: 12
y: 0
x: 0
md:
minH: 8
minW: 12
h: 8
w: 12
y: 0
x: 0
sm:
minH: 8
minW: 12
h: 8
w: 12
y: 0
x: 0
- type: scatter_plot
autorange: true
size: 1000
markers:
color:
search_quantity: results.material.topology[0].structural_type
y:
search_quantity: data.pure_substance.molar_mass#perovskite_solar_cell_database.composition.PerovskiteAIon
title: A cation molar mass
x:
search_quantity: results.material.topology[0].n_atoms
title: Number of atoms
layout:
xxl:
minH: 3
minW: 3
h: 6
w: 9
y: 0
x: 12
xl:
minH: 3
minW: 3
h: 9
w: 18
y: 0
x: 12
lg:
minH: 3
minW: 3
h: 8
w: 12
y: 0
x: 12
md:
minH: 3
minW: 3
h: 8
w: 6
y: 0
x: 12
sm:
minH: 3
minW: 3
h: 6
w: 9
y: 8
x: 0
"""
)
),
filters_locked={
'results.eln.sections': ['PerovskiteAIon', 'PerovskiteBIon', 'PerovskiteXIon']
},
)