From e1f86b2de8a0d82210a96c8fcf2cebbf32c793dd Mon Sep 17 00:00:00 2001 From: Pepe Marquez Date: Wed, 4 Dec 2024 17:04:08 +0100 Subject: [PATCH] First draft of app and changed band_gap_graded to type bool. --- .../perovskite_solar_cell_database_app.py | 215 ++++++++++++++++-- .../schema_sections/perovskite.py | 6 +- 2 files changed, 198 insertions(+), 23 deletions(-) diff --git a/src/perovskite_solar_cell_database/apps/perovskite_solar_cell_database_app.py b/src/perovskite_solar_cell_database/apps/perovskite_solar_cell_database_app.py index 65962a0..cebed89 100644 --- a/src/perovskite_solar_cell_database/apps/perovskite_solar_cell_database_app.py +++ b/src/perovskite_solar_cell_database/apps/perovskite_solar_cell_database_app.py @@ -2,16 +2,17 @@ from nomad.config.models.ui import ( App, Axis, + AxisScale, Column, Dashboard, Menu, MenuItemHistogram, + MenuItemOption, MenuItemPeriodicTable, MenuItemTerms, - SearchQuantities, - ScaleEnum, MenuSizeEnum, - AxisScale, + ScaleEnum, + SearchQuantities, ) schemas = [ @@ -20,9 +21,9 @@ # noqa: E501 perovskite_database_app = App( label='The Perovskite Solar Cell Database', - path='perovskite-solar-cells', + path='perovskite-solar-cells-database', category='Halide Perovskites', - description='Search Entries of the Perovskite Solar Cell Database', + description='Search entries of the perovskite solar cell database', search_quantities=SearchQuantities(include=schemas), columns=[ Column(quantity='entry_create_time', selected=True), @@ -75,7 +76,33 @@ menu=Menu( items=[ Menu( - title='Absorber Material', + title='Publication', + size=MenuSizeEnum.XXL, + items=[ + MenuItemTerms( + search_quantity='data.ref.journal#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + show_input=True, + width=6, + options=10, + title='Journal', + ), + MenuItemTerms( + search_quantity='data.ref.DOI_number#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + show_input=True, + width=6, + options=10, + title='DOI', + ), + MenuItemHistogram( + x=Axis( + search_quantity='data.ref.publication_date#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + title='Publication Date', + ) + ), + ], + ), + Menu( + title='Perovskite Material', size=MenuSizeEnum.XXL, items=[ MenuItemPeriodicTable( @@ -113,36 +140,95 @@ show_input=False, nbins=30, ), + MenuItemTerms( + search_quantity='data.perovskite.composition_a_ions#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + width=4, + options=10, + title='A cations', + ), + MenuItemTerms( + search_quantity='data.perovskite.composition_b_ions#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + width=4, + options=10, + title='B cations', + ), + MenuItemTerms( + search_quantity='data.perovskite.composition_c_ions#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + width=4, + options=10, + title='X anions', + ), ], ), Menu( - title='Publication', + title='Perovskite Fabrication', size=MenuSizeEnum.XXL, items=[ MenuItemTerms( - search_quantity='data.ref.journal#perovskite_solar_cell_database.schema.PerovskiteSolarCell', - show_input=True, - width=6, + search_quantity='data.perovskite_deposition.procedure#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + width=4, options=10, - title='Journal', ), MenuItemTerms( - search_quantity='data.ref.DOI_number#perovskite_solar_cell_database.schema.PerovskiteSolarCell', - show_input=True, - width=6, + search_quantity='data.perovskite_deposition.solvents#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + width=4, options=10, - title='DOI', ), + MenuItemTerms( + search_quantity='data.perovskite.additives_compounds#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + width=4, + options=10, + ), + ], + ), + Menu( + title='Device Architecture', + size=MenuSizeEnum.XXL, + items=[ MenuItemHistogram( x=Axis( - search_quantity='data.ref.publication_date#perovskite_solar_cell_database.schema.PerovskiteSolarCell', - title='Publication Date', - ) + search_quantity='data.cell.area_total#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + scale=ScaleEnum.LOG, + title='Total area', + unit='cm**2', + ), + y=AxisScale( + scale=ScaleEnum.POW4, + ), + title='Total area', + width=6, + show_input=False, + nbins=30, + ), + MenuItemHistogram( + x=Axis( + search_quantity='data.cell.area_measured#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + scale=ScaleEnum.LOG, + title='Total area', + unit='cm**2', + ), + y=AxisScale( + scale=ScaleEnum.POW4, + ), + title='Measured area', + width=6, + show_input=False, + nbins=30, + ), + MenuItemTerms( + search_quantity='results.properties.optoelectronic.solar_cell.device_stack', + width=6, + options=0, + ), + MenuItemTerms( + search_quantity='data.cell.architecture#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + width=6, + options=0, ), ], ), Menu( - title='Transport layers', + title='Transport Layers', size=MenuSizeEnum.XXL, items=[ MenuItemTerms( @@ -175,6 +261,97 @@ ), ], ), + Menu( + title='Solar Cell Performance', + size=MenuSizeEnum.XXL, + items=[ + MenuItemHistogram( + x=Axis( + search_quantity='results.properties.optoelectronic.solar_cell.efficiency', + title='Efficiency (%)', + ), + y=AxisScale( + scale=ScaleEnum.LINEAR, + ), + title='Efficiency', + width=6, + show_input=True, + nbins=30, + ), + MenuItemHistogram( + x=Axis( + search_quantity='results.properties.optoelectronic.solar_cell.open_circuit_voltage', + scale=ScaleEnum.LINEAR, + title='Voc', + ), + y=AxisScale( + scale=ScaleEnum.LINEAR, + ), + title='Voc', + width=6, + show_input=True, + nbins=30, + ), + MenuItemHistogram( + x=Axis( + search_quantity='results.properties.optoelectronic.solar_cell.short_circuit_current_density', + title='Jsc', + unit='mA/cm**2', + ), + y=AxisScale( + scale=ScaleEnum.LINEAR, + ), + title='Jsc', + width=6, + show_input=True, + nbins=30, + ), + MenuItemHistogram( + x=Axis( + search_quantity='results.properties.optoelectronic.solar_cell.fill_factor', + scale=ScaleEnum.LINEAR, + title='Fill factor', + ), + y=AxisScale( + scale=ScaleEnum.LINEAR, + ), + title='Fill factor', + width=6, + show_input=True, + nbins=30, + ), + MenuItemHistogram( + x=Axis( + search_quantity='results.properties.optoelectronic.solar_cell.illumination_intensity', + scale=ScaleEnum.LINEAR, + title='Illumination intensity', + unit='mW/cm^2', + ), + y=AxisScale( + scale=ScaleEnum.LINEAR, + ), + title='Illumination intensity', + width=6, + show_input=True, + nbins=30, + ), + MenuItemHistogram( + x=Axis( + search_quantity='data.eqe.integrated_Jsc#perovskite_solar_cell_database.schema.PerovskiteSolarCell', + scale=ScaleEnum.LINEAR, + title='Integrated Jsc (EQE)', + unit='mA/cm**2', + ), + y=AxisScale( + scale=ScaleEnum.LINEAR, + ), + title='Integrated Jsc (EQE)', + width=6, + show_input=True, + nbins=30, + ), + ], + ), ] ), dashboard=Dashboard.parse_obj( diff --git a/src/perovskite_solar_cell_database/schema_sections/perovskite.py b/src/perovskite_solar_cell_database/schema_sections/perovskite.py index ce77059..6044cc5 100644 --- a/src/perovskite_solar_cell_database/schema_sections/perovskite.py +++ b/src/perovskite_solar_cell_database/schema_sections/perovskite.py @@ -5933,14 +5933,12 @@ class Perovskite(ArchiveSection): ) band_gap_graded = Quantity( - type=str, + type=bool, shape=[], description=""" TRUE if the band gap varies as a function of the vertical position in the perovskite layer. """, - a_eln=dict( - component='EnumEditQuantity', props=dict(suggestions=['true', 'false']) - ), + a_eln=dict(component='BoolEditQuantity'), ) band_gap_estimation_basis = Quantity(