Skip to content

Commit

Permalink
Initialized perovskite database app.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepe-Marquez committed Dec 4, 2024
1 parent e607ef0 commit f5ace75
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ where = ["src"]
[project.entry-points.'nomad.plugin']
perovskite_solar_cell = "perovskite_solar_cell_database:perovskite_solar_cell"
solar_cell_app = "perovskite_solar_cell_database.apps:solar_cells"
perovskite_solar_cell_database_app = "perovskite_solar_cell_database.apps:perovskite_solar_cell_database_app"
perovskite_composition = "perovskite_solar_cell_database:perovskite_composition"
ion_parser = "perovskite_solar_cell_database:ion_parser"
perovskite_ions_app = "perovskite_solar_cell_database.apps:perovskite_ions"
11 changes: 11 additions & 0 deletions src/perovskite_solar_cell_database/apps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from nomad.config.models.plugins import AppEntryPoint

from perovskite_solar_cell_database.apps.perovskite_ions_app import perovskite_ions_app
from perovskite_solar_cell_database.apps.perovskite_solar_cell_database_app import (
perovskite_database_app,
)
from perovskite_solar_cell_database.apps.solar_cell_app import solar_cell_app

solar_cells = AppEntryPoint(
Expand All @@ -14,6 +17,14 @@
app=solar_cell_app,
)

perovskite_solar_cell_database_app = AppEntryPoint(
name='The Perovskite Solar Cell Database',
description="""
Search Entries of the Perovskite Solar Cell Database
""",
app=perovskite_database_app,
)

perovskite_ions = AppEntryPoint(
name='Halide Perovskite Ions',
description="""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
import yaml
from nomad.config.models.ui import (
App,
Axis,
Column,
Dashboard,
Menu,
MenuItemHistogram,
MenuItemPeriodicTable,
MenuItemTerms,
SearchQuantities,
)

schemas = [
'*#perovskite_solar_cell_database.schema.PerovskiteSolarCell',
]
# noqa: E501
perovskite_database_app = App(
label='The Perovskite Solar Cell Database',
path='perovskite-solar-cells',
category='Halide Perovskites',
description='Search Entries of the Perovskite Solar Cell Database',
search_quantities=SearchQuantities(include=schemas),
columns=[
Column(quantity='entry_create_time', selected=True),
],
# Column(
# quantity='results.properties.optoelectronic.solar_cell.efficiency',
# selected=True,
# format={'decimals': 2, 'mode': 'standard'},
# label='Efficiency (%)',
# ),
# Column(
# quantity='results.properties.optoelectronic.solar_cell.open_circuit_voltage',
# selected=True,
# format={'decimals': 3, 'mode': 'standard'},
# unit='V',
# ),
# Column(
# quantity='results.properties.optoelectronic.solar_cell.short_circuit_current_density',
# selected=True,
# format={'decimals': 3, 'mode': 'standard'},
# unit='A/m**2',
# ),
# Column(
# quantity='results.properties.optoelectronic.solar_cell.fill_factor',
# selected=True,
# format={'decimals': 3, 'mode': 'standard'},
# ),
# Column(quantity='references', selected=True),
# Column(quantity='results.material.chemical_formula_hill', label='Formula'),
# Column(quantity='results.material.structural_type'),
# Column(
# quantity='results.properties.optoelectronic.solar_cell.illumination_intensity',
# format={'decimals': 3, 'mode': 'standard'},
# label='Illum. intensity',
# unit='W/m**2',
# ),
# Column(quantity='results.eln.lab_ids'),
# Column(quantity='results.eln.sections'),
# Column(quantity='results.eln.methods'),
# Column(quantity='results.eln.tags'),
# Column(quantity='results.eln.instruments'),
# Column(quantity='entry_name', label='Name'),
# Column(quantity='entry_type'),
# Column(quantity='mainfile'),
# Column(quantity='upload_create_time', label='Upload time'),
# Column(quantity='authors'),
# Column(quantity='comment'),
# Column(quantity='datasets'),
# Column(quantity='published', label='Access'),
menu=Menu(
items=[
MenuItemTerms(
quantity='results.material.chemical_formula_hill',
show_input=False,
),
Menu(
title='Absorber Material',
items=[
MenuItemTerms(
quantity='results.material.chemical_formula_hill',
show_input=True,
),
],
),
]
),
# menu=Menu(
# items=[
# # MenuItemTerms(
# # quantity=f'data.status#{schema_name}',
# # show_input=False,
# # ),
# Menu(
# title='Absorber Material',
# items=[
# MenuItemTerms(
# quantity='results.material.chemical_formula_descriptive',
# show_input=True,
# ),
# MenuItemTerms(
# quantity='results.material.chemical_formula_iupac',
# show_input=False,
# ),
# MenuItemHistogram(
# x=Axis(
# search_quantity='results.material.n_atoms',
# )
# ),
# ],
# ),
# Menu(
# size='xs',
# title='',
# items=[
# MenuItemTerms(
# quantity=f'data.parameters.name#{schema_name}',
# ),
# ],
# ),
# Menu(
# title='Recommender',
# items=[
# MenuItemTerms(
# search_quantity=f'data.recommender.type#{schema_name}',
# show_input=False,
# ),
# MenuItemTerms(
# search_quantity=f'data.recommender.surrogate_model.type#{schema_name}',
# show_input=False,
# ),
# MenuItemTerms(
# search_quantity=f'data.recommender.acquisition_function.type#{schema_name}',
# show_input=False,
# options=1,
# ),
# MenuItemTerms(
# search_quantity=f'data.recommender.hybrid_sampler#{schema_name}',
# show_input=False,
# ),
# MenuItemHistogram(
# x=Axis(
# search_quantity=f'data.recommender.sampling_percentage#{schema_name}'
# )
# ),
# ],
# ),
# ]
# ),
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
"""
)
),
filters_locked={
'section_defs.definition_qualified_name': [
'perovskite_solar_cell_database.schema.PerovskiteSolarCell'
]
},
)

0 comments on commit f5ace75

Please sign in to comment.