Skip to content

Commit

Permalink
Updated repo url, updated app.
Browse files Browse the repository at this point in the history
  • Loading branch information
lauri-codes committed Oct 23, 2024
1 parent eeb264a commit 3cdd223
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 50 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [
]

[project.urls]
Repository = "https://github.com/lauri-codes/nomad-tadf-molecules"
Repository = "https://github.com/FAIRmat-NFDI/nomad-tadf-molecules"

[project.optional-dependencies]
dev = ["ruff", "pytest", "structlog"]
Expand Down
122 changes: 73 additions & 49 deletions src/nomad_tadf_molecules/apps/tadf_molecules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
App,
Axis,
Column,
Columns,
Dashboard,
FilterMenu,
FilterMenus,
Filters,
Format,
Layout,
Menu,
MenuItemHistogram,
MenuItemPeriodicTable,
MenuItemTerms,
Pagination,
SearchQuantities,
WidgetHistogram,
WidgetPeriodicTable,
WidgetScatterPlot,
Expand All @@ -22,86 +23,109 @@
path='tadf-molecules',
description='Search for thermally activated delayed fluorescent molecules.',
category='Experiment',
filters=Filters(
search_quantities=SearchQuantities(
include=[f'*#{schema}'],
),
filters_locked={'section_defs.definition_qualified_name': schema},
pagination=Pagination(
order_by=f'data.photoluminescence_quantum_yield#{schema}',
order='desc',
),
columns=Columns(
selected=[
'results.material.chemical_formula_hill',
f'data.photoluminescence_quantum_yield#{schema}',
f'data.peak_emission_wavelength#{schema}',
f'data.delayed_lifetime#{schema}',
f'data.singlet_triplet_energy_splitting#{schema}',
'references',
],
options={
'results.material.chemical_formula_hill': Column(),
f'data.photoluminescence_quantum_yield#{schema}': Column(
format=Format(decimals=2, mode='standard')
columns=[
Column(search_quantity='results.material.chemical_formula_hill', selected=True),
Column(
search_quantity=f'data.photoluminescence_quantum_yield#{schema}',
format=Format(decimals=2),
selected=True,
),
Column(
search_quantity=f'data.peak_emission_wavelength#{schema}',
format=Format(decimals=2),
selected=True,
),
Column(
search_quantity=f'data.delayed_lifetime#{schema}',
format=Format(decimals=2),
selected=True,
),
Column(
search_quantity=f'data.singlet_triplet_energy_splitting#{schema}',
format=Format(decimals=2),
selected=True,
),
Column(search_quantity='references', selected=True),
],
menu=Menu(
items=[
Menu(
title='Elements / Formula',
size='xxl',
items=[
MenuItemPeriodicTable(
search_quantity='results.material.elements',
),
MenuItemTerms(
search_quantity='results.material.chemical_formula_hill',
options=0,
),
MenuItemHistogram(
x='results.material.n_elements',
),
],
),
f'data.peak_emission_wavelength#{schema}': Column(
format=Format(decimals=2, mode='standard'), unit='nm'
Menu(
title='TADF Properties',
items=[
MenuItemHistogram(
x=f'data.photoluminescence_quantum_yield#{schema}',
),
MenuItemHistogram(
x=f'data.peak_emission_wavelength#{schema}',
),
MenuItemHistogram(
x=f'data.delayed_lifetime#{schema}',
),
MenuItemHistogram(
x=f'data.singlet_triplet_energy_splitting#{schema}',
),
],
),
f'data.delayed_lifetime#{schema}': Column(
format=Format(decimals=2, mode='standard'), unit='µs'
),
f'data.singlet_triplet_energy_splitting#{schema}': Column(
format=Format(decimals=2, mode='standard'),
unit='eV',
),
'references': Column(),
},
),
filter_menus=FilterMenus(
options={
'material': FilterMenu(label='Material'),
'elements': FilterMenu(label='Elements / Formula', level=1, size='xl'),
'custom_quantities': FilterMenu(label='Custom Quantities', size='l'),
'metadata': FilterMenu(label='Visibility / IDs / Schema'),
}
]
),
dashboard=Dashboard(
widgets=[
WidgetPeriodicTable(
type='periodictable',
scale='linear',
quantity='results.material.elements',
search_quantity='results.material.elements',
layout={'lg': Layout(w=11, h=7, x=0, y=0)},
),
WidgetScatterPlot(
type='scatterplot',
layout={'lg': Layout(w=7, h=7, x=11, y=0)},
x=Axis(quantity=f'data.peak_emission_wavelength#{schema}', unit='nm'),
y=Axis(quantity=f'data.photoluminescence_quantum_yield#{schema}'),
x=Axis(
search_quantity=f'data.peak_emission_wavelength#{schema}', unit='nm'
),
y=Axis(search_quantity=f'data.delayed_lifetime#{schema}'),
),
WidgetTerms(
type='terms',
layout={'lg': Layout(w=6, h=7, x=18, y=0)},
quantity='results.material.chemical_formula_hill',
search_quantity='results.material.chemical_formula_hill',
scale='linear',
),
WidgetHistogram(
type='histogram',
layout={'lg': Layout(w=12, h=4, x=12, y=7)},
autorange=False,
nbins=30,
scale='1/4',
x=Axis(quantity=f'data.delayed_lifetime#{schema}', unit='µs'),
x=Axis(search_quantity=f'data.delayed_lifetime#{schema}'),
),
WidgetHistogram(
type='histogram',
layout={'lg': Layout(w=12, h=4, x=12, y=7)},
autorange=False,
nbins=30,
scale='linear',
x=Axis(
quantity=f'data.singlet_triplet_energy_splitting#{schema}',
unit='eV',
search_quantity=f'data.singlet_triplet_energy_splitting#{schema}',
unit='joule',
),
),
]
Expand Down

0 comments on commit 3cdd223

Please sign in to comment.