diff --git a/generate_gui_artifacts.sh b/generate_gui_artifacts.sh index 752464425a362dfe9e43e2054a83506728a1e14c..1d8a0d59398983da21fddf28dfae654290d36990 100755 --- a/generate_gui_artifacts.sh +++ b/generate_gui_artifacts.sh @@ -1,3 +1,9 @@ #!/bin/sh -python -m nomad.cli dev gui-artifacts --output-directory gui/src +python -m nomad.cli dev metainfo > gui/src/metainfo.json +python -m nomad.cli dev search-quantities > gui/src/searchQuantities.json +python -m nomad.cli dev toolkit-metadata > gui/src/toolkitMetadata.json +python -m nomad.cli dev units > gui/src/unitsData.js +python -m nomad.cli dev parser-metadata > gui/src/parserMetadata.json python -m nomad.cli dev gui-config > gui/public/env.js +cp dependencies/nomad-remote-tools-hub/tools.json gui/src/northTools.json +python -m nomad.cli dev example-upload-metadata > gui/src/exampleUploads.json diff --git a/gui/package.json b/gui/package.json index 551f768031fdb27b650d4cdf72132032ccc7dc0b..e16b59f61006f6ada2f48cc2e2ff7abf27bbcd87 100644 --- a/gui/package.json +++ b/gui/package.json @@ -1,6 +1,6 @@ { "name": "nomad-fair-gui", - "version": "1.1.5", + "version": "1.1.4", "commit": "e98694e", "private": true, "workspaces": [ diff --git a/gui/public/env.js b/gui/public/env.js index 420b76ad4f44e9dbed6344a8533ddedef8807015..58dbb75b0efa23b389981f7976886300919304f1 100644 --- a/gui/public/env.js +++ b/gui/public/env.js @@ -11,5 +11,5 @@ window.nomadEnv = { 'version': {}, 'globalLoginRequired': false, 'servicesUploadLimit': 10, - 'ui': {"search_contexts": {"include": ["entries", "eln", "materials", "solar_cells"], "exclude": [], "options": {"entries": {"label": "Entries", "path": "entries", "resource": "entries", "breadcrumb": "Entries search", "description": "Search individual entries", "help": {"title": "Entries search", "content": "This page allows you to **search entries** within NOMAD. Entries represent\nindividual calculations or experiments that have bee uploaded into NOMAD.\n\nThe search page consists of three main elements: the filter panel, the search\nbar, and the result list.\n\nThe filter panel on the left allows you to graphically explore and enter\ndifferent search filters. It also gives a visual indication of the currently\nactive search filters for each category. This is a good place to start exploring\nthe available search filters and their meaning.\n\nThe search bar allows you to specify filters by typing them in and pressing\nenter. You can also start by simply typing keywords of interest, which will\ntoggle a list of suggestions. For numerical data you can also use range queries,\ne.g. \\`0.0 < band_gap <= 0.1\\`.\n\nNotice that the units used in the filter panel and in the queries can be changed\nusing the **units** button on the top right corner. When using the search bar,\nyou can also specify a unit by typing the unit abbreviations, e.g. \\`band_gap >=\n0.1 Ha\\`\n\nThe result list on the right is automatically updated according to the filters\nyou have specified. You can browse through the results by scrolling through the\navailable items and loading more results as you go. Here you can also change the\nsorting of the results, modify the displayed columns, access individual entries\nor even download the raw data or the archive document by selecting individual\nentries and pressing the download button that appears. The ellipsis button shown\nfor each entry will navigate you to that entry's page. This entry page will show\nmore metadata, raw files, the entry's archive, and processing logs."}, "pagination": {"order_by": "upload_create_time", "order": "desc", "page_size": 20}, "columns": {"enable": ["entry_name", "results.material.chemical_formula_hill", "entry_type", "upload_create_time", "authors"], "include": ["entry_name", "results.material.chemical_formula_hill", "entry_type", "results.method.method_name", "results.method.simulation.program_name", "results.method.simulation.dft.basis_set_name", "results.method.simulation.dft.xc_functional_type", "results.material.structural_type", "results.material.symmetry.crystal_system", "results.material.symmetry.space_group_symbol", "results.material.symmetry.space_group_number", "results.eln.lab_ids", "results.eln.sections", "results.eln.methods", "results.eln.tags", "results.eln.instruments", "mainfile", "upload_create_time", "authors", "comment", "references", "datasets", "published"], "exclude": [], "options": {"entry_name": {"label": "Name", "align": "left"}, "results.material.chemical_formula_hill": {"label": "Formula", "align": "left"}, "entry_type": {"label": "Entry type", "align": "left"}, "results.method.method_name": {"label": "Method name"}, "results.method.simulation.program_name": {"label": "Program name"}, "results.method.simulation.dft.basis_set_name": {"label": "Basis set name"}, "results.method.simulation.dft.xc_functional_type": {"label": "XC functional type"}, "results.material.structural_type": {"label": "Structural type"}, "results.material.symmetry.crystal_system": {"label": "Crystal system"}, "results.material.symmetry.space_group_symbol": {"label": "Space group symbol"}, "results.material.symmetry.space_group_number": {"label": "Space group number"}, "results.eln.lab_ids": {"label": "Lab IDs"}, "results.eln.sections": {"label": "Sections"}, "results.eln.methods": {"label": "Methods"}, "results.eln.tags": {"label": "Tags"}, "results.eln.instruments": {"label": "Instruments"}, "mainfile": {"label": "Mainfile", "align": "left"}, "upload_create_time": {"label": "Upload time", "align": "left"}, "authors": {"label": "Authors", "align": "left"}, "comment": {"label": "Comment", "align": "left"}, "references": {"label": "References", "align": "left"}, "datasets": {"label": "Datasets", "align": "left"}, "published": {"label": "Access"}}}, "rows": {"actions": {"enable": true}, "details": {"enable": true}, "selection": {"enable": true}}, "filter_menus": {"include": ["material", "elements", "symmetry", "method", "simulation", "dft", "gw", "experiment", "eels", "properties", "electronic", "optoelectronic", "vibrational", "mechanical", "spectroscopy", "thermodynamic", "geometry_optimization", "eln", "author", "dataset", "access", "ids", "processed_data_quantities", "optimade"], "exclude": [], "options": {"material": {"label": "Material", "level": 0, "size": "small", "menu_items": {}}, "elements": {"label": "Elements / Formula", "level": 1, "size": "large", "menu_items": {}}, "symmetry": {"label": "Symmetry", "level": 1, "size": "small", "menu_items": {}}, "method": {"label": "Method", "level": 0, "size": "small", "menu_items": {}}, "simulation": {"label": "Simulation", "level": 1, "size": "small", "menu_items": {}}, "dft": {"label": "DFT", "level": 2, "size": "small", "menu_items": {}}, "gw": {"label": "GW", "level": 2, "size": "small", "menu_items": {}}, "experiment": {"label": "Experiment", "level": 1, "size": "small"}, "eels": {"label": "EELS", "level": 2, "size": "small", "menu_items": {}}, "properties": {"label": "Properties", "level": 0, "size": "small"}, "electronic": {"label": "Electronic", "level": 1, "size": "small", "menu_items": {}}, "optoelectronic": {"label": "Optoelectronic", "level": 1, "size": "small", "menu_items": {}}, "vibrational": {"label": "Vibrational", "level": 1, "size": "small", "menu_items": {}}, "mechanical": {"label": "Mechanical", "level": 1, "size": "small", "menu_items": {}}, "spectroscopy": {"label": "Spectroscopy", "level": 1, "size": "small", "menu_items": {}}, "thermodynamic": {"label": "Thermodynamic", "level": 1, "size": "small", "menu_items": {}}, "geometry_optimization": {"label": "Geometry Optimization", "level": 1, "size": "small", "menu_items": {}}, "eln": {"label": "Electronic Lab Notebook", "level": 0, "size": "small", "menu_items": {}}, "author": {"label": "Author / Origin", "level": 0, "size": "medium", "menu_items": {}}, "dataset": {"label": "Dataset", "level": 0, "size": "small", "menu_items": {}}, "access": {"label": "Access", "level": 0, "size": "small", "menu_items": {}}, "ids": {"label": "IDs", "level": 0, "size": "small", "menu_items": {}}, "processed_data_quantities": {"label": "Processed Data Quantities", "level": 0, "size": "medium", "menu_items": {}}, "optimade": {"label": "Optimade", "level": 0, "size": "medium", "menu_items": {}}}}}, "eln": {"label": "ELN", "path": "eln", "resource": "entries", "breadcrumb": "ELN entries search", "description": "Search individual ELN entries", "help": {"title": "ELN entries search", "content": "This page allows you to specifically **search ELN entries** within NOMAD.\nIt is very similar to the *Entries search*, but with a reduced\nfilter set and specialized arrangement of default columns."}, "pagination": {"order_by": "upload_create_time", "order": "desc", "page_size": 20}, "columns": {"enable": ["entry_name", "entry_type", "upload_create_time", "authors"], "include": ["entry_name", "results.material.chemical_formula_hill", "entry_type", "results.method.method_name", "results.method.simulation.program_name", "results.method.simulation.dft.basis_set_name", "results.method.simulation.dft.xc_functional_type", "results.material.structural_type", "results.material.symmetry.crystal_system", "results.material.symmetry.space_group_symbol", "results.material.symmetry.space_group_number", "results.eln.lab_ids", "results.eln.sections", "results.eln.methods", "results.eln.tags", "results.eln.instruments", "mainfile", "upload_create_time", "authors", "comment", "references", "datasets", "published"], "exclude": [], "options": {"entry_name": {"label": "Name", "align": "left"}, "results.material.chemical_formula_hill": {"label": "Formula", "align": "left"}, "entry_type": {"label": "Entry type", "align": "left"}, "results.method.method_name": {"label": "Method name"}, "results.method.simulation.program_name": {"label": "Program name"}, "results.method.simulation.dft.basis_set_name": {"label": "Basis set name"}, "results.method.simulation.dft.xc_functional_type": {"label": "XC functional type"}, "results.material.structural_type": {"label": "Structural type"}, "results.material.symmetry.crystal_system": {"label": "Crystal system"}, "results.material.symmetry.space_group_symbol": {"label": "Space group symbol"}, "results.material.symmetry.space_group_number": {"label": "Space group number"}, "results.eln.lab_ids": {"label": "Lab IDs"}, "results.eln.sections": {"label": "Sections"}, "results.eln.methods": {"label": "Methods"}, "results.eln.tags": {"label": "Tags"}, "results.eln.instruments": {"label": "Instruments"}, "mainfile": {"label": "Mainfile", "align": "left"}, "upload_create_time": {"label": "Upload time", "align": "left"}, "authors": {"label": "Authors", "align": "left"}, "comment": {"label": "Comment", "align": "left"}, "references": {"label": "References", "align": "left"}, "datasets": {"label": "Datasets", "align": "left"}, "published": {"label": "Access"}}}, "rows": {"actions": {"enable": true}, "details": {"enable": true}, "selection": {"enable": true}}, "filter_menus": {"include": ["material", "elements", "eln", "symmetry", "method", "symmetry", "dft", "gw", "experiment", "eels", "properties", "electronic", "optoelectronic", "vibrational", "mechanical", "spectroscopy", "thermodynamic", "geometry_optimization", "author", "dataset", "access", "ids", "processed_data_quantities", "optimade"], "exclude": ["symmetry", "method", "simulation", "dft", "gw", "experiment", "eels", "properties", "electronic", "optoelectronic", "vibrational", "mechanical", "spectroscopy", "thermodynamic", "geometry_optimization", "optimade"], "options": {"material": {"label": "Material", "level": 0, "size": "small", "menu_items": {}}, "elements": {"label": "Elements / Formula", "level": 1, "size": "large", "menu_items": {}}, "symmetry": {"label": "Symmetry", "level": 1, "size": "small", "menu_items": {}}, "method": {"label": "Method", "level": 0, "size": "small", "menu_items": {}}, "simulation": {"label": "Simulation", "level": 1, "size": "small", "menu_items": {}}, "dft": {"label": "DFT", "level": 2, "size": "small", "menu_items": {}}, "gw": {"label": "GW", "level": 2, "size": "small", "menu_items": {}}, "experiment": {"label": "Experiment", "level": 1, "size": "small"}, "eels": {"label": "EELS", "level": 2, "size": "small", "menu_items": {}}, "properties": {"label": "Properties", "level": 0, "size": "small"}, "electronic": {"label": "Electronic", "level": 1, "size": "small", "menu_items": {}}, "optoelectronic": {"label": "Optoelectronic", "level": 1, "size": "small", "menu_items": {}}, "vibrational": {"label": "Vibrational", "level": 1, "size": "small", "menu_items": {}}, "mechanical": {"label": "Mechanical", "level": 1, "size": "small", "menu_items": {}}, "spectroscopy": {"label": "Spectroscopy", "level": 1, "size": "small", "menu_items": {}}, "thermodynamic": {"label": "Thermodynamic", "level": 1, "size": "small", "menu_items": {}}, "geometry_optimization": {"label": "Geometry Optimization", "level": 1, "size": "small", "menu_items": {}}, "eln": {"label": "Electronic Lab Notebook", "level": 0, "size": "small", "menu_items": {}}, "author": {"label": "Author / Origin", "level": 0, "size": "medium", "menu_items": {}}, "dataset": {"label": "Dataset", "level": 0, "size": "small", "menu_items": {}}, "access": {"label": "Access", "level": 0, "size": "small", "menu_items": {}}, "ids": {"label": "IDs", "level": 0, "size": "small", "menu_items": {}}, "processed_data_quantities": {"label": "Processed Data Quantities", "level": 0, "size": "medium", "menu_items": {}}, "optimade": {"label": "Optimade", "level": 0, "size": "medium", "menu_items": {}}}}}, "materials": {"label": "Materials", "path": "materials", "resource": "materials", "breadcrumb": "Materials search", "description": "Search materials that are identified from the entries", "help": {"title": "Materials search", "content": "This page allows you to **search materials** within NOMAD. NOMAD can\nautomatically detect the material from individual entries and can then group the\ndata by using these detected materials. This allows you to search individual\nmaterials which have properties that are aggregated from several entries.\n\nThe search page consists of three main elements: the filter panel, the search\nbar, and the result list.\n\nThe filter panel on the left allows you to graphically explore and enter\ndifferent search filters. It also gives a visual indication of the currently\nactive search filters for each category. This is a good place to start exploring\nthe available search filters and their meaning.\n\nThe search bar allows you to specify filters by typing them in and pressing\nenter. You can also start by simply typing keywords of interest, which will\ntoggle a list of suggestions. For numerical data you can also use range queries,\ne.g. \\`0.0 < band_gap <= 0.1\\`.\n\nThe units used in the filter panel and in the queries can be changed\nusing the **units** button on the top right corner. When using the search bar,\nyou can also specify a unit by typing the unit abbreviations, e.g. \\`band_gap >=\n0.1 Ha\\`.\n\nNotice that by default the properties that you search can be combined from\nseveral different entries. If instead you wish to search for a material with an\nindividual entry fullfilling your search criteria, uncheck the **combine results\nfrom several entries**-checkbox.\n\nThe result list on the right is automatically updated according to the filters\nyou have specified. You can scroll through the available items and load more\nresults as you go. Here you can also change the sorting of the results, modify\nthe displayed columns and access individual materials. The ellipsis button shown\nfor each material will navigate you into the material overview page within the\nNOMAD Encyclopedia. This page will show a more detailed overview for that\nspecific material."}, "pagination": {"order_by": "chemical_formula_hill", "order": "asc"}, "columns": {"enable": ["chemical_formula_hill", "structural_type", "symmetry.structure_name", "symmetry.space_group_number", "symmetry.crystal_system"], "include": ["chemical_formula_hill", "structural_type", "symmetry.structure_name", "symmetry.crystal_system", "symmetry.space_group_symbol", "symmetry.space_group_number", "material_id"], "exclude": [], "options": {"chemical_formula_hill": {"label": "Formula", "align": "left"}, "structural_type": {"label": "Structural type"}, "symmetry.structure_name": {"label": "Structure name"}, "symmetry.crystal_system": {"label": "Crystal system"}, "symmetry.space_group_symbol": {"label": "Space group symbol"}, "symmetry.space_group_number": {"label": "Space group number"}, "material_id": {"label": "Material ID"}}}, "rows": {"actions": {"enable": true}, "details": {"enable": false}, "selection": {"enable": false}}, "filter_menus": {"include": ["material", "elements", "symmetry", "method", "simulation", "dft", "gw", "experiment", "eels", "properties", "electronic", "optoelectronic", "vibrational", "mechanical", "spectroscopy", "thermodynamic", "geometry_optimization", "eln", "author", "dataset", "access", "ids", "processed_data_quantities", "optimade", "combine"], "exclude": [], "options": {"material": {"label": "Material", "level": 0, "size": "small", "menu_items": {}}, "elements": {"label": "Elements / Formula", "level": 1, "size": "large", "menu_items": {}}, "symmetry": {"label": "Symmetry", "level": 1, "size": "small", "menu_items": {}}, "method": {"label": "Method", "level": 0, "size": "small", "menu_items": {}}, "simulation": {"label": "Simulation", "level": 1, "size": "small", "menu_items": {}}, "dft": {"label": "DFT", "level": 2, "size": "small", "menu_items": {}}, "gw": {"label": "GW", "level": 2, "size": "small", "menu_items": {}}, "experiment": {"label": "Experiment", "level": 1, "size": "small"}, "eels": {"label": "EELS", "level": 2, "size": "small", "menu_items": {}}, "properties": {"label": "Properties", "level": 0, "size": "small"}, "electronic": {"label": "Electronic", "level": 1, "size": "small", "menu_items": {}}, "optoelectronic": {"label": "Optoelectronic", "level": 1, "size": "small", "menu_items": {}}, "vibrational": {"label": "Vibrational", "level": 1, "size": "small", "menu_items": {}}, "mechanical": {"label": "Mechanical", "level": 1, "size": "small", "menu_items": {}}, "spectroscopy": {"label": "Spectroscopy", "level": 1, "size": "small", "menu_items": {}}, "thermodynamic": {"label": "Thermodynamic", "level": 1, "size": "small", "menu_items": {}}, "geometry_optimization": {"label": "Geometry Optimization", "level": 1, "size": "small", "menu_items": {}}, "eln": {"label": "Electronic Lab Notebook", "level": 0, "size": "small", "menu_items": {}}, "author": {"label": "Author / Origin", "level": 0, "size": "medium", "menu_items": {}}, "dataset": {"label": "Dataset", "level": 0, "size": "small", "menu_items": {}}, "access": {"label": "Access", "level": 0, "size": "small", "menu_items": {}}, "ids": {"label": "IDs", "level": 0, "size": "small", "menu_items": {}}, "processed_data_quantities": {"label": "Processed Data Quantities", "level": 0, "size": "medium", "menu_items": {}}, "optimade": {"label": "Optimade", "level": 0, "size": "medium", "menu_items": {}}, "combine": {"actions": {"include": ["combine"], "options": {"combine": {"type": "checkbox", "label": "Combine results from several entries", "quantity": "combine"}}}}}}}, "solar_cells": {"label": "Solar Cells", "path": "solar-cells", "resource": "entries", "breadcrumb": "Solar cells search", "description": "Search solar cells in NOMAD", "help": {"title": "Solar cells search", "content": "This page allows you to **search solar cells** within NOMAD.\nYou can search for solar cells by their properties, by the chemistry of the absorber layer,\npreparation method, or their origin.\n\nThe search page consists of three main elements: the filter panel, the search\nbar, and the result list.\n\nThe filter panel on the left allows you to graphically explore and enter\ndifferent search filters. It also gives a visual indication of the currently\nactive search filters for each category. This is a good place to start exploring\nthe available search filters and their meaning. But clikcing in the \"+\" button\nyou could add the filter widgets to the central part of the page and combine them.\nTry adding the periodic table widget to the main pannel and select some elements\ncontained in the absorber layer.\n\nThe search bar allows you to specify filters by typing them in and pressing\nenter. You can also start by simply typing keywords of interest, which will\ntoggle a list of suggestions. For numerical data you can also use range queries,\ne.g. \\`0.0 < efficiency <= 20.1\\`.\n\nThe units used in the filter panel and in the queries can be changed\nusing the **units** button on the top right corner. When using the search bar,\nyou can also specify a unit by typing the unit abbreviations, e.g. \\`band_gap >=\n0.1 Ha\\`.\n\nThe result list on the right is automatically updated according to the filters\nyou have specified. You can browse through the results by scrolling through the\navailable items and loading more results as you go. Here you can also change the\nsorting of the results, modify the displayed columns, download the raw data\nor the archive document by selecting individual entries and pressing the download\ncloud button that appears.\n\nThe ellipsis button (three dots) shown for each entry will navigate\nyou to that entry's page. This entry page will show more metadata,\nraw files, the entry's archive, and processing logs."}, "pagination": {"order_by": "results.properties.optoelectronic.solar_cell.efficiency", "order": "desc", "page_size": 20}, "filters_locked": {"results.material.functional_type": "solar cell"}, "columns": {"enable": ["results.material.chemical_formula_descriptive", "results.properties.optoelectronic.solar_cell.efficiency", "results.properties.optoelectronic.solar_cell.open_circuit_voltage", "results.properties.optoelectronic.solar_cell.short_circuit_current_density", "results.properties.optoelectronic.solar_cell.fill_factor", "references"], "include": ["entry_name", "results.material.chemical_formula_hill", "results.material.chemical_formula_descriptive", "results.properties.optoelectronic.solar_cell.efficiency", "results.properties.optoelectronic.solar_cell.open_circuit_voltage", "results.properties.optoelectronic.solar_cell.short_circuit_current_density", "results.properties.optoelectronic.solar_cell.fill_factor", "results.properties.optoelectronic.solar_cell.device_stack", "results.properties.optoelectronic.solar_cell.device_architecture", "results.properties.optoelectronic.solar_cell.illumination_intensity", "results.properties.optoelectronic.solar_cell.absorber_fabrication", "entry_type", "results.material.structural_type", "results.eln.lab_ids", "results.eln.sections", "results.eln.methods", "results.eln.tags", "results.eln.instruments", "mainfile", "upload_create_time", "authors", "comment", "references", "datasets", "published"], "exclude": [], "options": {"entry_name": {"label": "Name", "align": "left"}, "results.material.chemical_formula_hill": {"label": "Formula", "align": "left"}, "results.material.chemical_formula_descriptive": {"label": "Descriptive Formula", "align": "left"}, "entry_type": {"label": "Entry type", "align": "left"}, "results.material.structural_type": {"label": "Structural type"}, "results.properties.optoelectronic.solar_cell.efficiency": {"label": "Efficiency (%)", "format": {"decimals": 2, "mode": "standard"}}, "results.properties.optoelectronic.solar_cell.open_circuit_voltage": {"label": "Open circuit voltage", "unit": "V", "format": {"decimals": 3, "mode": "standard"}}, "results.properties.optoelectronic.solar_cell.short_circuit_current_density": {"label": "Short circuit current density", "unit": "A/m**2", "format": {"decimals": 3, "mode": "standard"}}, "results.properties.optoelectronic.solar_cell.fill_factor": {"label": "Fill factor", "format": {"decimals": 3, "mode": "standard"}}, "results.properties.optoelectronic.solar_cell.illumination_intensity": {"label": "Illum. intensity", "unit": "W/m**2", "format": {"decimals": 3, "mode": "standard"}}, "results.eln.lab_ids": {"label": "Lab IDs"}, "results.eln.sections": {"label": "Sections"}, "results.eln.methods": {"label": "Methods"}, "results.eln.tags": {"label": "Tags"}, "results.eln.instruments": {"label": "Instruments"}, "mainfile": {"label": "Mainfile", "align": "left"}, "upload_create_time": {"label": "Upload time", "align": "left"}, "authors": {"label": "Authors", "align": "left"}, "comment": {"label": "Comment", "align": "left"}, "references": {"label": "References", "align": "left"}, "datasets": {"label": "Datasets", "align": "left"}, "published": {"label": "Access"}}}, "rows": {"actions": {"enable": true}, "details": {"enable": true}, "selection": {"enable": true}}, "filter_menus": {"include": ["material", "elements", "properties", "optoelectronic", "eln", "author", "dataset", "access", "ids", "processed_data_quantities", "optimade"], "exclude": [], "options": {"material": {"label": "Material", "level": 0, "size": "small", "menu_items": {}}, "elements": {"label": "Elements / Formula", "level": 0, "size": "large", "menu_items": {}}, "properties": {"label": "Properties", "level": 0, "size": "small"}, "optoelectronic": {"label": "Solar Cell Properties", "level": 0, "size": "small", "menu_items": {}}, "eln": {"label": "Electronic Lab Notebook", "level": 0, "size": "small", "menu_items": {}}, "author": {"label": "Author / Origin", "level": 0, "size": "medium", "menu_items": {}}, "dataset": {"label": "Dataset", "level": 0, "size": "small", "menu_items": {}}, "access": {"label": "Access", "level": 0, "size": "small", "menu_items": {}}, "ids": {"label": "IDs", "level": 0, "size": "small", "menu_items": {}}, "processed_data_quantities": {"label": "Processed Data Quantities", "level": 0, "size": "medium", "menu_items": {}}, "optimade": {"label": "Optimade", "level": 0, "size": "medium", "menu_items": {}}}}}}}} + 'ui': {"search_contexts": {"include": ["entries"], "exclude": [], "options": {"entries": {"label": "Entries", "path": "entries", "resource": "entries", "breadcrumb": "Entries search", "description": "Search individual database entries", "help": {"title": "Entries search", "content": "\n This page allows you to **search entries** within NOMAD. Entries represent\n individual calculations or experiments that have bee uploaded into NOMAD.\n\n The search page consists of three main elements: the filter panel, the search\n bar, and the result list.\n\n The filter panel on the left allows you to graphically explore and enter\n different search filters. It also gives a visual indication of the currently\n active search filters for each category. This is a good place to start exploring\n the available search filters and their meaning.\n\n The search bar allows you to specify filters by typing them in and pressing\n enter. You can also start by simply typing keywords of interest, which will\n toggle a list of suggestions. For numerical data you can also use range queries,\n e.g. \\`0.0 < band_gap <= 0.1\\`.\n\n Notice that the units used in the filter panel and in the queries can be changed\n using the **units** button on the top right corner. When using the search bar,\n you can also specify a unit by typing the unit abbreviations, e.g. \\`band_gap >=\n 0.1 Ha\\`\n\n The result list on the right is automatically updated according to the filters\n you have specified. You can browse through the results by scrolling through the\n available items and loading more results as you go. Here you can also change the\n sorting of the results, modify the displayed columns, access individual entries\n or even download the raw data or the archive document by selecting individual\n entries and pressing the download button that appears. The ellipsis button shown\n for each entry will navigate you to that entry's page. This entry page will show\n more metadata, raw files, the entry's archive, and processing logs.\n "}, "pagination": {"order_by": "upload_create_time", "order": "desc"}, "columns": {"enable": ["entry_name", "results.material.chemical_formula_hill", "entry_type", "upload_create_time", "authors"], "include": ["entry_name", "results.material.chemical_formula_hill", "entry_type", "results.method.method_name", "results.method.simulation.program_name", "results.method.simulation.dft.basis_set_name", "results.method.simulation.dft.xc_functional_type", "results.material.structural_type", "results.material.symmetry.crystal_system", "results.material.symmetry.space_group_symbol", "results.material.symmetry.space_group_number", "results.eln.lab_ids", "results.eln.sections", "results.eln.methods", "results.eln.tags", "results.eln.instruments", "mainfile", "upload_create_time", "authors", "comment", "references", "datasets", "published"], "exclude": [], "options": {"entry_name": {"label": "Name", "align": "left"}, "results.material.chemical_formula_hill": {"label": "Formula", "align": "left"}, "entry_type": {"label": "Entry type", "align": "left"}, "results.method.method_name": {"label": "Method name"}, "results.method.simulation.program_name": {"label": "Program name"}, "results.method.simulation.dft.basis_set_name": {"label": "Basis set name"}, "results.method.simulation.dft.xc_functional_type": {"label": "XC functional type"}, "results.material.structural_type": {"label": "Structural type"}, "results.material.symmetry.crystal_system": {"label": "Crystal system"}, "results.material.symmetry.space_group_symbol": {"label": "Space group symbol"}, "results.material.symmetry.space_group_number": {"label": "Space group number"}, "results.eln.lab_ids": {"label": "Lab IDs"}, "results.eln.sections": {"label": "Sections"}, "results.eln.methods": {"label": "Methods"}, "results.eln.tags": {"label": "Tags"}, "results.eln.instruments": {"label": "Instruments"}, "mainfile": {"label": "Mainfile", "align": "left"}, "upload_create_time": {"label": "Upload time", "align": "left"}, "authors": {"label": "Authors", "align": "left"}, "comment": {"label": "Comment", "align": "left"}, "references": {"label": "References", "align": "left"}, "datasets": {"label": "Datasets", "align": "left"}, "published": {"label": "Access"}}}, "filter_menus": {"include": ["material", "elements", "symmetry", "method", "simulation", "dft", "gw", "experiment", "eels", "properties", "electronic", "optoelectronic", "vibrational", "mechanical", "spectroscopy", "thermodynamic", "geometry_optimization", "eln", "author", "dataset", "access", "ids", "processed_data_quantities", "optimade"], "exclude": [], "options": {"material": {"label": "Material", "level": 0, "size": "small"}, "elements": {"label": "Elements / Formula", "level": 1, "size": "large"}, "symmetry": {"label": "Symmetry", "level": 1, "size": "small"}, "method": {"label": "Method", "level": 0, "size": "small"}, "simulation": {"label": "Simulation", "level": 1, "size": "small"}, "dft": {"label": "DFT", "level": 2, "size": "small"}, "gw": {"label": "GW", "level": 2, "size": "small"}, "experiment": {"label": "Experiment", "level": 1, "size": "small"}, "eels": {"label": "EELS", "level": 2, "size": "small"}, "properties": {"label": "Properties", "level": 0, "size": "small"}, "electronic": {"label": "Electronic", "level": 1, "size": "small"}, "optoelectronic": {"label": "Optoelectronic", "level": 1, "size": "small"}, "vibrational": {"label": "Vibrational", "level": 1, "size": "small"}, "mechanical": {"label": "Mechanical", "level": 1, "size": "small"}, "spectroscopy": {"label": "Spectroscopy", "level": 1, "size": "small"}, "thermodynamic": {"label": "Thermodynamic", "level": 1, "size": "small"}, "geometry_optimization": {"label": "Geometry Optimization", "level": 1, "size": "small"}, "eln": {"label": "Electronic Lab Notebook", "level": 0, "size": "small"}, "author": {"label": "Author / Origin", "level": 0, "size": "medium"}, "dataset": {"label": "Dataset", "level": 0, "size": "small"}, "access": {"label": "Access", "level": 0, "size": "small"}, "ids": {"label": "IDs", "level": 0, "size": "small"}, "processed_data_quantities": {"label": "Processed Data Quantities", "level": 0, "size": "medium"}, "optimade": {"label": "Optimade", "level": 0, "size": "medium"}}}}}}} }; diff --git a/gui/src/components/DataStore.js b/gui/src/components/DataStore.js index b4d58df25a29e2c91b9c3722a87fe5607ccab0c7..66796c87ecd9020ea02d6e035e1cea47efd8e62d 100644 --- a/gui/src/components/DataStore.js +++ b/gui/src/components/DataStore.js @@ -616,23 +616,6 @@ const DataStore = React.memo(({children}) => { return rv } - /** - * Used to reset the data store (i.e. clear its caches). If the provided newStoreKey is - * non-empty and different from the current storeKey, we clear everything. - */ - function resetIfNeeded(newStoreKey) { - if (newStoreKey && newStoreKey !== storeKey.current) { - if (storeKey.current) { - // Reset! - uploadStore.current = {} - entryStore.current = {} - metainfoDataStore.current = {} - externalInheritanceCache.current = {} - } - storeKey.current = newStoreKey - } - } - const contextValue = { getUpload, getUploadAsync, @@ -645,8 +628,8 @@ const DataStore = React.memo(({children}) => { selectedEntry, getMetainfoAsync, getMetainfoDefAsync, - getAllInheritingSections, - resetIfNeeded + subscribeToMetainfo, + getAllInheritingSections } return diff --git a/gui/src/components/UserdataPage.js b/gui/src/components/UserdataPage.js index d12470d7de6ef76f43dd07756150ccc23bc441f6..b9fcce7a414cde160f5280f85aa9248ea150eefe 100644 --- a/gui/src/components/UserdataPage.js +++ b/gui/src/components/UserdataPage.js @@ -72,7 +72,7 @@ Once you assigned a DOI to a dataset, no entries can be removed or added to the ` const context = ui?.search_contexts?.options?.entries -const initialFiltersLocked = { +const filtersLocked = { 'visibility': 'user' } const UserdataPage = React.memo(() => { @@ -80,9 +80,8 @@ const UserdataPage = React.memo(() => { resource={context?.resource} initialPagination={context?.pagination} initialColumns={context?.columns} - initialRows={context?.rows} initialFilterMenus={context?.filter_menus} - initialFiltersLocked={initialFiltersLocked} + filtersLocked={filtersLocked} > diff --git a/gui/src/components/archive/ArchiveBrowser.js b/gui/src/components/archive/ArchiveBrowser.js index b98d36170e475407786b43791e5367236e27fc75..d38459ad2dc49ab8185db8261d1c938b68c8a8f8 100644 --- a/gui/src/components/archive/ArchiveBrowser.js +++ b/gui/src/components/archive/ArchiveBrowser.js @@ -30,8 +30,8 @@ import Autocomplete from '@material-ui/lab/Autocomplete' import Browser, { Item, Content, Compartment, Adaptor, formatSubSectionName, laneContext, useLane, browserContext, ItemChip } from './Browser' import { RawFileAdaptor } from './FileBrowser' import { - AttributeMDef, isReference, isEditable, PackageMDef, QuantityMDef, quantityUsesFullStorage, - removeSubSection, SectionMDef, SubSectionMDef, useMetainfo, getUrlFromDefinition + isEditable, PackageMDef, QuantityMDef, removeSubSection, SectionMDef, SubSectionMDef, + useMetainfo, getMetainfoFromDefinition, getUrlFromDefinition } from './metainfo' import { ArchiveTitle, metainfoAdaptorFactory, DefinitionLabel } from './MetainfoBrowser' import { Matrix, Number } from './visualizations' @@ -476,11 +476,8 @@ class ArchiveAdaptor extends Adaptor { class SectionAdaptor extends ArchiveAdaptor { async itemAdaptor(key) { const [name, index] = key.split(':') - const property = this.def._properties[name] || (name === 'm_attributes' && this.def.attributes.find(attr => attr.name === index)) - let value = this.obj[name] || property?.default - if (property.m_def === QuantityMDef && quantityUsesFullStorage(property)) { - value = value[index] - } + const property = this.def._properties[name] + const value = this.obj[name] || property?.default if (!property) { return super.itemAdaptor(key) } else if (property.m_def === SubSectionMDef) { @@ -723,32 +720,17 @@ const InheritingSections = React.memo(function InheritingSections({def, section, browser.invalidateLanesFromIndex(lane.index) }, [section, browser, lane]) - const allInheritingSections = useMemo(() => { - return dataStore.getAllInheritingSections(def) - }, [dataStore, def]) - - const getSelectionValue = useCallback((def) => { - return getUrlFromDefinition(def, {installationUrl: apiBase}, true) - }, []) - - const showSelection = useMemo(() => { - if (allInheritingSections.length === 0) { - return false - } - - return true - }, [allInheritingSections]) - - if (!showSelection) { + if (section.m_def) { return null } - return ( + const allInheritingSections = dataStore.getAllInheritingSections(def) + return (allInheritingSections.length > 0 && Multiple specific sections are available - + {def.name} {allInheritingSections.map((inheritingSection, i) => { - const sectionValue = getSelectionValue(inheritingSection) + const sectionValue = getUrlFromDefinition(inheritingSection, {installationUrl: apiBase}, true) return ( {inheritingSection.name} @@ -837,9 +819,14 @@ function Section({section, def, parentRelation, sectionIsEditable, sectionIsInEl }, [navEntryId, setShowJson, sectionIsEditable, parentRelation, lane, history, handleArchiveChanged, section]) - const renderQuantityItem = useCallback((key, quantityName, quantityDef, value, disabled) => { - const itemKey = quantityName ? `${key}:${quantityName}` : key + const renderQuantity = useCallback(quantityDef => { + const key = quantityDef.name + const value = section[key] || quantityDef.default const isDefault = value && !section[key] + const disabled = value === undefined + if (!disabled && quantityDef.type.type_kind === 'reference' && quantityDef.shape.length === 1) { + return + } return ( diff --git a/gui/src/components/archive/MetainfoBrowser.js b/gui/src/components/archive/MetainfoBrowser.js index 626e772794c082b7554eb6f351c57fa922121663..49ab38dd142dafceb7af65535826add269456f21 100644 --- a/gui/src/components/archive/MetainfoBrowser.js +++ b/gui/src/components/archive/MetainfoBrowser.js @@ -199,8 +199,18 @@ class MetainfoAdaptor extends Adaptor { } async initialize(api, dataStore) { - if (this.def.m_def === SectionMDef || this.def.m_def === SubSectionMDef) { - this.inheritingSections = dataStore.getAllInheritingSections(this.def.sub_section || this.def) + // Subscribe to the metainfo containing this def + if (this.def.m_def) { + // A normal definition provided (note, the PackagePrefixAdaptor is not passed a normal + // metainfo definition, so in that case, m_def will be unset (but we also don't need to + // subscribe to anything). + const metainfoBaseUrl = getMetainfoFromDefinition(this.def)._url + await dataStore.getMetainfoAsync(metainfoBaseUrl) + this.unsubscriber = dataStore.subscribeToMetainfo(metainfoBaseUrl, () => {}) + + if (this.def.m_def === SectionMDef || this.def.m_def === SubSectionMDef) { + this.inheritingSections = dataStore.getAllInheritingSections(this.def.sub_section || this.def) + } } } } @@ -409,12 +419,6 @@ class CategoryDefAdaptor extends MetainfoAdaptor { } } -class AttributeDefAdaptor extends MetainfoAdaptor { - render() { - return - } -} - function SectionDefContent({def, inheritingSections}) { const config = useRecoilValue(configState) const metainfoConfig = useRecoilValue(metainfoConfigState) @@ -459,7 +463,7 @@ function SectionDefContent({def, inheritingSections}) { } {inheritingSections.length > 0 && - + {inheritingSections.map((inheritingSection, index) => { const key = `_inheritingSectionDef@${inheritingSection._qualifiedName}` const categories = inheritingSection.categories @@ -549,6 +553,7 @@ function SectionDef({def, inheritingSections}) { return + } SectionDef.propTypes = ({ @@ -562,7 +567,7 @@ function SubSectionDef({def, inheritingSections}) { - + diff --git a/gui/src/components/archive/SectionEditor.js b/gui/src/components/archive/SectionEditor.js index 33633e65dae72b400d4e5fc472ba03a08a099ce7..f6828bcd930e77f5ebfb4de10895ac294c83ea26 100644 --- a/gui/src/components/archive/SectionEditor.js +++ b/gui/src/components/archive/SectionEditor.js @@ -67,10 +67,10 @@ JsonEditor.propTypes = { const PropertyEditor = React.memo(function PropertyEditor({quantityDef, value, onChange}) { const editAnnotations = quantityDef.m_annotations?.eln || [] - const editAnnotation = editAnnotations[0] || {} - const {component, props, ...moreProps} = editAnnotation - const editComponent = component && editQuantityComponents[component] - if (!editComponent) { + const editAnnotation = editAnnotations[0] + const componentName = editAnnotation?.component + const component = componentName && editQuantityComponents[componentName] + if (!component) { return null } const editComponentProps = { diff --git a/gui/src/components/archive/metainfo.js b/gui/src/components/archive/metainfo.js index baa4d8f62747eb28914057963c659a5b2688779d..42c05c7ced41dec2ca61ecad03057baffb91fd28 100644 --- a/gui/src/components/archive/metainfo.js +++ b/gui/src/components/archive/metainfo.js @@ -443,9 +443,6 @@ export class Metainfo { property._section = sectionDef } } - for (const attribute of (sectionDef?.attributes || [])) { - attribute._parent = sectionDef - } for (const def of sectionDef.quantities) { await addNewProperty(def, 'quantities', index) } diff --git a/gui/src/components/dataset/DatasetPage.js b/gui/src/components/dataset/DatasetPage.js index 8f88b52e6363293a18b29197744556007e2e6ef0..7efe310f571b40f6abc9646e8e8ca571e1db8e17 100644 --- a/gui/src/components/dataset/DatasetPage.js +++ b/gui/src/components/dataset/DatasetPage.js @@ -64,9 +64,8 @@ const DatasetPage = React.memo(({match}) => { resource={context?.resource} initialPagination={context?.pagination} initialColumns={context?.columns} - initialRows={context?.rows} - initialFilterMenus={context?.filter_menus} - initialFiltersLocked={datasetFilter} + initialFilterMenus={context?.menus} + filtersLocked={datasetFilter} > diff --git a/gui/src/components/editQuantity/EnumEditQuantity.js b/gui/src/components/editQuantity/EnumEditQuantity.js index 5d155ec850f9e8d162b3f44fe4e41c862494465b..9fef07f52d6ee8a999693ac4ce198c4dbb69e5a3 100644 --- a/gui/src/components/editQuantity/EnumEditQuantity.js +++ b/gui/src/components/editQuantity/EnumEditQuantity.js @@ -22,8 +22,8 @@ import {getFieldProps, TextFieldWithHelp} from './StringEditQuantity' import AutoComplete from '@material-ui/lab/Autocomplete' export const EnumEditQuantity = React.memo((props) => { - const {quantityDef, value, onChange, suggestions, ...otherProps} = props - const fieldProps = getFieldProps(quantityDef) + const {quantityDef, value, onChange, ...otherProps} = props + const {suggestions, ...fieldProps} = getFieldProps(quantityDef) const handleChange = useCallback(value => { if (onChange) { diff --git a/gui/src/components/editQuantity/ReferenceEditQuantity.js b/gui/src/components/editQuantity/ReferenceEditQuantity.js index 515cf50ccce64734a5432159f48d5e8171a87711..08d19cd28768ddb4735654b28f644df7f368d1c1 100644 --- a/gui/src/components/editQuantity/ReferenceEditQuantity.js +++ b/gui/src/components/editQuantity/ReferenceEditQuantity.js @@ -27,7 +27,7 @@ import { ItemButton } from '../archive/Browser' import { getFieldProps } from './StringEditQuantity' import { isWaitingForUpdateTestId, refType, resolveNomadUrl } from '../../utils' import AddIcon from '@material-ui/icons/AddCircle' -import { getUrlFromDefinition, QuantityMDef } from '../archive/metainfo' +import { getUrlFromDefinition } from '../archive/metainfo' import { useDataStore } from '../DataStore' const filter = createFilterOptions() @@ -56,8 +56,7 @@ const ReferenceEditQuantity = React.memo(function ReferenceEditQuantity(props) { const fetchedSuggestionsFor = useRef() const referencedSectionQualifiedNames = useMemo(() => { - const referencedSection = getReferencedSection(quantityDef) - return [...dataStore.getAllInheritingSections(referencedSection).map(section => section._qualifiedName), referencedSection._qualifiedName] + return [...dataStore.getAllInheritingSections(quantityDef.type._referencedSection).map(section => section._qualifiedName), quantityDef.type._referencedSection._qualifiedName] }, [dataStore, quantityDef]) const fetchSuggestions = useCallback(input => { if (fetchedSuggestionsFor.current === input) { @@ -155,7 +154,7 @@ const ReferenceEditQuantity = React.memo(function ReferenceEditQuantity(props) { const createNewEntry = useCallback((fileName) => { const archive = { data: { - m_def: getUrlFromDefinition(getReferencedSection(quantityDef), {installationUrl, uploadId}, true) + m_def: getUrlFromDefinition(quantityDef.type._referencedSection, {installationUrl, uploadId}, true) } } return new Promise((resolve, reject) => { @@ -176,7 +175,7 @@ const ReferenceEditQuantity = React.memo(function ReferenceEditQuantity(props) { reject(new Error(error)) }) }) - }, [api, quantityDef, installationUrl, uploadId]) + }, [api, quantityDef.type._referencedSection, installationUrl, uploadId]) const handleValueChange = useCallback((event, value) => { if (value?.createNewEntry) { diff --git a/gui/src/components/entry/EntryPageContext.js b/gui/src/components/entry/EntryPageContext.js index 73f5451cd1e3172b94c9237674f27a21196af82f..923c2a6abc146e77874fa0b80cc69c506b371d11 100644 --- a/gui/src/components/entry/EntryPageContext.js +++ b/gui/src/components/entry/EntryPageContext.js @@ -27,24 +27,39 @@ const entryPageContext = React.createContext() * Hook for fetching data from the current EntryPageContext. * * @param {*} requireArchive Optional query filter - * @param {*} update Whether to keep updating the data if changes are made in - * the store. Sometimes the first version of the data should be kept to avoid - * unnecessary re-renders and layout inconsistencies. + * @param {*} update Whether to keep updating the data for the original entry + * if changes beyond the first successfull archive load are made in the store. + * Sometimes the first version of the data should be kept to avoid unnecessary + * re-renders and layout inconsistencies. Note that if the entry id changes, + * the update is forced. * @returns */ export const useEntryPageContext = (requireArchive, update = true) => { const entryId = useContext(entryPageContext) const entryData = useEntryStoreObj(apiBase, entryId, true, requireArchive) const [data, setData] = useState(entryData) - const firstRender = useRef(true) + const oldEntryId = useRef() + const completed = useRef(false) + // This effect controls how the data returned by this hook is synchronized + // with the data coming from the store. If update = true, the data is always + // synchronized. If update = false, it is only synchronized until the archive + // data is fully set, or the entry changes. useEffect(() => { + const newEntryId = entryData?.entryId + const isNew = newEntryId !== oldEntryId.current if (update) { setData(entryData) - } else if (firstRender.current && entryData.archive) { + } else if (isNew || !completed.current) { setData(entryData) - firstRender.current = false + if (isNew) { + completed.current = false + } + if (entryData?.archive) { + completed.current = true + } } + oldEntryId.current = newEntryId }, [entryData, update]) return data diff --git a/gui/src/components/entry/OverviewView.spec.js b/gui/src/components/entry/OverviewView.spec.js index 7af55ffa83ce89efd9c78029a5649f3c9bdb8b45..b705f3b1af07d0bbb1c5e5d6e1bd71202de6e0a0 100644 --- a/gui/src/components/entry/OverviewView.spec.js +++ b/gui/src/components/entry/OverviewView.spec.js @@ -301,7 +301,9 @@ test.each([ const deleteButton1 = screen1.getByTitle('Delete entry').closest('button') expect(deleteButton1).toBeEnabled() await userEvent.click(deleteButton1) - const deleteMainfileButton = await screen1.findByRole('button', {name: 'Delete mainfile'}) + await waitForGUI() + const deleteButtons = screen1.queryAllByText(/delete mainfile/i) + const deleteButton = deleteButtons[0] const screen2 = render( @@ -321,11 +323,11 @@ test.each([ const inputTextField2 = within(cardSample2).queryAllByRole('textbox', { hidden: true }) await fireEvent.change(inputTextField2[0], { target: { value: 'new text 2' } }) - await userEvent.click(deleteMainfileButton) + await userEvent.click(deleteButton) + await waitForGUI() expect(saveButton2).toBeEnabled() await userEvent.click(saveButton2) - await screen2.findByText('The changes cannot be saved. The content has been modified by someone else.') closeAPI() }) diff --git a/gui/src/components/nav/Routes.js b/gui/src/components/nav/Routes.js index bbd9e4af804d6df46909ffd6e757510407cfbff3..0b72c34fb17e11536d43fb09ec911e46e3ef845d 100644 --- a/gui/src/components/nav/Routes.js +++ b/gui/src/components/nav/Routes.js @@ -202,9 +202,7 @@ const searchRoutes = ui?.search_contexts?.include resource={context.resource} initialPagination={context.pagination} initialColumns={context.columns} - initialRows={context.rows} initialFilterMenus={context.filter_menus} - initialFiltersLocked={context.filters_locked} > diff --git a/gui/src/components/search/FilterRegistry.js b/gui/src/components/search/FilterRegistry.js index ff98329f4f167ce9c5f15f24b47b95d3320190ce..3f8233d814ce596fb32948a259cfb35c30f6c673 100644 --- a/gui/src/components/search/FilterRegistry.js +++ b/gui/src/components/search/FilterRegistry.js @@ -454,15 +454,7 @@ registerFilter( // Visibility: controls the 'owner'-parameter in the API query, not part of the // query itself. -registerFilter( - 'visibility', - idAccess, - { - ...noQueryQuantity, - default: 'visible', - description: 'The visibility of the entry.' - } -) +registerFilter('visibility', idAccess, {...noQueryQuantity, default: 'visible'}) // Combine: controls whether materials search combines data from several // entries. diff --git a/gui/src/components/search/SearchContext.js b/gui/src/components/search/SearchContext.js index e29f2c28d0bcd801168522a0ec20edcb7303b4ad..a7a3174d61f67d3f16cc2dc832653908955627d5 100644 --- a/gui/src/components/search/SearchContext.js +++ b/gui/src/components/search/SearchContext.js @@ -47,8 +47,8 @@ import { v4 as uuidv4 } from 'uuid' import PropTypes from 'prop-types' import { useHistory } from 'react-router-dom' import { useApi } from '../api' -import { setToArray, authorList, formatTimestamp, getDeep, formatNumber, getDatatype } from '../../utils' -import { Quantity, Unit } from '../../units' +import { setToArray, authorList, formatTimestamp } from '../../utils' +import { Quantity } from '../../units' import { useErrors } from '../errors' import { combinePagination, addColumnDefaults } from '../datatable/Datatable' import { Published } from '../entry/EntryDetails' @@ -100,9 +100,8 @@ function clearEmpty(value) { export const searchContext = React.createContext() export const SearchContext = React.memo(({ resource, - initialFiltersLocked, + filtersLocked, initialColumns, - initialRows, initialFilterMenus, initialPagination, initialStatistics, @@ -131,34 +130,151 @@ export const SearchContext = React.memo(({ .filter(key => !columns?.exclude?.includes(key)) .map(key => ({key, ...columns.options[key]})) - // Add unit information if one is defined. This unit is currently fixed and - // not affected by global unit system. - options.forEach(option => { - const unit = option.unit - if (unit) { - option.unit = new Unit(unit) - option.label = `${option.label} (${option.unit.label()})` + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => } - }) + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) - // Determine the final render function - options.forEach(option => { - option.render = (data) => { - let value = getDeep(data, option.key) - if (isNil(value)) return value - const unit = option.unit - const format = option.format - if (unit) { - const originalUnit = searchQuantities[option.key].unit - value = new Quantity(value, originalUnit).to(option.unit).value() + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } } - if (format) { - const dtype = getDatatype(option.key) - value = formatNumber(value, dtype, format?.mode, format?.decimals) + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } } - return value + }, + published: { + render: (entry) => } - }) + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) // Custom render and sortability is enforced for a subset of columns. const overrides = { @@ -213,27 +329,6436 @@ export const SearchContext = React.memo(({ } }, [initialColumns]) - // The final row setup - const rows = useMemo(() => { - return initialRows || undefined - }, [initialRows]) + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) // The final filtered set of menus const filterMenus = useMemo(() => { - const filterMenus = cloneDeep(initialFilterMenus) - return filterMenus?.include - ? filterMenus.include - .filter(key => !filterMenus?.exclude?.includes(key)) - .map(key => { - const data = filterMenus.options[key] - if (data.actions) { - const actions = data.actions - data.actions = actions.include - .filter(action => !actions?.exclude?.includes(action)) - .map(action => ({key, ...actions.options[action]})) + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references } - return {key, ...data} - }) + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) + : undefined + }, [initialFilterMenus]) + + // The final filtered set of columns + const columns = useMemo(() => { + if (!initialColumns) return undefined + const columns = cloneDeep(initialColumns) + let options = columns.include + .filter(key => !columns?.exclude?.includes(key)) + .map(key => ({key, ...columns.options[key]})) + + // Custom render and sortability is enforced for a subset of columns. + const overrides = { + upload_create_time: { + render: row => row?.upload_create_time + ? formatTimestamp(row.upload_create_time) + : no upload time + }, + authors: { + render: row => authorList(row), + align: 'left', + sortable: false + }, + references: { + sortable: false, + render: row => { + const refs = row.references || [] + if (refs.length > 0) { + return ( +
+ {refs.map((ref, i) => + {ref}{(i + 1) < refs.length ? ', ' : } + )} +
+ ) + } else { + return no references + } + } + }, + datasets: { + sortable: false, + render: entry => { + const datasets = entry.datasets || [] + if (datasets.length > 0) { + return datasets.map(dataset => dataset.dataset_name).join(', ') + } else { + return no datasets + } + } + }, + published: { + render: (entry) => + } + } + + addColumnDefaults(options) + options = options.map( + option => ({...option, ...(overrides[option.key] || {})}) + ) + + return { + options, + enable: columns.enable + } + }, [initialColumns]) + + // The final filtered set of menus + const filterMenus = useMemo(() => { + return initialFilterMenus?.include + ? initialFilterMenus.include + .filter(key => !initialFilterMenus.exclude.includes(key)) + .map(key => ({key, ...initialFilterMenus.options[key]})) : undefined }, [initialFilterMenus]) @@ -344,7 +6869,7 @@ export const SearchContext = React.memo(({ const guiLocked = toGUIFilter(initialFiltersLocked) const lockedFamily = atomFamily({ key: `lockedFamily_${contextID}`, - default: (name) => guiLocked?.[name] + default: (name) => !isNil(guiLocked?.[name]) }) // Used to set the locked state of several filters at once @@ -855,7 +7380,7 @@ export const SearchContext = React.memo(({ useAgg, useSetFilters ] - }, [contextID, initialQuery, filters, initialFiltersLocked, finalStatistics, initialAggs, initialPagination, filterData]) + }, [contextID, initialQuery, filters, filtersLocked, finalStatistics, initialAggs, initialPagination, filterData]) const setResults = useSetRecoilState(resultsState) const setApiData = useSetRecoilState(apiDataState) @@ -1129,7 +7654,6 @@ export const SearchContext = React.memo(({ return { resource, columns, - rows, filterMenus, useIsMenuOpen: () => useRecoilValue(isMenuOpenState), useSetIsMenuOpen: () => useSetRecoilState(isMenuOpenState), @@ -1163,7 +7687,6 @@ export const SearchContext = React.memo(({ } }, [ resource, - rows, columns, filterMenus, useFilterValue, @@ -1204,9 +7727,8 @@ export const SearchContext = React.memo(({ SearchContext.propTypes = { resource: PropTypes.string, - initialFiltersLocked: PropTypes.object, + filtersLocked: PropTypes.object, initialColumns: PropTypes.object, - initialRows: PropTypes.object, initialFilterMenus: PropTypes.object, initialPagination: PropTypes.object, initialStatistics: PropTypes.object, diff --git a/gui/src/components/search/SearchPage.spec.js b/gui/src/components/search/SearchPage.spec.js index 00056f594c71a58d189b2eaf6fe3c0a729ff6df1..eeed7d974d0105172c5f3b004d743a0186a3a5c1 100644 --- a/gui/src/components/search/SearchPage.spec.js +++ b/gui/src/components/search/SearchPage.spec.js @@ -37,9 +37,7 @@ describe('', () => { resource={context.resource} initialPagination={context.pagination} initialColumns={context.columns} - initialRows={context.rows} initialFilterMenus={context.filter_menus} - initialFiltersLocked={context.filters_locked} > diff --git a/gui/src/components/search/SearchResults.js b/gui/src/components/search/SearchResults.js index a0614f7282f88073229efd66f5d1b1f32c2b77a5..a7f3466fd09ba24a9e6c604b49c9a0bde9538f2c 100644 --- a/gui/src/components/search/SearchResults.js +++ b/gui/src/components/search/SearchResults.js @@ -28,15 +28,14 @@ import { } from '../datatable/Datatable' import EntryDownloadButton from '../entry/EntryDownloadButton' import EntryDetails, { EntryRowActions } from '../entry/EntryDetails' -import { MaterialRowActions } from '../material/MaterialDetails' import { pluralize, formatInteger } from '../../utils' import { useSearchContext } from './SearchContext' /** * Displays the list of search results. */ -const SearchResults = React.memo(({'data-testid': testID}) => { - const {columns, resource, rows, useResults, useQuery} = useSearchContext() +const SearchResults = React.memo(function SearchResults() { + const {columns, useResults, useQuery} = useSearchContext() const {data, pagination, setPagination} = useResults() const searchQuery = useQuery() const [selected, setSelected] = useState([]) @@ -62,39 +61,22 @@ const SearchResults = React.memo(({'data-testid': testID}) => { return searching ... } - // Select components based on the targeted resource - let details - let actions - let buttons - if (resource === "entries") { - details = EntryDetails - actions = EntryRowActions - buttons = - } else if (resource === "materials") { - actions = MaterialRowActions - } - - return + return - {rows?.selection?.enable && - - {buttons} - - } + + + - + load more diff --git a/gui/src/components/search/conftest.spec.js b/gui/src/components/search/conftest.spec.js index 944189cfc036247c3378c1910c61f49896094e85..54f935d258d810f384877484dc4e97a775c78da2 100644 --- a/gui/src/components/search/conftest.spec.js +++ b/gui/src/components/search/conftest.spec.js @@ -19,7 +19,7 @@ import React from 'react' import PropTypes from 'prop-types' import assert from 'assert' -import { within, waitFor } from '@testing-library/dom' +import { waitFor } from '@testing-library/dom' import elementData from '../../elementData.json' import { screen, WrapperDefault } from '../conftest.spec' import { render } from '@testing-library/react' @@ -216,45 +216,13 @@ export async function expectFilterMainMenu(context, root = screen) { // Check that menu title is displayed expect(screen.getByText(`${context.resource} search`)).toBeInTheDocument() - // Check that menu item labels are displayed + // Check that menu items are displayed const menuConfig = context.filter_menus - const menuItems = menuConfig.include + const menus = menuConfig.include .filter(key => !menuConfig.exclude.includes(key)) - .map(key => ({key, ...menuConfig.options[key]})) - for (const menuItem of menuItems) { - const label = menuItem.label - if (label) { - const labelElement = screen.getByTestId(`menu-item-label-${menuItem.key}`) - expect(labelElement).toBeInTheDocument() - expect(within(labelElement).getByText(label)).toBeInTheDocument() - } - } - - // Check that action labels are displayed - const actionItems = [] - for (const menuItem of menuItems) { - for (const key of menuItem?.actions?.include || []) { - actionItems.push(menuItem.actions.options[key]) - } - } - for (const actionItem of actionItems) { - const actionLabel = actionItem.label - if (actionLabel) { - const labelElement = screen.getByText(actionLabel) - expect(labelElement).toBeInTheDocument() - expect(within(labelElement).getByText(actionLabel)).toBeInTheDocument() - } - } - - // Check that clicking the menu items with a submenu opens up the menu - for (const menuItem of menuItems) { - if (menuItem.menu_items) { - const labelMenu = screen.getByTestId(`menu-item-label-${menuItem.key}`) - const labelSubMenu = await screen.findByTestId(`filter-menu-header-${menuItem.key}`) - expect(labelSubMenu).not.toBeVisible() - await userEvent.click(labelMenu) - expect(labelSubMenu).toBeVisible() - } + .map(key => menuConfig.options[key].label) + for (const menu of menus) { + expect(screen.getByText(menu, {selector: 'span'})).toBeInTheDocument() } } @@ -274,15 +242,8 @@ export async function expectSearchResults(context, root = screen) { // Check that correct columns are displayed const columnConfig = context.columns - const columnLabels = columnConfig.enable.map(key => { - const config = columnConfig.options[key] - const unit = config.unit - const label = config.label - return unit - ? `${label} (${new Unit(unit).label()})` - : label - }) - for (const columnLabel of columnLabels) { - expect(container.getByText(columnLabel)).toBeInTheDocument() + const columns = columnConfig.enable.map(key => columnConfig.options[key].label) + for (const column of columns) { + expect(screen.getByText(column)).toBeInTheDocument() } } diff --git a/gui/src/components/search/menus/FilterMainMenu.js b/gui/src/components/search/menus/FilterMainMenu.js index 03bf3a89b19d96ddf79f6076279fceca82274953..173161d84af82f5963998ebf235f2123b2a01504 100644 --- a/gui/src/components/search/menus/FilterMainMenu.js +++ b/gui/src/components/search/menus/FilterMainMenu.js @@ -25,7 +25,6 @@ import { FilterMenuItems, FilterSubMenus } from './FilterMenu' -import { makeStyles } from '@material-ui/core/styles' import FilterSubMenuMaterial from './FilterSubMenuMaterial' import FilterSubMenuElements from './FilterSubMenuElements' import FilterSubMenuSymmetry from './FilterSubMenuSymmetry' @@ -82,6 +81,356 @@ const useFilterMainMenuStyles = makeStyles(theme => ({ } })) +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + +const menuMap = { + material: FilterSubMenuMaterial, + elements: FilterSubMenuElements, + symmetry: FilterSubMenuSymmetry, + method: FilterSubMenuMethod, + simulation: FilterSubMenuSimulation, + dft: FilterSubMenuDFT, + gw: FilterSubMenuGW, + eels: FilterSubMenuEELS, + electronic: FilterSubMenuElectronic, + optoelectronic: FilterSubMenuOptoElectronic, + vibrational: FilterSubMenuVibrational, + mechanical: FilterSubMenuMechanical, + spectroscopy: FilterSubMenuSpectroscopy, + thermodynamic: FilterSubMenuThermodynamic, + geometry_optimization: FilterSubMenuGeometryOptimization, + eln: FilterSubMenuELN, + author: FilterSubMenuAuthor, + dataset: FilterSubMenuDataset, + access: FilterSubMenuAccess, + id: FilterSubMenuIDs, + processed_data_quantities: FilterSubMenuArchive, + optimade: FilterSubMenuOptimade +} + /** * Swipable menu that shows the available filters on the left side of the * screen. @@ -113,39 +462,21 @@ const FilterMainMenu = React.memo(({ label={option.label} level={option.level} disableButton={!has(menuMap, option.key)} - actions={option?.actions && option.actions - .map((action) => { - const content = action.type === 'checkbox' - ? - : null - return content - })} /> }) : No search menus defined within this search context. Ensure that all GUI artifacts are created. - }, [filterMenus, styles]) + }, [filterMenus]) // The shown submenus const subMenus = useMemo(() => { return filterMenus ? filterMenus - .filter(option => option.menu_items) + .filter(option => has(menuMap, option.key)) .map(option => { const Comp = menuMap[option.key] - return + return }) : null }, [filterMenus]) @@ -162,7 +493,7 @@ const FilterMainMenu = React.memo(({ {menuItems} - {loaded && subMenus} + {loaded ? subMenus : null} }) diff --git a/gui/src/components/search/menus/FilterMenu.js b/gui/src/components/search/menus/FilterMenu.js index 0c9281e038f4510e5dd0e31b944ffcc7c5264da3..35813388c30fac559487bc495ab625b0e51800cb 100644 --- a/gui/src/components/search/menus/FilterMenu.js +++ b/gui/src/components/search/menus/FilterMenu.js @@ -477,15 +477,14 @@ export const FilterMenuItem = React.memo(({ classes={{gutters: styles.gutters}} onClick={handleClick && (() => handleClick(id))} > - {label && } + /> {handleClick && } @@ -641,7 +640,6 @@ const useFilterSubMenuStyles = makeStyles(theme => ({ export const FilterSubMenu = React.memo(({ id, - label, size, actions, children @@ -666,7 +664,6 @@ export const FilterSubMenu = React.memo(({ }) FilterSubMenu.propTypes = { id: PropTypes.string, - label: PropTypes.string, size: PropTypes.oneOf(['small', 'medium', 'large']), actions: PropTypes.node, children: PropTypes.node diff --git a/gui/src/config.js b/gui/src/config.js index 7e463c0782bc0bb8f72fb6f0e835e5ff3b8b5068..65d4911835f440e5cfd7a244b7fe368c7eaf0f09 100644 --- a/gui/src/config.js +++ b/gui/src/config.js @@ -16,11 +16,10 @@ * limitations under the License. */ import { createTheme } from '@material-ui/core' -import { urlAbs } from './utils' window.nomadEnv = window.nomadEnv || {} export const version = window.nomadEnv.version -export const appBase = urlAbs(window.nomadEnv.appBase.replace(/\/$/, '')) +export const appBase = window.nomadEnv.appBase.replace(/\/$/, '') export const apiBase = `${appBase}/api` export const northBase = urlAbs(window.nomadEnv.northBase) export const guiBase = process.env.PUBLIC_URL diff --git a/gui/tests/data/search/searchpage.json b/gui/tests/data/search/searchpage.json index c50bc4755b7e10049415069849c0835a205744fd..5a39887e7c89c66bb3b8910cfa85f15982b44a15 100644 --- a/gui/tests/data/search/searchpage.json +++ b/gui/tests/data/search/searchpage.json @@ -20,8 +20,7 @@ "aggregations": {}, "pagination": { "order_by": "upload_create_time", - "order": "desc", - "page_size": 20 + "order": "desc" } }, "headers": { @@ -36,132 +35,17 @@ "owner": "visible", "query": {}, "pagination": { - "page_size": 20, + "page_size": 10, "order_by": "upload_create_time", "order": "desc", "total": 4 }, "data": [ { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "jLKvVS_FQ-KiJRXC49wzHw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.143939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "functional_type": [ - "semiconductor", - "solar cell" - ], - "elements": [ - "C", - "H", - "I", - "N", - "Pb" - ], - "elements_exclusive": "C H I N Pb", - "material_id": "test_material_id", - "structural_type": "bulk", - "chemical_formula_reduced": "H6Pb1C1I3N1", - "n_elements": 5, - "chemical_formula_descriptive": "MAPbI3", - "material_name": "perovskite", - "chemical_formula_hill": "CH6I3NPb" - }, - "method": {}, - "properties": { - "optoelectronic": { - "solar_cell": { - "absorber_fabrication": [ - "Spin-coating" - ], - "efficiency": 15.9, - "device_stack": [ - "SLG", - "ITO", - "PEDOT:PSS", - "Perovskite", - "PCBM-60", - "BCP", - "Ag" - ], - "short_circuit_current_density": 203, - "hole_transport_layer": [ - "PEDOT:PSS" - ], - "fill_factor": 0.78, - "illumination_intensity": 1000, - "electron_transport_layer": [ - "PCBM-60", - "BCP" - ], - "device_area": 0.0000125, - "back_contact": [ - "Ag" - ], - "absorber": [ - "MAPbI" - ], - "open_circuit_voltage": 1, - "substrate": [ - "SLG", - "ITO" - ], - "device_architecture": "pin" - }, - "band_gap": [ - { - "value": 2.5634826144e-19 - } - ] - }, - "available_properties": [ - "solar_cell", - "optoelectronic.band_gap" - ] - } - }, - "entry_id": "jLKvVS_FQ-KiJRXC49wzHw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", + "upload_id": "k5_X2bQtRkGPLSv6Oob-uw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "fI_rhkLqQ829U8gf_BqZIg", + "calc_id": "m7fNWksjSMK3rUwglYP0uQ", "published": true, "writers": [ { @@ -171,7 +55,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", + "upload_create_time": "2022-09-23T08:43:34.189237+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -184,8 +68,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-10-25T07:20:32.140939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", + "entry_create_time": "2022-09-23T08:43:34.193237+00:00", + "publish_time": "2022-09-23T08:43:34.192237+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -220,7 +104,7 @@ }, "properties": {} }, - "entry_id": "fI_rhkLqQ829U8gf_BqZIg", + "entry_id": "m7fNWksjSMK3rUwglYP0uQ", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -230,10 +114,10 @@ "license": "CC BY 4.0" }, { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", + "upload_id": "k5_X2bQtRkGPLSv6Oob-uw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "cuJyixjeQSS2-W5ZM8VPJQ", + "calc_id": "E5TXC654S1CeAxiy9F29eQ", "published": true, "writers": [ { @@ -243,7 +127,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", + "upload_create_time": "2022-09-23T08:43:34.189237+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -256,8 +140,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-10-25T07:20:32.141939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", + "entry_create_time": "2022-09-23T08:43:34.194237+00:00", + "publish_time": "2022-09-23T08:43:34.192237+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -267,7 +151,7 @@ ], "elements_exclusive": "C", "chemical_formula_anonymous": "A", - "material_id": "jPcWsq-Rb0gtgx2krJDmLvQUxpcL", + "material_id": "test_material_id", "structural_type": "2D", "chemical_formula_reduced": "C", "n_elements": 1, @@ -291,7 +175,7 @@ }, "properties": {} }, - "entry_id": "cuJyixjeQSS2-W5ZM8VPJQ", + "entry_id": "E5TXC654S1CeAxiy9F29eQ", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -301,10 +185,10 @@ "license": "CC BY 4.0" }, { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", + "upload_id": "k5_X2bQtRkGPLSv6Oob-uw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "by5AZNRMTH6Ip5AliZ3glw", + "calc_id": "C0q53EgRRSmUIICDMEopaQ", "published": true, "writers": [ { @@ -314,7 +198,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", + "upload_create_time": "2022-09-23T08:43:34.189237+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -327,8 +211,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-10-25T07:20:32.142939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", + "entry_create_time": "2022-09-23T08:43:34.195237+00:00", + "publish_time": "2022-09-23T08:43:34.192237+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -342,7 +226,7 @@ ], "elements_exclusive": "Hf Nb Ta Ti Zr", "chemical_formula_anonymous": "ABCDE", - "material_id": "aLzu5XmhATsTfEA4sGIiL45caCMq", + "material_id": "test_material_id", "structural_type": "bulk", "chemical_formula_reduced": "HfNbTaTiZr", "n_elements": 5, @@ -366,7 +250,7 @@ }, "properties": {} }, - "entry_id": "by5AZNRMTH6Ip5AliZ3glw", + "entry_id": "C0q53EgRRSmUIICDMEopaQ", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -379,7 +263,7 @@ }, "headers": { "connection": "close", - "content-length": "9891", + "content-length": "6650", "content-type": "application/json", "server": "uvicorn" } @@ -422,10 +306,10 @@ }, "data": [ { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", + "upload_id": "k5_X2bQtRkGPLSv6Oob-uw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "by5AZNRMTH6Ip5AliZ3glw", + "calc_id": "C0q53EgRRSmUIICDMEopaQ", "published": true, "writers": [ { @@ -435,7 +319,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", + "upload_create_time": "2022-09-23T08:43:34.189237+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -448,8 +332,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-10-25T07:20:32.142939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", + "entry_create_time": "2022-09-23T08:43:34.195237+00:00", + "publish_time": "2022-09-23T08:43:34.192237+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -463,7 +347,7 @@ ], "elements_exclusive": "Hf Nb Ta Ti Zr", "chemical_formula_anonymous": "ABCDE", - "material_id": "aLzu5XmhATsTfEA4sGIiL45caCMq", + "material_id": "test_material_id", "structural_type": "bulk", "chemical_formula_reduced": "HfNbTaTiZr", "n_elements": 5, @@ -487,7 +371,7 @@ }, "properties": {} }, - "entry_id": "by5AZNRMTH6Ip5AliZ3glw", + "entry_id": "C0q53EgRRSmUIICDMEopaQ", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -497,10 +381,10 @@ "license": "CC BY 4.0" }, { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", + "upload_id": "k5_X2bQtRkGPLSv6Oob-uw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "cuJyixjeQSS2-W5ZM8VPJQ", + "calc_id": "E5TXC654S1CeAxiy9F29eQ", "published": true, "writers": [ { @@ -510,7 +394,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", + "upload_create_time": "2022-09-23T08:43:34.189237+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -523,8 +407,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-10-25T07:20:32.141939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", + "entry_create_time": "2022-09-23T08:43:34.194237+00:00", + "publish_time": "2022-09-23T08:43:34.192237+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -534,7 +418,7 @@ ], "elements_exclusive": "C", "chemical_formula_anonymous": "A", - "material_id": "jPcWsq-Rb0gtgx2krJDmLvQUxpcL", + "material_id": "test_material_id", "structural_type": "2D", "chemical_formula_reduced": "C", "n_elements": 1, @@ -558,7 +442,7 @@ }, "properties": {} }, - "entry_id": "cuJyixjeQSS2-W5ZM8VPJQ", + "entry_id": "E5TXC654S1CeAxiy9F29eQ", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -568,10 +452,10 @@ "license": "CC BY 4.0" }, { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", + "upload_id": "k5_X2bQtRkGPLSv6Oob-uw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "fI_rhkLqQ829U8gf_BqZIg", + "calc_id": "m7fNWksjSMK3rUwglYP0uQ", "published": true, "writers": [ { @@ -581,7 +465,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", + "upload_create_time": "2022-09-23T08:43:34.189237+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -594,8 +478,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-10-25T07:20:32.140939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", + "entry_create_time": "2022-09-23T08:43:34.193237+00:00", + "publish_time": "2022-09-23T08:43:34.192237+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -630,122 +514,7 @@ }, "properties": {} }, - "entry_id": "fI_rhkLqQ829U8gf_BqZIg", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "jLKvVS_FQ-KiJRXC49wzHw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.143939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "functional_type": [ - "semiconductor", - "solar cell" - ], - "elements": [ - "C", - "H", - "I", - "N", - "Pb" - ], - "elements_exclusive": "C H I N Pb", - "material_id": "test_material_id", - "structural_type": "bulk", - "chemical_formula_reduced": "H6Pb1C1I3N1", - "n_elements": 5, - "chemical_formula_descriptive": "MAPbI3", - "material_name": "perovskite", - "chemical_formula_hill": "CH6I3NPb" - }, - "method": {}, - "properties": { - "optoelectronic": { - "solar_cell": { - "absorber_fabrication": [ - "Spin-coating" - ], - "efficiency": 15.9, - "device_stack": [ - "SLG", - "ITO", - "PEDOT:PSS", - "Perovskite", - "PCBM-60", - "BCP", - "Ag" - ], - "short_circuit_current_density": 203, - "hole_transport_layer": [ - "PEDOT:PSS" - ], - "fill_factor": 0.78, - "illumination_intensity": 1000, - "electron_transport_layer": [ - "PCBM-60", - "BCP" - ], - "device_area": 0.0000125, - "back_contact": [ - "Ag" - ], - "absorber": [ - "MAPbI" - ], - "open_circuit_voltage": 1, - "substrate": [ - "SLG", - "ITO" - ], - "device_architecture": "pin" - }, - "band_gap": [ - { - "value": 2.5634826144e-19 - } - ] - }, - "available_properties": [ - "solar_cell", - "optoelectronic.band_gap" - ] - } - }, - "entry_id": "jLKvVS_FQ-KiJRXC49wzHw", + "entry_id": "m7fNWksjSMK3rUwglYP0uQ", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -758,7 +527,7 @@ }, "headers": { "connection": "close", - "content-length": "9897", + "content-length": "6656", "content-type": "application/json", "server": "uvicorn" } @@ -801,7 +570,7 @@ "optimade_filter" ] ], - "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* NOT\n\t* ESCAPED_STRING\n\t* SIGNED_INT\n\t* LPAR\n\t* SIGNED_FLOAT\n\t* IDENTIFIER\n", + "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* SIGNED_FLOAT\n\t* SIGNED_INT\n\t* ESCAPED_STRING\n\t* IDENTIFIER\n\t* NOT\n\t* LPAR\n", "type": "value_error.exception" } ] @@ -813,75 +582,27 @@ "server": "uvicorn" } } - }, + } + ], + "cd2b263727fb2d6704d7b6a1e68a2c83": [ { "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", + "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/archive/query", "method": "POST", "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], "owner": "visible", - "query": {}, - "aggregations": { - "results.material.structural_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 7, - "type": "terms", - "changed": true, - "quantity": "results.material.structural_type" - } - }, - "results.material.functional_type:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.functional_type" - } - }, - "results.material.compound_type:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.compound_type" - } - }, - "results.material.material_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.material_name" - } - } - }, - "pagination": { - "page_size": 0 + "query": { + "quantities": "definitions.section_definitions", + "processed": true }, "required": { - "include": [] + "metadata": { + "entry_id": "*" + } } }, "headers": { - "accept": "application/json, text/plain, */*", + "accept": "application/json", "content-type": "application/json", "cookie": null } @@ -890,9925 +611,34 @@ "status": 200, "body": { "owner": "visible", - "query": {}, + "query": { + "and": [ + { + "name": "quantities", + "value": "definitions.section_definitions" + }, + { + "name": "processed", + "value": true + } + ] + }, "pagination": { - "page_size": 0, + "page_size": 10, "order_by": "entry_id", "order": "asc", - "total": 4 + "total": 0 }, "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.material.structural_type:scroll": { - "terms": { - "quantity": "results.material.structural_type", - "exclude_from_search": true, - "metrics": [], - "size": 7, - "data": [ - { - "count": 2, - "nested_count": 2, - "value": "bulk" - }, - { - "count": 1, - "nested_count": 1, - "value": "2D" - }, - { - "count": 1, - "nested_count": 1, - "value": "molecule / cluster" - } - ] - } - }, - "results.material.functional_type:scroll": { - "terms": { - "quantity": "results.material.functional_type", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "semiconductor" - }, - { - "count": 1, - "nested_count": 1, - "value": "solar cell" - } - ] - } - }, - "results.material.compound_type:scroll": { - "terms": { - "quantity": "results.material.compound_type", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.material.material_name:scroll": { - "terms": { - "quantity": "results.material.material_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "perovskite" - } - ] - } + "metadata": { + "entry_id": "*" } }, "data": [] }, "headers": { "connection": "close", - "content-length": "1883", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "verify_only": true, - "owner": "public", - "query": { - "optimade_filter": "." - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 422, - "body": { - "detail": [ - { - "loc": [ - [ - "optimade_filter" - ] - ], - "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* NOT\n\t* ESCAPED_STRING\n\t* SIGNED_INT\n\t* LPAR\n\t* SIGNED_FLOAT\n\t* IDENTIFIER\n", - "type": "value_error.exception" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "361", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.material.elements:default": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 119, - "type": "terms", - "changed": true, - "quantity": "results.material.elements" - } - }, - "results.material.n_elements:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "interval": 1, - "changed": true, - "quantity": "results.material.n_elements" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.material.elements:default": { - "terms": { - "quantity": "results.material.elements", - "exclude_from_search": false, - "metrics": [], - "size": 119, - "data": [ - { - "count": 3, - "nested_count": 3, - "value": "C" - }, - { - "count": 2, - "nested_count": 2, - "value": "H" - }, - { - "count": 1, - "nested_count": 1, - "value": "Hf" - }, - { - "count": 1, - "nested_count": 1, - "value": "I" - }, - { - "count": 1, - "nested_count": 1, - "value": "N" - }, - { - "count": 1, - "nested_count": 1, - "value": "Nb" - }, - { - "count": 1, - "nested_count": 1, - "value": "Pb" - }, - { - "count": 1, - "nested_count": 1, - "value": "Ta" - }, - { - "count": 1, - "nested_count": 1, - "value": "Ti" - }, - { - "count": 1, - "nested_count": 1, - "value": "Zr" - } - ] - } - }, - "results.material.n_elements:default_histogram": { - "histogram": { - "quantity": "results.material.n_elements", - "exclude_from_search": true, - "metrics": [], - "interval": 1, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1 - }, - { - "count": 1, - "nested_count": 1, - "value": 2 - }, - { - "count": 0, - "nested_count": 0, - "value": 3 - }, - { - "count": 0, - "nested_count": 0, - "value": 4 - }, - { - "count": 2, - "nested_count": 2, - "value": 5 - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "2312", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.material.symmetry.bravais_lattice:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 14, - "type": "terms", - "changed": true, - "quantity": "results.material.symmetry.bravais_lattice" - } - }, - "results.material.symmetry.crystal_system:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 7, - "type": "terms", - "changed": true, - "quantity": "results.material.symmetry.crystal_system" - } - }, - "results.material.symmetry.structure_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.symmetry.structure_name" - } - }, - "results.material.symmetry.strukturbericht_designation:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.symmetry.strukturbericht_designation" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.material.symmetry.bravais_lattice:scroll": { - "terms": { - "quantity": "results.material.symmetry.bravais_lattice", - "exclude_from_search": true, - "metrics": [], - "size": 14, - "data": [] - } - }, - "results.material.symmetry.crystal_system:scroll": { - "terms": { - "quantity": "results.material.symmetry.crystal_system", - "exclude_from_search": true, - "metrics": [], - "size": 7, - "data": [] - } - }, - "results.material.symmetry.structure_name:scroll": { - "terms": { - "quantity": "results.material.symmetry.structure_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.material.symmetry.strukturbericht_designation:scroll": { - "terms": { - "quantity": "results.material.symmetry.strukturbericht_designation", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1277", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.method.method_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.method.method_name" - } - }, - "results.method.workflow_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 15, - "type": "terms", - "changed": true, - "quantity": "results.method.workflow_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.method.method_name:scroll": { - "terms": { - "quantity": "results.method.method_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.method.workflow_name:scroll": { - "terms": { - "quantity": "results.method.workflow_name", - "exclude_from_search": true, - "metrics": [], - "size": 15, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "695", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.method.simulation.program_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.method.simulation.program_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.method.simulation.program_name:scroll": { - "terms": { - "quantity": "results.method.simulation.program_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 2, - "nested_count": 2, - "value": "VASP" - }, - { - "count": 1, - "nested_count": 1, - "value": "exciting" - }, - { - "count": 0, - "value": "ABACUS" - }, - { - "count": 0, - "value": "ABINIT" - }, - { - "count": 0, - "value": "AFLOW" - }, - { - "count": 0, - "value": "Amber" - }, - { - "count": 0, - "value": "AMS" - }, - { - "count": 0, - "value": "ASAP" - }, - { - "count": 0, - "value": "ASR" - }, - { - "count": 0, - "value": "Atomate" - }, - { - "count": 0, - "value": "BigDFT" - }, - { - "count": 0, - "value": "CASTEP" - }, - { - "count": 0, - "value": "CHARMM" - }, - { - "count": 0, - "value": "CP2K" - }, - { - "count": 0, - "value": "CPMD" - }, - { - "count": 0, - "value": "CRYSTAL" - }, - { - "count": 0, - "value": "DFTB+" - }, - { - "count": 0, - "value": "DL_POLY" - }, - { - "count": 0, - "value": "DMol3" - }, - { - "count": 0, - "value": "EELSDB" - }, - { - "count": 0, - "value": "ElaStic" - }, - { - "count": 0, - "value": "Elk" - }, - { - "count": 0, - "value": "FHI-aims" - }, - { - "count": 0, - "value": "FHI-vibes" - }, - { - "count": 0, - "value": "FLEUR" - }, - { - "count": 0, - "value": "FPLO" - }, - { - "count": 0, - "value": "GAMESS" - }, - { - "count": 0, - "value": "Gaussian" - }, - { - "count": 0, - "value": "GPAW" - }, - { - "count": 0, - "value": "GROMACS" - }, - { - "count": 0, - "value": "GROMOS" - }, - { - "count": 0, - "value": "GULP" - }, - { - "count": 0, - "value": "LAMMPS" - }, - { - "count": 0, - "value": "libAtoms" - }, - { - "count": 0, - "value": "LOBSTER" - }, - { - "count": 0, - "value": "MOFStructures" - }, - { - "count": 0, - "value": "Molcas" - }, - { - "count": 0, - "value": "MOPAC" - }, - { - "count": 0, - "value": "NAMD" - }, - { - "count": 0, - "value": "NeXus" - }, - { - "count": 0, - "value": "NWChem" - }, - { - "count": 0, - "value": "Octopus" - }, - { - "count": 0, - "value": "ONETEP" - }, - { - "count": 0, - "value": "OpenKIM" - }, - { - "count": 0, - "value": "OpenMX" - }, - { - "count": 0, - "value": "ORCA" - }, - { - "count": 0, - "value": "phonopy" - }, - { - "count": 0, - "value": "Psi4" - }, - { - "count": 0, - "value": "Qball" - }, - { - "count": 0, - "value": "Qbox" - }, - { - "count": 0, - "value": "QuantumATK" - }, - { - "count": 0, - "value": "QuantumESPRESSO" - }, - { - "count": 0, - "value": "QuantumEspressoEPW" - }, - { - "count": 0, - "value": "QuantumEspressPhonon" - }, - { - "count": 0, - "value": "SIESTA" - }, - { - "count": 0, - "value": "Tinker" - }, - { - "count": 0, - "value": "TURBOMOLE" - }, - { - "count": 0, - "value": "WIEN2k" - }, - { - "count": 0, - "value": "YAMBO" - }, - { - "count": 0, - "value": "unavailable" - }, - { - "count": 0, - "value": "not processed" - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "5421", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.method.simulation.dft.xc_functional_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 8, - "type": "terms", - "changed": true, - "quantity": "results.method.simulation.dft.xc_functional_type" - } - }, - "results.method.simulation.dft.xc_functional_names:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.method.simulation.dft.xc_functional_names" - } - }, - "results.method.simulation.dft.basis_set_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 7, - "type": "terms", - "changed": true, - "quantity": "results.method.simulation.dft.basis_set_type" - } - }, - "results.method.simulation.dft.core_electron_treatment:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 4, - "type": "terms", - "changed": true, - "quantity": "results.method.simulation.dft.core_electron_treatment" - } - }, - "results.method.simulation.dft.relativity_method:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 3, - "type": "terms", - "changed": true, - "quantity": "results.method.simulation.dft.relativity_method" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.method.simulation.dft.xc_functional_type:scroll": { - "terms": { - "quantity": "results.method.simulation.dft.xc_functional_type", - "exclude_from_search": true, - "metrics": [], - "size": 8, - "data": [ - { - "count": 3, - "nested_count": 3, - "value": "not processed" - } - ] - } - }, - "results.method.simulation.dft.xc_functional_names:scroll": { - "terms": { - "quantity": "results.method.simulation.dft.xc_functional_names", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 2, - "nested_count": 2, - "value": "GGA_C_PBE_SOL" - }, - { - "count": 2, - "nested_count": 2, - "value": "GGA_X_PBE_SOL" - }, - { - "count": 1, - "nested_count": 1, - "value": "LDA_C_PZ" - }, - { - "count": 1, - "nested_count": 1, - "value": "LDA_X_PZ" - } - ] - } - }, - "results.method.simulation.dft.basis_set_type:scroll": { - "terms": { - "quantity": "results.method.simulation.dft.basis_set_type", - "exclude_from_search": true, - "metrics": [], - "size": 7, - "data": [ - { - "count": 3, - "nested_count": 3, - "value": "unavailable" - } - ] - } - }, - "results.method.simulation.dft.core_electron_treatment:scroll": { - "terms": { - "quantity": "results.method.simulation.dft.core_electron_treatment", - "exclude_from_search": true, - "metrics": [], - "size": 4, - "data": [ - { - "count": 3, - "nested_count": 3, - "value": "unavailable" - } - ] - } - }, - "results.method.simulation.dft.relativity_method:scroll": { - "terms": { - "quantity": "results.method.simulation.dft.relativity_method", - "exclude_from_search": true, - "metrics": [], - "size": 3, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "2419", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.method.simulation.gw.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 6, - "type": "terms", - "changed": true, - "quantity": "results.method.simulation.gw.type" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.method.simulation.gw.type:scroll": { - "terms": { - "quantity": "results.method.simulation.gw.type", - "exclude_from_search": true, - "metrics": [], - "size": 6, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "481", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.properties.spectroscopy.eels.resolution:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.spectroscopy.eels.resolution" - } - }, - "results.properties.spectroscopy.eels.min_energy:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.spectroscopy.eels.min_energy" - } - }, - "results.properties.spectroscopy.eels.max_energy:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.spectroscopy.eels.max_energy" - } - }, - "results.properties.spectroscopy.eels.detector_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.spectroscopy.eels.detector_type" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.properties.spectroscopy.eels.resolution:default_histogram": { - "histogram": { - "quantity": "results.properties.spectroscopy.eels.resolution", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.spectroscopy.eels.min_energy:default_histogram": { - "histogram": { - "quantity": "results.properties.spectroscopy.eels.min_energy", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.spectroscopy.eels.max_energy:default_histogram": { - "histogram": { - "quantity": "results.properties.spectroscopy.eels.max_energy", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.spectroscopy.eels.detector_type:scroll": { - "terms": { - "quantity": "results.properties.spectroscopy.eels.detector_type", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1367", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "electronic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "results.properties.available_properties", - "include": [ - "electronic.band_structure_electronic.band_gap", - "band_structure_electronic", - "dos_electronic" - ], - "update": true, - "type": "terms", - "size": 3, - "changed": true - } - }, - "results.properties.electronic.band_structure_electronic.band_gap.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "type": "terms", - "changed": true, - "quantity": "results.properties.electronic.band_structure_electronic.band_gap.type" - } - }, - "results.properties.electronic.band_structure_electronic.band_gap.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.electronic.band_structure_electronic.band_gap.value" - } - }, - "results.properties.electronic.band_structure_electronic.spin_polarized:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "include": [ - "false", - "true" - ], - "type": "terms", - "changed": true, - "quantity": "results.properties.electronic.band_structure_electronic.spin_polarized" - } - }, - "results.properties.electronic.dos_electronic.spin_polarized:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "include": [ - "false", - "true" - ], - "type": "terms", - "changed": true, - "quantity": "results.properties.electronic.dos_electronic.spin_polarized" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "electronic_properties:scroll": { - "terms": { - "quantity": "results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 3, - "include": [ - "electronic.band_structure_electronic.band_gap", - "band_structure_electronic", - "dos_electronic" - ], - "data": [] - } - }, - "results.properties.electronic.band_structure_electronic.band_gap.type:scroll": { - "terms": { - "quantity": "results.properties.electronic.band_structure_electronic.band_gap.type", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "data": [] - } - }, - "results.properties.electronic.band_structure_electronic.band_gap.value:default_histogram": { - "histogram": { - "quantity": "results.properties.electronic.band_structure_electronic.band_gap.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.electronic.band_structure_electronic.spin_polarized:scroll": { - "terms": { - "quantity": "results.properties.electronic.band_structure_electronic.spin_polarized", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "include": [ - "false", - "true" - ], - "data": [] - } - }, - "results.properties.electronic.dos_electronic.spin_polarized:scroll": { - "terms": { - "quantity": "results.properties.electronic.dos_electronic.spin_polarized", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "include": [ - "false", - "true" - ], - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "2008", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "optoelectronic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "results.properties.available_properties", - "include": [ - "optoelectronic.band_gap", - "solar_cell" - ], - "update": true, - "type": "terms", - "size": 2, - "changed": true - } - }, - "results.properties.optoelectronic.band_gap.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.band_gap.type" - } - }, - "results.properties.optoelectronic.band_gap.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.band_gap.value" - } - }, - "results.properties.optoelectronic.solar_cell.efficiency:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.efficiency" - } - }, - "results.properties.optoelectronic.solar_cell.fill_factor:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.fill_factor" - } - }, - "results.properties.optoelectronic.solar_cell.open_circuit_voltage:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.open_circuit_voltage" - } - }, - "results.properties.optoelectronic.solar_cell.short_circuit_current_density:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.short_circuit_current_density" - } - }, - "results.properties.optoelectronic.solar_cell.illumination_intensity:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.illumination_intensity" - } - }, - "results.properties.optoelectronic.solar_cell.device_area:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.device_area" - } - }, - "results.properties.optoelectronic.solar_cell.device_architecture:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.device_architecture" - } - }, - "results.properties.optoelectronic.solar_cell.device_stack:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.device_stack" - } - }, - "results.properties.optoelectronic.solar_cell.absorber:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.absorber" - } - }, - "results.properties.optoelectronic.solar_cell.absorber_fabrication:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.absorber_fabrication" - } - }, - "results.properties.optoelectronic.solar_cell.electron_transport_layer:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.electron_transport_layer" - } - }, - "results.properties.optoelectronic.solar_cell.hole_transport_layer:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.hole_transport_layer" - } - }, - "results.properties.optoelectronic.solar_cell.substrate:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.substrate" - } - }, - "results.properties.optoelectronic.solar_cell.back_contact:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.back_contact" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "optoelectronic_properties:scroll": { - "terms": { - "quantity": "results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 2, - "include": [ - "optoelectronic.band_gap", - "solar_cell" - ], - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "optoelectronic.band_gap" - }, - { - "count": 1, - "nested_count": 1, - "value": "solar_cell" - } - ] - } - }, - "results.properties.optoelectronic.band_gap.type:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.band_gap.type", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "data": [] - } - }, - "results.properties.optoelectronic.band_gap.value:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.band_gap.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 2.5634826144e-19, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 2.5634826144e-19 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.efficiency:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.efficiency", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 15.9, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 15.9 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.fill_factor:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.fill_factor", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 0.78, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 0.78 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.open_circuit_voltage:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.open_circuit_voltage", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.short_circuit_current_density:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.short_circuit_current_density", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 203, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 203 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.illumination_intensity:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.illumination_intensity", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1000, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1000 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_area:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.device_area", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 0.0000125, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 0.0000125 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_architecture:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.device_architecture", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "pin" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_stack:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.device_stack", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Ag" - }, - { - "count": 1, - "nested_count": 1, - "value": "BCP" - }, - { - "count": 1, - "nested_count": 1, - "value": "ITO" - }, - { - "count": 1, - "nested_count": 1, - "value": "PCBM-60" - }, - { - "count": 1, - "nested_count": 1, - "value": "PEDOT:PSS" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.absorber:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.absorber", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "MAPbI" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.absorber_fabrication:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.absorber_fabrication", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Spin-coating" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.electron_transport_layer:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.electron_transport_layer", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "BCP" - }, - { - "count": 1, - "nested_count": 1, - "value": "PCBM-60" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.hole_transport_layer:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.hole_transport_layer", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "PEDOT:PSS" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.substrate:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.substrate", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "ITO" - }, - { - "count": 1, - "nested_count": 1, - "value": "SLG" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.back_contact:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.back_contact", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Ag" - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "8195", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "vibrational_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "results.properties.available_properties", - "include": [ - "dos_phonon", - "band_structure_phonon", - "energy_free_helmholtz", - "heat_capacity_constant_volume" - ], - "update": true, - "type": "terms", - "size": 4, - "changed": true - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "vibrational_properties:scroll": { - "terms": { - "quantity": "results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 4, - "include": [ - "dos_phonon", - "band_structure_phonon", - "energy_free_helmholtz", - "heat_capacity_constant_volume" - ], - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "645", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "mechanical_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "results.properties.available_properties", - "include": [ - "bulk_modulus", - "shear_modulus", - "energy_volume_curve" - ], - "update": true, - "type": "terms", - "size": 3, - "changed": true - } - }, - "results.properties.mechanical.bulk_modulus.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.mechanical.bulk_modulus.type" - } - }, - "results.properties.mechanical.bulk_modulus.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.mechanical.bulk_modulus.value" - } - }, - "results.properties.mechanical.shear_modulus.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 3, - "type": "terms", - "changed": true, - "quantity": "results.properties.mechanical.shear_modulus.type" - } - }, - "results.properties.mechanical.shear_modulus.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.mechanical.shear_modulus.value" - } - }, - "results.properties.mechanical.energy_volume_curve.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.mechanical.energy_volume_curve.type" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "mechanical_properties:scroll": { - "terms": { - "quantity": "results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 3, - "include": [ - "bulk_modulus", - "shear_modulus", - "energy_volume_curve" - ], - "data": [] - } - }, - "results.properties.mechanical.bulk_modulus.type:scroll": { - "terms": { - "quantity": "results.properties.mechanical.bulk_modulus.type", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.properties.mechanical.bulk_modulus.value:default_histogram": { - "histogram": { - "quantity": "results.properties.mechanical.bulk_modulus.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.mechanical.shear_modulus.type:scroll": { - "terms": { - "quantity": "results.properties.mechanical.shear_modulus.type", - "exclude_from_search": true, - "metrics": [], - "size": 3, - "data": [] - } - }, - "results.properties.mechanical.shear_modulus.value:default_histogram": { - "histogram": { - "quantity": "results.properties.mechanical.shear_modulus.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.mechanical.energy_volume_curve.type:scroll": { - "terms": { - "quantity": "results.properties.mechanical.energy_volume_curve.type", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1978", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "spectroscopic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "results.properties.available_properties", - "include": [ - "eels" - ], - "update": true, - "type": "terms", - "size": 1, - "changed": true - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "spectroscopic_properties:scroll": { - "terms": { - "quantity": "results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 1, - "include": [ - "eels" - ], - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "528", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "thermodynamic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "results.properties.available_properties", - "include": [ - "trajectory" - ], - "update": true, - "type": "terms", - "size": 1, - "changed": true - } - }, - "results.properties.thermodynamic.trajectory.available_properties:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 4, - "type": "terms", - "changed": true, - "quantity": "results.properties.thermodynamic.trajectory.available_properties" - } - }, - "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.ensemble_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 4, - "type": "terms", - "changed": true, - "quantity": "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.ensemble_type" - } - }, - "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.time_step:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.time_step" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "thermodynamic_properties:scroll": { - "terms": { - "quantity": "results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 1, - "include": [ - "trajectory" - ], - "data": [] - } - }, - "results.properties.thermodynamic.trajectory.available_properties:scroll": { - "terms": { - "quantity": "results.properties.thermodynamic.trajectory.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 4, - "data": [] - } - }, - "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.ensemble_type:scroll": { - "terms": { - "quantity": "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.ensemble_type", - "exclude_from_search": true, - "metrics": [], - "size": 4, - "data": [] - } - }, - "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.time_step:default_histogram": { - "histogram": { - "quantity": "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.time_step", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1539", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.properties.geometry_optimization.final_energy_difference:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.geometry_optimization.final_energy_difference" - } - }, - "results.properties.geometry_optimization.final_force_maximum:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.geometry_optimization.final_force_maximum" - } - }, - "results.properties.geometry_optimization.final_displacement_maximum:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.geometry_optimization.final_displacement_maximum" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.properties.geometry_optimization.final_energy_difference:default_histogram": { - "histogram": { - "quantity": "results.properties.geometry_optimization.final_energy_difference", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.geometry_optimization.final_force_maximum:default_histogram": { - "histogram": { - "quantity": "results.properties.geometry_optimization.final_force_maximum", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.geometry_optimization.final_displacement_maximum:default_histogram": { - "histogram": { - "quantity": "results.properties.geometry_optimization.final_displacement_maximum", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1196", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.eln.sections:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.sections" - } - }, - "results.eln.tags:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.tags" - } - }, - "results.eln.methods:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.methods" - } - }, - "results.eln.instruments:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.instruments" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.eln.sections:scroll": { - "terms": { - "quantity": "results.eln.sections", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.tags:scroll": { - "terms": { - "quantity": "results.eln.tags", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.methods:scroll": { - "terms": { - "quantity": "results.eln.methods", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.instruments:scroll": { - "terms": { - "quantity": "results.eln.instruments", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1084", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "external_db:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 6, - "type": "terms", - "changed": true, - "quantity": "external_db" - } - }, - "upload_create_time:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "upload_create_time" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "external_db:scroll": { - "terms": { - "quantity": "external_db", - "exclude_from_search": true, - "metrics": [], - "size": 6, - "data": [] - } - }, - "upload_create_time:default_histogram": { - "histogram": { - "quantity": "upload_create_time", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1666682432136, - "data": [ - { - "count": 4, - "nested_count": 4, - "value": 1666682432136 - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "823", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "datasets.dataset_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 10, - "type": "terms", - "changed": true, - "quantity": "datasets.dataset_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "datasets.dataset_name:scroll": { - "terms": { - "quantity": "datasets.dataset_name", - "exclude_from_search": true, - "metrics": [], - "size": 10, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "458", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": {}, - "pagination": { - "order_by": "upload_create_time", - "order": "desc", - "page_size": 20 - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 20, - "order_by": "upload_create_time", - "order": "desc", - "total": 4 - }, - "data": [ - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "jLKvVS_FQ-KiJRXC49wzHw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.143939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "functional_type": [ - "semiconductor", - "solar cell" - ], - "elements": [ - "C", - "H", - "I", - "N", - "Pb" - ], - "elements_exclusive": "C H I N Pb", - "material_id": "test_material_id", - "structural_type": "bulk", - "chemical_formula_reduced": "H6Pb1C1I3N1", - "n_elements": 5, - "chemical_formula_descriptive": "MAPbI3", - "material_name": "perovskite", - "chemical_formula_hill": "CH6I3NPb" - }, - "method": {}, - "properties": { - "optoelectronic": { - "solar_cell": { - "absorber_fabrication": [ - "Spin-coating" - ], - "efficiency": 15.9, - "device_stack": [ - "SLG", - "ITO", - "PEDOT:PSS", - "Perovskite", - "PCBM-60", - "BCP", - "Ag" - ], - "short_circuit_current_density": 203, - "hole_transport_layer": [ - "PEDOT:PSS" - ], - "fill_factor": 0.78, - "illumination_intensity": 1000, - "electron_transport_layer": [ - "PCBM-60", - "BCP" - ], - "device_area": 0.0000125, - "back_contact": [ - "Ag" - ], - "absorber": [ - "MAPbI" - ], - "open_circuit_voltage": 1, - "substrate": [ - "SLG", - "ITO" - ], - "device_architecture": "pin" - }, - "band_gap": [ - { - "value": 2.5634826144e-19 - } - ] - }, - "available_properties": [ - "solar_cell", - "optoelectronic.band_gap" - ] - } - }, - "entry_id": "jLKvVS_FQ-KiJRXC49wzHw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "fI_rhkLqQ829U8gf_BqZIg", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.140939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "C", - "H" - ], - "elements_exclusive": "C H", - "chemical_formula_anonymous": "AB2", - "material_id": "test_material_id", - "structural_type": "molecule / cluster", - "chemical_formula_reduced": "CH3", - "n_elements": 2, - "chemical_formula_descriptive": "CH3", - "chemical_formula_hill": "CH3" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "GGA_X_PBE_SOL", - "GGA_C_PBE_SOL" - ] - }, - "program_name": "VASP" - } - }, - "properties": {} - }, - "entry_id": "fI_rhkLqQ829U8gf_BqZIg", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "cuJyixjeQSS2-W5ZM8VPJQ", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.141939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "C" - ], - "elements_exclusive": "C", - "chemical_formula_anonymous": "A", - "material_id": "jPcWsq-Rb0gtgx2krJDmLvQUxpcL", - "structural_type": "2D", - "chemical_formula_reduced": "C", - "n_elements": 1, - "chemical_formula_descriptive": "C", - "chemical_formula_hill": "C" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "LDA_X_PZ", - "LDA_C_PZ" - ] - }, - "program_name": "exciting" - } - }, - "properties": {} - }, - "entry_id": "cuJyixjeQSS2-W5ZM8VPJQ", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "by5AZNRMTH6Ip5AliZ3glw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.142939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "Hf", - "Nb", - "Ta", - "Ti", - "Zr" - ], - "elements_exclusive": "Hf Nb Ta Ti Zr", - "chemical_formula_anonymous": "ABCDE", - "material_id": "aLzu5XmhATsTfEA4sGIiL45caCMq", - "structural_type": "bulk", - "chemical_formula_reduced": "HfNbTaTiZr", - "n_elements": 5, - "chemical_formula_descriptive": "HfNbTaTiZr", - "chemical_formula_hill": "HfNbTaTiZr" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "GGA_X_PBE_SOL", - "GGA_C_PBE_SOL" - ] - }, - "program_name": "VASP" - } - }, - "properties": {} - }, - "entry_id": "by5AZNRMTH6Ip5AliZ3glw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "9891", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.material.structural_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 7, - "type": "terms", - "changed": true, - "quantity": "results.material.structural_type" - } - }, - "results.material.functional_type:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.functional_type" - } - }, - "results.material.compound_type:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.compound_type" - } - }, - "results.material.material_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.material_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.material.structural_type:scroll": { - "terms": { - "quantity": "results.material.structural_type", - "exclude_from_search": true, - "metrics": [], - "size": 7, - "data": [ - { - "count": 2, - "nested_count": 2, - "value": "bulk" - }, - { - "count": 1, - "nested_count": 1, - "value": "2D" - }, - { - "count": 1, - "nested_count": 1, - "value": "molecule / cluster" - } - ] - } - }, - "results.material.functional_type:scroll": { - "terms": { - "quantity": "results.material.functional_type", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "semiconductor" - }, - { - "count": 1, - "nested_count": 1, - "value": "solar cell" - } - ] - } - }, - "results.material.compound_type:scroll": { - "terms": { - "quantity": "results.material.compound_type", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.material.material_name:scroll": { - "terms": { - "quantity": "results.material.material_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "perovskite" - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1883", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.material.elements:default": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 119, - "type": "terms", - "changed": true, - "quantity": "results.material.elements" - } - }, - "results.material.n_elements:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "interval": 1, - "changed": true, - "quantity": "results.material.n_elements" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.material.elements:default": { - "terms": { - "quantity": "results.material.elements", - "exclude_from_search": false, - "metrics": [], - "size": 119, - "data": [ - { - "count": 3, - "nested_count": 3, - "value": "C" - }, - { - "count": 2, - "nested_count": 2, - "value": "H" - }, - { - "count": 1, - "nested_count": 1, - "value": "Hf" - }, - { - "count": 1, - "nested_count": 1, - "value": "I" - }, - { - "count": 1, - "nested_count": 1, - "value": "N" - }, - { - "count": 1, - "nested_count": 1, - "value": "Nb" - }, - { - "count": 1, - "nested_count": 1, - "value": "Pb" - }, - { - "count": 1, - "nested_count": 1, - "value": "Ta" - }, - { - "count": 1, - "nested_count": 1, - "value": "Ti" - }, - { - "count": 1, - "nested_count": 1, - "value": "Zr" - } - ] - } - }, - "results.material.n_elements:default_histogram": { - "histogram": { - "quantity": "results.material.n_elements", - "exclude_from_search": true, - "metrics": [], - "interval": 1, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1 - }, - { - "count": 1, - "nested_count": 1, - "value": 2 - }, - { - "count": 0, - "nested_count": 0, - "value": 3 - }, - { - "count": 0, - "nested_count": 0, - "value": 4 - }, - { - "count": 2, - "nested_count": 2, - "value": 5 - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "2312", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.eln.sections:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.sections" - } - }, - "results.eln.tags:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.tags" - } - }, - "results.eln.methods:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.methods" - } - }, - "results.eln.instruments:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.instruments" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.eln.sections:scroll": { - "terms": { - "quantity": "results.eln.sections", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.tags:scroll": { - "terms": { - "quantity": "results.eln.tags", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.methods:scroll": { - "terms": { - "quantity": "results.eln.methods", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.instruments:scroll": { - "terms": { - "quantity": "results.eln.instruments", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1084", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "external_db:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 6, - "type": "terms", - "changed": true, - "quantity": "external_db" - } - }, - "upload_create_time:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "upload_create_time" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "external_db:scroll": { - "terms": { - "quantity": "external_db", - "exclude_from_search": true, - "metrics": [], - "size": 6, - "data": [] - } - }, - "upload_create_time:default_histogram": { - "histogram": { - "quantity": "upload_create_time", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1666682432136, - "data": [ - { - "count": 4, - "nested_count": 4, - "value": 1666682432136 - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "823", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "datasets.dataset_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 10, - "type": "terms", - "changed": true, - "quantity": "datasets.dataset_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "datasets.dataset_name:scroll": { - "terms": { - "quantity": "datasets.dataset_name", - "exclude_from_search": true, - "metrics": [], - "size": 10, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "458", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "dft.labels", - "dft.geometries" - ], - "owner": "visible" - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [] - }, - "pagination": { - "page_size": 10, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "data": [ - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "by5AZNRMTH6Ip5AliZ3glw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.142939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "Hf", - "Nb", - "Ta", - "Ti", - "Zr" - ], - "elements_exclusive": "Hf Nb Ta Ti Zr", - "chemical_formula_anonymous": "ABCDE", - "material_id": "aLzu5XmhATsTfEA4sGIiL45caCMq", - "structural_type": "bulk", - "chemical_formula_reduced": "HfNbTaTiZr", - "n_elements": 5, - "chemical_formula_descriptive": "HfNbTaTiZr", - "chemical_formula_hill": "HfNbTaTiZr" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "GGA_X_PBE_SOL", - "GGA_C_PBE_SOL" - ] - }, - "program_name": "VASP" - } - }, - "properties": {} - }, - "entry_id": "by5AZNRMTH6Ip5AliZ3glw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "cuJyixjeQSS2-W5ZM8VPJQ", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.141939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "C" - ], - "elements_exclusive": "C", - "chemical_formula_anonymous": "A", - "material_id": "jPcWsq-Rb0gtgx2krJDmLvQUxpcL", - "structural_type": "2D", - "chemical_formula_reduced": "C", - "n_elements": 1, - "chemical_formula_descriptive": "C", - "chemical_formula_hill": "C" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "LDA_X_PZ", - "LDA_C_PZ" - ] - }, - "program_name": "exciting" - } - }, - "properties": {} - }, - "entry_id": "cuJyixjeQSS2-W5ZM8VPJQ", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "fI_rhkLqQ829U8gf_BqZIg", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.140939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "C", - "H" - ], - "elements_exclusive": "C H", - "chemical_formula_anonymous": "AB2", - "material_id": "test_material_id", - "structural_type": "molecule / cluster", - "chemical_formula_reduced": "CH3", - "n_elements": 2, - "chemical_formula_descriptive": "CH3", - "chemical_formula_hill": "CH3" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "GGA_X_PBE_SOL", - "GGA_C_PBE_SOL" - ] - }, - "program_name": "VASP" - } - }, - "properties": {} - }, - "entry_id": "fI_rhkLqQ829U8gf_BqZIg", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "jLKvVS_FQ-KiJRXC49wzHw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.143939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "functional_type": [ - "semiconductor", - "solar cell" - ], - "elements": [ - "C", - "H", - "I", - "N", - "Pb" - ], - "elements_exclusive": "C H I N Pb", - "material_id": "test_material_id", - "structural_type": "bulk", - "chemical_formula_reduced": "H6Pb1C1I3N1", - "n_elements": 5, - "chemical_formula_descriptive": "MAPbI3", - "material_name": "perovskite", - "chemical_formula_hill": "CH6I3NPb" - }, - "method": {}, - "properties": { - "optoelectronic": { - "solar_cell": { - "absorber_fabrication": [ - "Spin-coating" - ], - "efficiency": 15.9, - "device_stack": [ - "SLG", - "ITO", - "PEDOT:PSS", - "Perovskite", - "PCBM-60", - "BCP", - "Ag" - ], - "short_circuit_current_density": 203, - "hole_transport_layer": [ - "PEDOT:PSS" - ], - "fill_factor": 0.78, - "illumination_intensity": 1000, - "electron_transport_layer": [ - "PCBM-60", - "BCP" - ], - "device_area": 0.0000125, - "back_contact": [ - "Ag" - ], - "absorber": [ - "MAPbI" - ], - "open_circuit_voltage": 1, - "substrate": [ - "SLG", - "ITO" - ], - "device_architecture": "pin" - }, - "band_gap": [ - { - "value": 2.5634826144e-19 - } - ] - }, - "available_properties": [ - "solar_cell", - "optoelectronic.band_gap" - ] - } - }, - "entry_id": "jLKvVS_FQ-KiJRXC49wzHw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "9897", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "verify_only": true, - "owner": "public", - "query": { - "optimade_filter": "." - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 422, - "body": { - "detail": [ - { - "loc": [ - [ - "optimade_filter" - ] - ], - "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* NOT\n\t* ESCAPED_STRING\n\t* SIGNED_INT\n\t* LPAR\n\t* SIGNED_FLOAT\n\t* IDENTIFIER\n", - "type": "value_error.exception" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "361", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "verify_only": true, - "owner": "public", - "query": { - "optimade_filter": "." - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 422, - "body": { - "detail": [ - { - "loc": [ - [ - "optimade_filter" - ] - ], - "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* NOT\n\t* ESCAPED_STRING\n\t* SIGNED_INT\n\t* LPAR\n\t* SIGNED_FLOAT\n\t* IDENTIFIER\n", - "type": "value_error.exception" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "361", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": { - "and": [ - { - "results.material.functional_type:any": [ - "solar cell" - ] - }, - {} - ] - }, - "aggregations": {}, - "pagination": { - "order_by": "results.properties.optoelectronic.solar_cell.efficiency", - "order": "desc", - "page_size": 20 - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "results.material.functional_type", - "value": { - "any": [ - "solar cell" - ] - } - }, - {} - ] - }, - "pagination": { - "page_size": 20, - "order_by": "results.properties.optoelectronic.solar_cell.efficiency", - "order": "desc", - "total": 1 - }, - "data": [ - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "jLKvVS_FQ-KiJRXC49wzHw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.143939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "functional_type": [ - "semiconductor", - "solar cell" - ], - "elements": [ - "C", - "H", - "I", - "N", - "Pb" - ], - "elements_exclusive": "C H I N Pb", - "material_id": "test_material_id", - "structural_type": "bulk", - "chemical_formula_reduced": "H6Pb1C1I3N1", - "n_elements": 5, - "chemical_formula_descriptive": "MAPbI3", - "material_name": "perovskite", - "chemical_formula_hill": "CH6I3NPb" - }, - "method": {}, - "properties": { - "optoelectronic": { - "solar_cell": { - "absorber_fabrication": [ - "Spin-coating" - ], - "efficiency": 15.9, - "device_stack": [ - "SLG", - "ITO", - "PEDOT:PSS", - "Perovskite", - "PCBM-60", - "BCP", - "Ag" - ], - "short_circuit_current_density": 203, - "hole_transport_layer": [ - "PEDOT:PSS" - ], - "fill_factor": 0.78, - "illumination_intensity": 1000, - "electron_transport_layer": [ - "PCBM-60", - "BCP" - ], - "device_area": 0.0000125, - "back_contact": [ - "Ag" - ], - "absorber": [ - "MAPbI" - ], - "open_circuit_voltage": 1, - "substrate": [ - "SLG", - "ITO" - ], - "device_architecture": "pin" - }, - "band_gap": [ - { - "value": 2.5634826144e-19 - } - ] - }, - "available_properties": [ - "solar_cell", - "optoelectronic.band_gap" - ] - } - }, - "entry_id": "jLKvVS_FQ-KiJRXC49wzHw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "3612", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "dft.labels", - "dft.geometries" - ], - "owner": "visible" - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [] - }, - "pagination": { - "page_size": 10, - "order_by": "entry_id", - "order": "asc", - "total": 4 - }, - "data": [ - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "by5AZNRMTH6Ip5AliZ3glw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.142939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "Hf", - "Nb", - "Ta", - "Ti", - "Zr" - ], - "elements_exclusive": "Hf Nb Ta Ti Zr", - "chemical_formula_anonymous": "ABCDE", - "material_id": "aLzu5XmhATsTfEA4sGIiL45caCMq", - "structural_type": "bulk", - "chemical_formula_reduced": "HfNbTaTiZr", - "n_elements": 5, - "chemical_formula_descriptive": "HfNbTaTiZr", - "chemical_formula_hill": "HfNbTaTiZr" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "GGA_X_PBE_SOL", - "GGA_C_PBE_SOL" - ] - }, - "program_name": "VASP" - } - }, - "properties": {} - }, - "entry_id": "by5AZNRMTH6Ip5AliZ3glw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "cuJyixjeQSS2-W5ZM8VPJQ", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.141939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "C" - ], - "elements_exclusive": "C", - "chemical_formula_anonymous": "A", - "material_id": "jPcWsq-Rb0gtgx2krJDmLvQUxpcL", - "structural_type": "2D", - "chemical_formula_reduced": "C", - "n_elements": 1, - "chemical_formula_descriptive": "C", - "chemical_formula_hill": "C" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "LDA_X_PZ", - "LDA_C_PZ" - ] - }, - "program_name": "exciting" - } - }, - "properties": {} - }, - "entry_id": "cuJyixjeQSS2-W5ZM8VPJQ", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "fI_rhkLqQ829U8gf_BqZIg", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.140939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "elements": [ - "C", - "H" - ], - "elements_exclusive": "C H", - "chemical_formula_anonymous": "AB2", - "material_id": "test_material_id", - "structural_type": "molecule / cluster", - "chemical_formula_reduced": "CH3", - "n_elements": 2, - "chemical_formula_descriptive": "CH3", - "chemical_formula_hill": "CH3" - }, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "GGA_X_PBE_SOL", - "GGA_C_PBE_SOL" - ] - }, - "program_name": "VASP" - } - }, - "properties": {} - }, - "entry_id": "fI_rhkLqQ829U8gf_BqZIg", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "parser_name": "parsers/vasp", - "origin": "Markus Scheidgen", - "calc_id": "jLKvVS_FQ-KiJRXC49wzHw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "n_quantities": 0, - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "processed": true, - "mainfile": "upload/archive.json", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.143939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": { - "functional_type": [ - "semiconductor", - "solar cell" - ], - "elements": [ - "C", - "H", - "I", - "N", - "Pb" - ], - "elements_exclusive": "C H I N Pb", - "material_id": "test_material_id", - "structural_type": "bulk", - "chemical_formula_reduced": "H6Pb1C1I3N1", - "n_elements": 5, - "chemical_formula_descriptive": "MAPbI3", - "material_name": "perovskite", - "chemical_formula_hill": "CH6I3NPb" - }, - "method": {}, - "properties": { - "optoelectronic": { - "solar_cell": { - "absorber_fabrication": [ - "Spin-coating" - ], - "efficiency": 15.9, - "device_stack": [ - "SLG", - "ITO", - "PEDOT:PSS", - "Perovskite", - "PCBM-60", - "BCP", - "Ag" - ], - "short_circuit_current_density": 203, - "hole_transport_layer": [ - "PEDOT:PSS" - ], - "fill_factor": 0.78, - "illumination_intensity": 1000, - "electron_transport_layer": [ - "PCBM-60", - "BCP" - ], - "device_area": 0.0000125, - "back_contact": [ - "Ag" - ], - "absorber": [ - "MAPbI" - ], - "open_circuit_voltage": 1, - "substrate": [ - "SLG", - "ITO" - ], - "device_architecture": "pin" - }, - "band_gap": [ - { - "value": 2.5634826144e-19 - } - ] - }, - "available_properties": [ - "solar_cell", - "optoelectronic.band_gap" - ] - } - }, - "entry_id": "jLKvVS_FQ-KiJRXC49wzHw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "license": "CC BY 4.0" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "9897", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "verify_only": true, - "owner": "public", - "query": { - "optimade_filter": "." - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 422, - "body": { - "detail": [ - { - "loc": [ - [ - "optimade_filter" - ] - ], - "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* NOT\n\t* ESCAPED_STRING\n\t* SIGNED_INT\n\t* LPAR\n\t* SIGNED_FLOAT\n\t* IDENTIFIER\n", - "type": "value_error.exception" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "361", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": { - "and": [ - { - "results.material.functional_type:any": [ - "solar cell" - ] - }, - {} - ] - }, - "aggregations": { - "results.material.structural_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 7, - "type": "terms", - "changed": true, - "quantity": "results.material.structural_type" - } - }, - "results.material.functional_type:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.functional_type" - } - }, - "results.material.compound_type:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.compound_type" - } - }, - "results.material.material_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.material.material_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "results.material.functional_type", - "value": { - "any": [ - "solar cell" - ] - } - }, - {} - ] - }, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 1 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.material.structural_type:scroll": { - "terms": { - "quantity": "results.material.structural_type", - "exclude_from_search": true, - "metrics": [], - "size": 7, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "bulk" - } - ] - } - }, - "results.material.functional_type:scroll": { - "terms": { - "quantity": "results.material.functional_type", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "semiconductor" - }, - { - "count": 1, - "nested_count": 1, - "value": "solar cell" - } - ] - } - }, - "results.material.compound_type:scroll": { - "terms": { - "quantity": "results.material.compound_type", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.material.material_name:scroll": { - "terms": { - "quantity": "results.material.material_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "perovskite" - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1840", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "verify_only": true, - "owner": "public", - "query": { - "optimade_filter": "." - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 422, - "body": { - "detail": [ - { - "loc": [ - [ - "optimade_filter" - ] - ], - "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* NOT\n\t* ESCAPED_STRING\n\t* SIGNED_INT\n\t* LPAR\n\t* SIGNED_FLOAT\n\t* IDENTIFIER\n", - "type": "value_error.exception" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "361", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": { - "and": [ - { - "results.material.functional_type:any": [ - "solar cell" - ] - }, - {} - ] - }, - "aggregations": { - "results.material.elements:default": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 119, - "type": "terms", - "changed": true, - "quantity": "results.material.elements" - } - }, - "results.material.n_elements:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "interval": 1, - "changed": true, - "quantity": "results.material.n_elements" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "results.material.functional_type", - "value": { - "any": [ - "solar cell" - ] - } - }, - {} - ] - }, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 1 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.material.elements:default": { - "terms": { - "quantity": "results.material.elements", - "exclude_from_search": false, - "metrics": [], - "size": 119, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "C" - }, - { - "count": 1, - "nested_count": 1, - "value": "H" - }, - { - "count": 1, - "nested_count": 1, - "value": "I" - }, - { - "count": 1, - "nested_count": 1, - "value": "N" - }, - { - "count": 1, - "nested_count": 1, - "value": "Pb" - } - ] - } - }, - "results.material.n_elements:default_histogram": { - "histogram": { - "quantity": "results.material.n_elements", - "exclude_from_search": true, - "metrics": [], - "interval": 1, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 5 - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1547", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": { - "and": [ - { - "results.material.functional_type:any": [ - "solar cell" - ] - }, - {} - ] - }, - "aggregations": { - "optoelectronic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "results.properties.available_properties", - "include": [ - "optoelectronic.band_gap", - "solar_cell" - ], - "update": true, - "type": "terms", - "size": 2, - "changed": true - } - }, - "results.properties.optoelectronic.band_gap.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.band_gap.type" - } - }, - "results.properties.optoelectronic.band_gap.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.band_gap.value" - } - }, - "results.properties.optoelectronic.solar_cell.efficiency:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.efficiency" - } - }, - "results.properties.optoelectronic.solar_cell.fill_factor:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.fill_factor" - } - }, - "results.properties.optoelectronic.solar_cell.open_circuit_voltage:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.open_circuit_voltage" - } - }, - "results.properties.optoelectronic.solar_cell.short_circuit_current_density:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.short_circuit_current_density" - } - }, - "results.properties.optoelectronic.solar_cell.illumination_intensity:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.illumination_intensity" - } - }, - "results.properties.optoelectronic.solar_cell.device_area:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.device_area" - } - }, - "results.properties.optoelectronic.solar_cell.device_architecture:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.device_architecture" - } - }, - "results.properties.optoelectronic.solar_cell.device_stack:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.device_stack" - } - }, - "results.properties.optoelectronic.solar_cell.absorber:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.absorber" - } - }, - "results.properties.optoelectronic.solar_cell.absorber_fabrication:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.absorber_fabrication" - } - }, - "results.properties.optoelectronic.solar_cell.electron_transport_layer:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.electron_transport_layer" - } - }, - "results.properties.optoelectronic.solar_cell.hole_transport_layer:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.hole_transport_layer" - } - }, - "results.properties.optoelectronic.solar_cell.substrate:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.substrate" - } - }, - "results.properties.optoelectronic.solar_cell.back_contact:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.properties.optoelectronic.solar_cell.back_contact" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "results.material.functional_type", - "value": { - "any": [ - "solar cell" - ] - } - }, - {} - ] - }, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 1 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "optoelectronic_properties:scroll": { - "terms": { - "quantity": "results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 2, - "include": [ - "optoelectronic.band_gap", - "solar_cell" - ], - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "optoelectronic.band_gap" - }, - { - "count": 1, - "nested_count": 1, - "value": "solar_cell" - } - ] - } - }, - "results.properties.optoelectronic.band_gap.type:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.band_gap.type", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "data": [] - } - }, - "results.properties.optoelectronic.band_gap.value:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.band_gap.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 2.5634826144e-19, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 2.5634826144e-19 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.efficiency:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.efficiency", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 15.9, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 15.9 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.fill_factor:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.fill_factor", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 0.78, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 0.78 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.open_circuit_voltage:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.open_circuit_voltage", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.short_circuit_current_density:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.short_circuit_current_density", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 203, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 203 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.illumination_intensity:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.illumination_intensity", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1000, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1000 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_area:default_histogram": { - "histogram": { - "quantity": "results.properties.optoelectronic.solar_cell.device_area", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 0.0000125, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 0.0000125 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_architecture:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.device_architecture", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "pin" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_stack:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.device_stack", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Ag" - }, - { - "count": 1, - "nested_count": 1, - "value": "BCP" - }, - { - "count": 1, - "nested_count": 1, - "value": "ITO" - }, - { - "count": 1, - "nested_count": 1, - "value": "PCBM-60" - }, - { - "count": 1, - "nested_count": 1, - "value": "PEDOT:PSS" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.absorber:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.absorber", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "MAPbI" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.absorber_fabrication:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.absorber_fabrication", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Spin-coating" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.electron_transport_layer:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.electron_transport_layer", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "BCP" - }, - { - "count": 1, - "nested_count": 1, - "value": "PCBM-60" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.hole_transport_layer:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.hole_transport_layer", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "PEDOT:PSS" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.substrate:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.substrate", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "ITO" - }, - { - "count": 1, - "nested_count": 1, - "value": "SLG" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.back_contact:scroll": { - "terms": { - "quantity": "results.properties.optoelectronic.solar_cell.back_contact", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Ag" - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "8380", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": { - "and": [ - { - "results.material.functional_type:any": [ - "solar cell" - ] - }, - {} - ] - }, - "aggregations": { - "results.eln.sections:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.sections" - } - }, - "results.eln.tags:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.tags" - } - }, - "results.eln.methods:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.methods" - } - }, - "results.eln.instruments:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "results.eln.instruments" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "results.material.functional_type", - "value": { - "any": [ - "solar cell" - ] - } - }, - {} - ] - }, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 1 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "results.eln.sections:scroll": { - "terms": { - "quantity": "results.eln.sections", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.tags:scroll": { - "terms": { - "quantity": "results.eln.tags", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.methods:scroll": { - "terms": { - "quantity": "results.eln.methods", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.instruments:scroll": { - "terms": { - "quantity": "results.eln.instruments", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1269", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": { - "and": [ - { - "results.material.functional_type:any": [ - "solar cell" - ] - }, - {} - ] - }, - "aggregations": { - "external_db:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 6, - "type": "terms", - "changed": true, - "quantity": "external_db" - } - }, - "upload_create_time:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "upload_create_time" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "results.material.functional_type", - "value": { - "any": [ - "solar cell" - ] - } - }, - {} - ] - }, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 1 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "external_db:scroll": { - "terms": { - "quantity": "external_db", - "exclude_from_search": true, - "metrics": [], - "size": 6, - "data": [] - } - }, - "upload_create_time:default_histogram": { - "histogram": { - "quantity": "upload_create_time", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1666682432136, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1666682432136 - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1008", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": { - "and": [ - { - "results.material.functional_type:any": [ - "solar cell" - ] - }, - {} - ] - }, - "aggregations": { - "datasets.dataset_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 10, - "type": "terms", - "changed": true, - "quantity": "datasets.dataset_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "results.material.functional_type", - "value": { - "any": [ - "solar cell" - ] - } - }, - {} - ] - }, - "pagination": { - "page_size": 0, - "order_by": "entry_id", - "order": "asc", - "total": 1 - }, - "required": { - "include": [ - "entry_id" - ] - }, - "aggregations": { - "datasets.dataset_name:scroll": { - "terms": { - "quantity": "datasets.dataset_name", - "exclude_from_search": true, - "metrics": [], - "size": 10, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "643", - "content-type": "application/json", - "server": "uvicorn" - } - } - } - ], - "cd2b263727fb2d6704d7b6a1e68a2c83": [ - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/archive/query", - "method": "POST", - "body": { - "owner": "visible", - "query": { - "quantities": "definitions.section_definitions", - "processed": true - }, - "required": { - "metadata": { - "entry_id": "*" - } - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "quantities", - "value": "definitions.section_definitions" - }, - { - "name": "processed", - "value": true - } - ] - }, - "pagination": { - "page_size": 10, - "order_by": "entry_id", - "order": "asc", - "total": 0 - }, - "required": { - "metadata": { - "entry_id": "*" - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "414", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/archive/query", - "method": "POST", - "body": { - "owner": "visible", - "query": { - "quantities": "definitions.section_definitions", - "processed": true - }, - "required": { - "metadata": { - "entry_id": "*" - } - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "quantities", - "value": "definitions.section_definitions" - }, - { - "name": "processed", - "value": true - } - ] - }, - "pagination": { - "page_size": 10, - "order_by": "entry_id", - "order": "asc", - "total": 0 - }, - "required": { - "metadata": { - "entry_id": "*" - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "414", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/archive/query", - "method": "POST", - "body": { - "owner": "visible", - "query": { - "quantities": "definitions.section_definitions", - "processed": true - }, - "required": { - "metadata": { - "entry_id": "*" - } - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "quantities", - "value": "definitions.section_definitions" - }, - { - "name": "processed", - "value": true - } - ] - }, - "pagination": { - "page_size": 10, - "order_by": "entry_id", - "order": "asc", - "total": 0 - }, - "required": { - "metadata": { - "entry_id": "*" - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "414", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/entries/archive/query", - "method": "POST", - "body": { - "owner": "visible", - "query": { - "quantities": "definitions.section_definitions", - "processed": true - }, - "required": { - "metadata": { - "entry_id": "*" - } - } - }, - "headers": { - "accept": "application/json", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": { - "and": [ - { - "name": "quantities", - "value": "definitions.section_definitions" - }, - { - "name": "processed", - "value": true - } - ] - }, - "pagination": { - "page_size": 10, - "order_by": "entry_id", - "order": "asc", - "total": 0 - }, - "required": { - "metadata": { - "entry_id": "*" - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "414", - "content-type": "application/json", - "server": "uvicorn" - } - } - } - ], - "dd53f808dba1357403d54656e22b3d84": [ - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": {}, - "pagination": { - "order_by": "chemical_formula_hill", - "order": "asc" - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 10, - "order_by": "chemical_formula_hill", - "order": "asc", - "total": 3 - }, - "data": [ - { - "entries": [ - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "origin": "Markus Scheidgen", - "calc_id": "cuJyixjeQSS2-W5ZM8VPJQ", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.141939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": {}, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "LDA_X_PZ", - "LDA_C_PZ" - ] - }, - "program_name": "exciting" - } - }, - "properties": {} - }, - "entry_id": "cuJyixjeQSS2-W5ZM8VPJQ", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ] - } - ], - "n_entries": 1, - "elements": [ - "C" - ], - "elements_exclusive": "C", - "chemical_formula_anonymous": "A", - "material_id": "jPcWsq-Rb0gtgx2krJDmLvQUxpcL", - "structural_type": "2D", - "chemical_formula_reduced": "C", - "n_elements": 1, - "chemical_formula_descriptive": "C", - "chemical_formula_hill": "C", - "license": "CC BY 4.0" - }, - { - "entries": [ - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "origin": "Markus Scheidgen", - "calc_id": "fI_rhkLqQ829U8gf_BqZIg", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.140939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": {}, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "GGA_X_PBE_SOL", - "GGA_C_PBE_SOL" - ] - }, - "program_name": "VASP" - } - }, - "properties": {} - }, - "entry_id": "fI_rhkLqQ829U8gf_BqZIg", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ] - }, - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "origin": "Markus Scheidgen", - "calc_id": "jLKvVS_FQ-KiJRXC49wzHw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.143939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": {}, - "method": {}, - "properties": { - "optoelectronic": { - "solar_cell": { - "absorber_fabrication": [ - "Spin-coating" - ], - "efficiency": 15.9, - "device_stack": [ - "SLG", - "ITO", - "PEDOT:PSS", - "Perovskite", - "PCBM-60", - "BCP", - "Ag" - ], - "short_circuit_current_density": 203, - "hole_transport_layer": [ - "PEDOT:PSS" - ], - "fill_factor": 0.78, - "illumination_intensity": 1000, - "electron_transport_layer": [ - "PCBM-60", - "BCP" - ], - "device_area": 0.0000125, - "back_contact": [ - "Ag" - ], - "absorber": [ - "MAPbI" - ], - "open_circuit_voltage": 1, - "substrate": [ - "SLG", - "ITO" - ], - "device_architecture": "pin" - }, - "band_gap": [ - { - "value": 2.5634826144e-19 - } - ] - }, - "available_properties": [ - "solar_cell", - "optoelectronic.band_gap" - ] - } - }, - "entry_id": "jLKvVS_FQ-KiJRXC49wzHw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ] - } - ], - "n_entries": 2, - "elements": [ - "C", - "H" - ], - "elements_exclusive": "C H", - "chemical_formula_anonymous": "AB2", - "material_id": "test_material_id", - "structural_type": "molecule / cluster", - "chemical_formula_reduced": "CH3", - "n_elements": 2, - "chemical_formula_descriptive": "CH3", - "chemical_formula_hill": "CH3", - "license": "CC BY 4.0" - }, - { - "entries": [ - { - "upload_id": "niZzieLKRSqNzBp60NXM9Q", - "origin": "Markus Scheidgen", - "calc_id": "by5AZNRMTH6Ip5AliZ3glw", - "published": true, - "writers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "datasets": [], - "upload_create_time": "2022-10-25T07:20:32.136939+00:00", - "main_author": { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - }, - "viewers": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ], - "entry_create_time": "2022-10-25T07:20:32.142939+00:00", - "publish_time": "2022-10-25T07:20:32.139939+00:00", - "with_embargo": false, - "domain": "dft", - "results": { - "material": {}, - "method": { - "simulation": { - "program_version": "not processed", - "dft": { - "basis_set_type": "unavailable", - "core_electron_treatment": "unavailable", - "xc_functional_type": "not processed", - "xc_functional_names": [ - "GGA_X_PBE_SOL", - "GGA_C_PBE_SOL" - ] - }, - "program_name": "VASP" - } - }, - "properties": {} - }, - "entry_id": "by5AZNRMTH6Ip5AliZ3glw", - "authors": [ - { - "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", - "name": "Markus Scheidgen" - } - ] - } - ], - "n_entries": 1, - "elements": [ - "Hf", - "Nb", - "Ta", - "Ti", - "Zr" - ], - "elements_exclusive": "Hf Nb Ta Ti Zr", - "chemical_formula_anonymous": "ABCDE", - "material_id": "aLzu5XmhATsTfEA4sGIiL45caCMq", - "structural_type": "bulk", - "chemical_formula_reduced": "HfNbTaTiZr", - "n_elements": 5, - "chemical_formula_descriptive": "HfNbTaTiZr", - "chemical_formula_hill": "HfNbTaTiZr", - "license": "CC BY 4.0" - } - ] - }, - "headers": { - "connection": "close", - "content-length": "9790", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.material.structural_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 7, - "type": "terms", - "changed": true, - "quantity": "structural_type" - } - }, - "results.material.functional_type:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "functional_type" - } - }, - "results.material.compound_type:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "compound_type" - } - }, - "results.material.material_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "material_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.material.structural_type:scroll": { - "terms": { - "quantity": "structural_type", - "exclude_from_search": true, - "metrics": [], - "size": 7, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "2D" - }, - { - "count": 1, - "nested_count": 1, - "value": "bulk" - }, - { - "count": 1, - "nested_count": 1, - "value": "molecule / cluster" - } - ] - } - }, - "results.material.functional_type:scroll": { - "terms": { - "quantity": "functional_type", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.material.compound_type:scroll": { - "terms": { - "quantity": "compound_type", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.material.material_name:scroll": { - "terms": { - "quantity": "material_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1460", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.material.elements:default": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 119, - "type": "terms", - "changed": true, - "quantity": "elements" - } - }, - "results.material.n_elements:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "interval": 1, - "changed": true, - "quantity": "n_elements" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.material.elements:default": { - "terms": { - "quantity": "elements", - "exclude_from_search": false, - "metrics": [], - "size": 119, - "data": [ - { - "count": 2, - "nested_count": 2, - "value": "C" - }, - { - "count": 1, - "nested_count": 1, - "value": "H" - }, - { - "count": 1, - "nested_count": 1, - "value": "Hf" - }, - { - "count": 1, - "nested_count": 1, - "value": "Nb" - }, - { - "count": 1, - "nested_count": 1, - "value": "Ta" - }, - { - "count": 1, - "nested_count": 1, - "value": "Ti" - }, - { - "count": 1, - "nested_count": 1, - "value": "Zr" - } - ] - } - }, - "results.material.n_elements:default_histogram": { - "histogram": { - "quantity": "n_elements", - "exclude_from_search": true, - "metrics": [], - "interval": 1, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1 - }, - { - "count": 1, - "nested_count": 1, - "value": 2 - }, - { - "count": 0, - "nested_count": 0, - "value": 3 - }, - { - "count": 0, - "nested_count": 0, - "value": 4 - }, - { - "count": 1, - "nested_count": 1, - "value": 5 - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1968", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.material.symmetry.bravais_lattice:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 14, - "type": "terms", - "changed": true, - "quantity": "symmetry.bravais_lattice" - } - }, - "results.material.symmetry.crystal_system:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 7, - "type": "terms", - "changed": true, - "quantity": "symmetry.crystal_system" - } - }, - "results.material.symmetry.structure_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "symmetry.structure_name" - } - }, - "results.material.symmetry.strukturbericht_designation:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "symmetry.strukturbericht_designation" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.material.symmetry.bravais_lattice:scroll": { - "terms": { - "quantity": "symmetry.bravais_lattice", - "exclude_from_search": true, - "metrics": [], - "size": 14, - "data": [] - } - }, - "results.material.symmetry.crystal_system:scroll": { - "terms": { - "quantity": "symmetry.crystal_system", - "exclude_from_search": true, - "metrics": [], - "size": 7, - "data": [] - } - }, - "results.material.symmetry.structure_name:scroll": { - "terms": { - "quantity": "symmetry.structure_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.material.symmetry.strukturbericht_designation:scroll": { - "terms": { - "quantity": "symmetry.strukturbericht_designation", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1215", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.method.method_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.method_name" - } - }, - "results.method.workflow_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 15, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.workflow_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.method.method_name:scroll": { - "terms": { - "quantity": "entries.results.method.method_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.method.workflow_name:scroll": { - "terms": { - "quantity": "entries.results.method.workflow_name", - "exclude_from_search": true, - "metrics": [], - "size": 15, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "717", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.method.simulation.program_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.simulation.program_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.method.simulation.program_name:scroll": { - "terms": { - "quantity": "entries.results.method.simulation.program_name", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 2, - "nested_count": 2, - "value": "VASP" - }, - { - "count": 1, - "nested_count": 1, - "value": "exciting" - }, - { - "count": 0, - "value": "ABACUS" - }, - { - "count": 0, - "value": "ABINIT" - }, - { - "count": 0, - "value": "AFLOW" - }, - { - "count": 0, - "value": "Amber" - }, - { - "count": 0, - "value": "AMS" - }, - { - "count": 0, - "value": "ASAP" - }, - { - "count": 0, - "value": "ASR" - }, - { - "count": 0, - "value": "Atomate" - }, - { - "count": 0, - "value": "BigDFT" - }, - { - "count": 0, - "value": "CASTEP" - }, - { - "count": 0, - "value": "CHARMM" - }, - { - "count": 0, - "value": "CP2K" - }, - { - "count": 0, - "value": "CPMD" - }, - { - "count": 0, - "value": "CRYSTAL" - }, - { - "count": 0, - "value": "DFTB+" - }, - { - "count": 0, - "value": "DL_POLY" - }, - { - "count": 0, - "value": "DMol3" - }, - { - "count": 0, - "value": "EELSDB" - }, - { - "count": 0, - "value": "ElaStic" - }, - { - "count": 0, - "value": "Elk" - }, - { - "count": 0, - "value": "FHI-aims" - }, - { - "count": 0, - "value": "FHI-vibes" - }, - { - "count": 0, - "value": "FLEUR" - }, - { - "count": 0, - "value": "FPLO" - }, - { - "count": 0, - "value": "GAMESS" - }, - { - "count": 0, - "value": "Gaussian" - }, - { - "count": 0, - "value": "GPAW" - }, - { - "count": 0, - "value": "GROMACS" - }, - { - "count": 0, - "value": "GROMOS" - }, - { - "count": 0, - "value": "GULP" - }, - { - "count": 0, - "value": "LAMMPS" - }, - { - "count": 0, - "value": "libAtoms" - }, - { - "count": 0, - "value": "LOBSTER" - }, - { - "count": 0, - "value": "MOFStructures" - }, - { - "count": 0, - "value": "Molcas" - }, - { - "count": 0, - "value": "MOPAC" - }, - { - "count": 0, - "value": "NAMD" - }, - { - "count": 0, - "value": "NeXus" - }, - { - "count": 0, - "value": "NWChem" - }, - { - "count": 0, - "value": "Octopus" - }, - { - "count": 0, - "value": "ONETEP" - }, - { - "count": 0, - "value": "OpenKIM" - }, - { - "count": 0, - "value": "OpenMX" - }, - { - "count": 0, - "value": "ORCA" - }, - { - "count": 0, - "value": "phonopy" - }, - { - "count": 0, - "value": "Psi4" - }, - { - "count": 0, - "value": "Qball" - }, - { - "count": 0, - "value": "Qbox" - }, - { - "count": 0, - "value": "QuantumATK" - }, - { - "count": 0, - "value": "QuantumESPRESSO" - }, - { - "count": 0, - "value": "QuantumEspressoEPW" - }, - { - "count": 0, - "value": "QuantumEspressPhonon" - }, - { - "count": 0, - "value": "SIESTA" - }, - { - "count": 0, - "value": "Tinker" - }, - { - "count": 0, - "value": "TURBOMOLE" - }, - { - "count": 0, - "value": "WIEN2k" - }, - { - "count": 0, - "value": "YAMBO" - }, - { - "count": 0, - "value": "unavailable" - }, - { - "count": 0, - "value": "not processed" - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "5435", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.method.simulation.dft.xc_functional_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 8, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.simulation.dft.xc_functional_type" - } - }, - "results.method.simulation.dft.xc_functional_names:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.simulation.dft.xc_functional_names" - } - }, - "results.method.simulation.dft.basis_set_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 7, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.simulation.dft.basis_set_type" - } - }, - "results.method.simulation.dft.core_electron_treatment:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 4, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.simulation.dft.core_electron_treatment" - } - }, - "results.method.simulation.dft.relativity_method:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 3, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.simulation.dft.relativity_method" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.method.simulation.dft.xc_functional_type:scroll": { - "terms": { - "quantity": "entries.results.method.simulation.dft.xc_functional_type", - "exclude_from_search": true, - "metrics": [], - "size": 8, - "data": [ - { - "count": 3, - "nested_count": 3, - "value": "not processed" - } - ] - } - }, - "results.method.simulation.dft.xc_functional_names:scroll": { - "terms": { - "quantity": "entries.results.method.simulation.dft.xc_functional_names", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 2, - "nested_count": 2, - "value": "GGA_C_PBE_SOL" - }, - { - "count": 2, - "nested_count": 2, - "value": "GGA_X_PBE_SOL" - }, - { - "count": 1, - "nested_count": 1, - "value": "LDA_C_PZ" - }, - { - "count": 1, - "nested_count": 1, - "value": "LDA_X_PZ" - } - ] - } - }, - "results.method.simulation.dft.basis_set_type:scroll": { - "terms": { - "quantity": "entries.results.method.simulation.dft.basis_set_type", - "exclude_from_search": true, - "metrics": [], - "size": 7, - "data": [ - { - "count": 3, - "nested_count": 3, - "value": "unavailable" - } - ] - } - }, - "results.method.simulation.dft.core_electron_treatment:scroll": { - "terms": { - "quantity": "entries.results.method.simulation.dft.core_electron_treatment", - "exclude_from_search": true, - "metrics": [], - "size": 4, - "data": [ - { - "count": 3, - "nested_count": 3, - "value": "unavailable" - } - ] - } - }, - "results.method.simulation.dft.relativity_method:scroll": { - "terms": { - "quantity": "entries.results.method.simulation.dft.relativity_method", - "exclude_from_search": true, - "metrics": [], - "size": 3, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "2465", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.method.simulation.gw.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 6, - "type": "terms", - "changed": true, - "quantity": "entries.results.method.simulation.gw.type" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.method.simulation.gw.type:scroll": { - "terms": { - "quantity": "entries.results.method.simulation.gw.type", - "exclude_from_search": true, - "metrics": [], - "size": 6, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "495", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.properties.spectroscopy.eels.resolution:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.spectroscopy.eels.resolution" - } - }, - "results.properties.spectroscopy.eels.min_energy:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.spectroscopy.eels.min_energy" - } - }, - "results.properties.spectroscopy.eels.max_energy:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.spectroscopy.eels.max_energy" - } - }, - "results.properties.spectroscopy.eels.detector_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.spectroscopy.eels.detector_type" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.properties.spectroscopy.eels.resolution:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.spectroscopy.eels.resolution", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.spectroscopy.eels.min_energy:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.spectroscopy.eels.min_energy", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.spectroscopy.eels.max_energy:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.spectroscopy.eels.max_energy", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.spectroscopy.eels.detector_type:scroll": { - "terms": { - "quantity": "entries.results.properties.spectroscopy.eels.detector_type", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1405", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "electronic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "entries.results.properties.available_properties", - "include": [ - "electronic.band_structure_electronic.band_gap", - "band_structure_electronic", - "dos_electronic" - ], - "update": true, - "type": "terms", - "size": 3, - "changed": true - } - }, - "results.properties.electronic.band_structure_electronic.band_gap.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.electronic.band_structure_electronic.band_gap.type" - } - }, - "results.properties.electronic.band_structure_electronic.band_gap.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.electronic.band_structure_electronic.band_gap.value" - } - }, - "results.properties.electronic.band_structure_electronic.spin_polarized:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "include": [ - "false", - "true" - ], - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.electronic.band_structure_electronic.spin_polarized" - } - }, - "results.properties.electronic.dos_electronic.spin_polarized:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "include": [ - "false", - "true" - ], - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.electronic.dos_electronic.spin_polarized" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "electronic_properties:scroll": { - "terms": { - "quantity": "entries.results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 3, - "include": [ - "electronic.band_structure_electronic.band_gap", - "band_structure_electronic", - "dos_electronic" - ], - "data": [] - } - }, - "results.properties.electronic.band_structure_electronic.band_gap.type:scroll": { - "terms": { - "quantity": "entries.results.properties.electronic.band_structure_electronic.band_gap.type", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "data": [] - } - }, - "results.properties.electronic.band_structure_electronic.band_gap.value:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.electronic.band_structure_electronic.band_gap.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.electronic.band_structure_electronic.spin_polarized:scroll": { - "terms": { - "quantity": "entries.results.properties.electronic.band_structure_electronic.spin_polarized", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "include": [ - "false", - "true" - ], - "data": [] - } - }, - "results.properties.electronic.dos_electronic.spin_polarized:scroll": { - "terms": { - "quantity": "entries.results.properties.electronic.dos_electronic.spin_polarized", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "include": [ - "false", - "true" - ], - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "2054", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "optoelectronic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "entries.results.properties.available_properties", - "include": [ - "optoelectronic.band_gap", - "solar_cell" - ], - "update": true, - "type": "terms", - "size": 2, - "changed": true - } - }, - "results.properties.optoelectronic.band_gap.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 2, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.band_gap.type" - } - }, - "results.properties.optoelectronic.band_gap.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.optoelectronic.band_gap.value" - } - }, - "results.properties.optoelectronic.solar_cell.efficiency:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.efficiency" - } - }, - "results.properties.optoelectronic.solar_cell.fill_factor:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.fill_factor" - } - }, - "results.properties.optoelectronic.solar_cell.open_circuit_voltage:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.open_circuit_voltage" - } - }, - "results.properties.optoelectronic.solar_cell.short_circuit_current_density:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.short_circuit_current_density" - } - }, - "results.properties.optoelectronic.solar_cell.illumination_intensity:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.illumination_intensity" - } - }, - "results.properties.optoelectronic.solar_cell.device_area:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.device_area" - } - }, - "results.properties.optoelectronic.solar_cell.device_architecture:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.device_architecture" - } - }, - "results.properties.optoelectronic.solar_cell.device_stack:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.device_stack" - } - }, - "results.properties.optoelectronic.solar_cell.absorber:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.absorber" - } - }, - "results.properties.optoelectronic.solar_cell.absorber_fabrication:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.absorber_fabrication" - } - }, - "results.properties.optoelectronic.solar_cell.electron_transport_layer:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.electron_transport_layer" - } - }, - "results.properties.optoelectronic.solar_cell.hole_transport_layer:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.hole_transport_layer" - } - }, - "results.properties.optoelectronic.solar_cell.substrate:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.substrate" - } - }, - "results.properties.optoelectronic.solar_cell.back_contact:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.optoelectronic.solar_cell.back_contact" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "optoelectronic_properties:scroll": { - "terms": { - "quantity": "entries.results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 2, - "include": [ - "optoelectronic.band_gap", - "solar_cell" - ], - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "optoelectronic.band_gap" - }, - { - "count": 1, - "nested_count": 1, - "value": "solar_cell" - } - ] - } - }, - "results.properties.optoelectronic.band_gap.type:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.band_gap.type", - "exclude_from_search": true, - "metrics": [], - "size": 2, - "data": [] - } - }, - "results.properties.optoelectronic.band_gap.value:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.optoelectronic.band_gap.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 2.5634826144e-19, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 2.5634826144e-19 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.efficiency:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.efficiency", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 15.9, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 15.9 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.fill_factor:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.fill_factor", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 0.78, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 0.78 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.open_circuit_voltage:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.open_circuit_voltage", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.short_circuit_current_density:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.short_circuit_current_density", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 203, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 203 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.illumination_intensity:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.illumination_intensity", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1000, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 1000 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_area:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.device_area", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 0.0000125, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": 0.0000125 - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_architecture:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.device_architecture", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "pin" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.device_stack:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.device_stack", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Ag" - }, - { - "count": 1, - "nested_count": 1, - "value": "BCP" - }, - { - "count": 1, - "nested_count": 1, - "value": "ITO" - }, - { - "count": 1, - "nested_count": 1, - "value": "PCBM-60" - }, - { - "count": 1, - "nested_count": 1, - "value": "PEDOT:PSS" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.absorber:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.absorber", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "MAPbI" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.absorber_fabrication:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.absorber_fabrication", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Spin-coating" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.electron_transport_layer:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.electron_transport_layer", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "BCP" - }, - { - "count": 1, - "nested_count": 1, - "value": "PCBM-60" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.hole_transport_layer:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.hole_transport_layer", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "PEDOT:PSS" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.substrate:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.substrate", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "ITO" - }, - { - "count": 1, - "nested_count": 1, - "value": "SLG" - } - ] - } - }, - "results.properties.optoelectronic.solar_cell.back_contact:scroll": { - "terms": { - "quantity": "entries.results.properties.optoelectronic.solar_cell.back_contact", - "exclude_from_search": false, - "metrics": [], - "size": 5, - "data": [ - { - "count": 1, - "nested_count": 1, - "value": "Ag" - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "8337", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "vibrational_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "entries.results.properties.available_properties", - "include": [ - "dos_phonon", - "band_structure_phonon", - "energy_free_helmholtz", - "heat_capacity_constant_volume" - ], - "update": true, - "type": "terms", - "size": 4, - "changed": true - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "vibrational_properties:scroll": { - "terms": { - "quantity": "entries.results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 4, - "include": [ - "dos_phonon", - "band_structure_phonon", - "energy_free_helmholtz", - "heat_capacity_constant_volume" - ], - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "659", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "mechanical_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "entries.results.properties.available_properties", - "include": [ - "bulk_modulus", - "shear_modulus", - "energy_volume_curve" - ], - "update": true, - "type": "terms", - "size": 3, - "changed": true - } - }, - "results.properties.mechanical.bulk_modulus.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.mechanical.bulk_modulus.type" - } - }, - "results.properties.mechanical.bulk_modulus.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.mechanical.bulk_modulus.value" - } - }, - "results.properties.mechanical.shear_modulus.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 3, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.mechanical.shear_modulus.type" - } - }, - "results.properties.mechanical.shear_modulus.value:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.mechanical.shear_modulus.value" - } - }, - "results.properties.mechanical.energy_volume_curve.type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.mechanical.energy_volume_curve.type" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "mechanical_properties:scroll": { - "terms": { - "quantity": "entries.results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 3, - "include": [ - "bulk_modulus", - "shear_modulus", - "energy_volume_curve" - ], - "data": [] - } - }, - "results.properties.mechanical.bulk_modulus.type:scroll": { - "terms": { - "quantity": "entries.results.properties.mechanical.bulk_modulus.type", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.properties.mechanical.bulk_modulus.value:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.mechanical.bulk_modulus.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.mechanical.shear_modulus.type:scroll": { - "terms": { - "quantity": "entries.results.properties.mechanical.shear_modulus.type", - "exclude_from_search": true, - "metrics": [], - "size": 3, - "data": [] - } - }, - "results.properties.mechanical.shear_modulus.value:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.mechanical.shear_modulus.value", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.mechanical.energy_volume_curve.type:scroll": { - "terms": { - "quantity": "entries.results.properties.mechanical.energy_volume_curve.type", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "2032", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "spectroscopic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "entries.results.properties.available_properties", - "include": [ - "eels" - ], - "update": true, - "type": "terms", - "size": 1, - "changed": true - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "spectroscopic_properties:scroll": { - "terms": { - "quantity": "entries.results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 1, - "include": [ - "eels" - ], - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "542", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "thermodynamic_properties:scroll": { - "terms": { - "exclude_from_search": false, - "quantity": "entries.results.properties.available_properties", - "include": [ - "trajectory" - ], - "update": true, - "type": "terms", - "size": 1, - "changed": true - } - }, - "results.properties.thermodynamic.trajectory.available_properties:scroll": { - "terms": { - "exclude_from_search": false, - "update": true, - "size": 4, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.thermodynamic.trajectory.available_properties" - } - }, - "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.ensemble_type:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 4, - "type": "terms", - "changed": true, - "quantity": "entries.results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.ensemble_type" - } - }, - "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.time_step:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.time_step" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "thermodynamic_properties:scroll": { - "terms": { - "quantity": "entries.results.properties.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 1, - "include": [ - "trajectory" - ], - "data": [] - } - }, - "results.properties.thermodynamic.trajectory.available_properties:scroll": { - "terms": { - "quantity": "entries.results.properties.thermodynamic.trajectory.available_properties", - "exclude_from_search": false, - "metrics": [], - "size": 4, - "data": [] - } - }, - "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.ensemble_type:scroll": { - "terms": { - "quantity": "entries.results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.ensemble_type", - "exclude_from_search": true, - "metrics": [], - "size": 4, - "data": [] - } - }, - "results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.time_step:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.thermodynamic.trajectory.methodology.molecular_dynamics.time_step", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1577", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.properties.geometry_optimization.final_energy_difference:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.geometry_optimization.final_energy_difference" - } - }, - "results.properties.geometry_optimization.final_force_maximum:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.geometry_optimization.final_force_maximum" - } - }, - "results.properties.geometry_optimization.final_displacement_maximum:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.results.properties.geometry_optimization.final_displacement_maximum" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.properties.geometry_optimization.final_energy_difference:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.geometry_optimization.final_energy_difference", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.geometry_optimization.final_force_maximum:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.geometry_optimization.final_force_maximum", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - }, - "results.properties.geometry_optimization.final_displacement_maximum:default_histogram": { - "histogram": { - "quantity": "entries.results.properties.geometry_optimization.final_displacement_maximum", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1226", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "results.eln.sections:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.eln.sections" - } - }, - "results.eln.tags:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.eln.tags" - } - }, - "results.eln.methods:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.eln.methods" - } - }, - "results.eln.instruments:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 5, - "type": "terms", - "changed": true, - "quantity": "entries.results.eln.instruments" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "results.eln.sections:scroll": { - "terms": { - "quantity": "entries.results.eln.sections", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.tags:scroll": { - "terms": { - "quantity": "entries.results.eln.tags", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.methods:scroll": { - "terms": { - "quantity": "entries.results.eln.methods", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - }, - "results.eln.instruments:scroll": { - "terms": { - "quantity": "entries.results.eln.instruments", - "exclude_from_search": true, - "metrics": [], - "size": 5, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "1122", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "external_db:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 6, - "type": "terms", - "changed": true, - "quantity": "entries.external_db" - } - }, - "upload_create_time:default_histogram": { - "histogram": { - "exclude_from_search": true, - "update": true, - "type": "histogram", - "buckets": 30, - "changed": true, - "quantity": "entries.upload_create_time" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "external_db:scroll": { - "terms": { - "quantity": "entries.external_db", - "exclude_from_search": true, - "metrics": [], - "size": 6, - "data": [] - } - }, - "upload_create_time:default_histogram": { - "histogram": { - "quantity": "entries.upload_create_time", - "exclude_from_search": true, - "metrics": [], - "buckets": 30, - "offset": 1666682432136, - "data": [ - { - "count": 4, - "nested_count": 4, - "value": 1666682432136 - } - ] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "845", - "content-type": "application/json", - "server": "uvicorn" - } - } - }, - { - "request": { - "url": "http://localhost:8000/fairdi/nomad/latest/api/v1/materials/query", - "method": "POST", - "body": { - "exclude": [ - "atoms", - "only_atoms", - "files", - "quantities", - "dft.quantities", - "optimade", - "dft.labels", - "dft.geometries" - ], - "owner": "visible", - "query": {}, - "aggregations": { - "datasets.dataset_name:scroll": { - "terms": { - "exclude_from_search": true, - "update": true, - "size": 10, - "type": "terms", - "changed": true, - "quantity": "entries.datasets.dataset_name" - } - } - }, - "pagination": { - "page_size": 0 - }, - "required": { - "include": [] - } - }, - "headers": { - "accept": "application/json, text/plain, */*", - "content-type": "application/json", - "cookie": null - } - }, - "response": { - "status": 200, - "body": { - "owner": "visible", - "query": {}, - "pagination": { - "page_size": 0, - "order_by": "material_id", - "order": "asc", - "total": 3 - }, - "required": { - "include": [ - "material_id" - ] - }, - "aggregations": { - "datasets.dataset_name:scroll": { - "terms": { - "quantity": "entries.datasets.dataset_name", - "exclude_from_search": true, - "metrics": [], - "size": 10, - "data": [] - } - } - }, - "data": [] - }, - "headers": { - "connection": "close", - "content-length": "472", + "content-length": "414", "content-type": "application/json", "server": "uvicorn" } diff --git a/gui/tests/data/search/userdatapage.json b/gui/tests/data/search/userdatapage.json index 5d1b8ef48175d972ac0f5bcffe7595d436f989ca..d1d93b2d95ecc499f632f2e4b59bf921ee9991d5 100644 --- a/gui/tests/data/search/userdatapage.json +++ b/gui/tests/data/search/userdatapage.json @@ -26,7 +26,7 @@ "headers": { "accept": "application/json, text/plain, */*", "content-type": "application/json", - "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSWFFIV1YxSEJ6cmh5U3h3UmRDdkhCcUF1WVNKRzZWSEJSZXg0TW5oX293In0.eyJqdGkiOiI0NGIxMzNjZi1lMmZhLTQ4NGItOGM2OC1lY2U0NmRjMmU3NjIiLCJleHAiOjE2NjQzMzAyMzMsIm5iZiI6MCwiaWF0IjoxNjY0Mjk0MjQ3LCJpc3MiOiJodHRwczovL25vbWFkLWxhYi5ldS9mYWlyZGkva2V5Y2xvYWsvYXV0aC9yZWFsbXMvZmFpcmRpX25vbWFkX3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjg4NzhhZjctNjg0NS00NmMwLWIyYzEtMjUwZDRkOGViNDcwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibm9tYWRfZ3VpX2RldiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjQzZWZhNmRjLTRkZjAtNDc5OC1hNTRkLWNlYzVjZWVjNGRhZiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTWFya3VzIFNjaGVpZGdlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3QiLCJnaXZlbl9uYW1lIjoiTWFya3VzIiwiZmFtaWx5X25hbWUiOiJTY2hlaWRnZW4iLCJlbWFpbCI6Im1hcmt1cy5zY2hlaWRnZW5AZmhpLWJlcmxpbi5kZSJ9.RH89rgRe4sMsBY2lkcafYm4N5zyLrGY5kPgVlCN9Rgbtqi__ieuCv8T7R3epze9WM22ZMTdYBqjUMtom4gVLbPuukehssjznfiT1pKf-nE6vCNRLxBzwVu5_IsHEkfEm3CdLQ_0pbj3gMk1LItlaRVJ7qmb-BMkKlHbOwFBmIHt8sZvgzyw9zVjtXhxc0aq3dl1_5wSrz0lGsCOrimU2g-9B6T_6wp8ktpXuRW5KCfHKjVST0bB1TkhWCuMVK224c-ZQmYqLk6j19LjwMA1dyFMCjuoKNa6SQmW1ijtPD35311gd_UEI_NRibj3N9BMWQUrsJwEcpCQKylukdnN8fw", + "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSWFFIV1YxSEJ6cmh5U3h3UmRDdkhCcUF1WVNKRzZWSEJSZXg0TW5oX293In0.eyJqdGkiOiJmODdiNDQ3Ni02NzEzLTRmNDItYTZkNi1hMzllMTE2MzcxZjIiLCJleHAiOjE2NjM5NTg0NzIsIm5iZiI6MCwiaWF0IjoxNjYzOTIyNDkwLCJpc3MiOiJodHRwczovL25vbWFkLWxhYi5ldS9mYWlyZGkva2V5Y2xvYWsvYXV0aC9yZWFsbXMvZmFpcmRpX25vbWFkX3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjg4NzhhZjctNjg0NS00NmMwLWIyYzEtMjUwZDRkOGViNDcwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibm9tYWRfZ3VpX2RldiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6Ijc5Y2IwNzA5LTc3MTItNGI3NS1hYzNkLTFmYTQyNDc2MjNhNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTWFya3VzIFNjaGVpZGdlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3QiLCJnaXZlbl9uYW1lIjoiTWFya3VzIiwiZmFtaWx5X25hbWUiOiJTY2hlaWRnZW4iLCJlbWFpbCI6Im1hcmt1cy5zY2hlaWRnZW5AZmhpLWJlcmxpbi5kZSJ9.IgFHsT-PMGymNtkGZKV7uXpDQw6ByV5hYlawZpUjcQvucktNGYH8DmNT2Bmb9-axMq4fAJQ3HRcnmrbl4Do2aR0OSaLXKw9NG_IVXohTs1hO_kLX04orwI8o-sExMP12PQEvGb361OOBs9J_jm70X_u8tsUQFts6niRsjJPzkwjnATYtlpYEQeWqz9FMrYK8JfrGJ-LdD9PvNU6JTQevA7tkGZwNdfjEkSOS9afY1MOKGCqVZqn-cna7L5ACSgEhyKW6XCYXehZmUXJ5-GSCTEnOLaP8CX5RJwI9fmN9b5err7X7pkJA8RvmkRzncG9rjvj1TroTLY34_kSlnFDZsQ", "cookie": null } }, @@ -39,14 +39,14 @@ "page_size": 10, "order_by": "upload_create_time", "order": "desc", - "total": 3 + "total": 6 }, "data": [ { - "upload_id": "eXyPaEkuRWeKrgGbRohlVg", + "upload_id": "Ki9Q8rlqTg2mbH3F-vTcCw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "um6IA3yDTza2Pul4ybmIPw", + "calc_id": "kJVNJu-7QIiAA7mFfFCUHA", "published": true, "writers": [ { @@ -56,7 +56,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-09-27T15:57:23.473956+00:00", + "upload_create_time": "2022-09-23T08:41:25.964423+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -69,8 +69,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-09-27T15:57:23.479956+00:00", - "publish_time": "2022-09-27T15:57:23.476956+00:00", + "entry_create_time": "2022-09-23T08:41:25.970423+00:00", + "publish_time": "2022-09-23T08:41:25.967423+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -108,7 +108,7 @@ }, "properties": {} }, - "entry_id": "um6IA3yDTza2Pul4ybmIPw", + "entry_id": "kJVNJu-7QIiAA7mFfFCUHA", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -118,10 +118,10 @@ "license": "CC BY 4.0" }, { - "upload_id": "eXyPaEkuRWeKrgGbRohlVg", + "upload_id": "Ki9Q8rlqTg2mbH3F-vTcCw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "lYPqAtM6RMqWKzqliyjIMA", + "calc_id": "S4TS7jK6SZih_TlG6f6pzw", "published": true, "writers": [ { @@ -131,7 +131,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-09-27T15:57:23.473956+00:00", + "upload_create_time": "2022-09-23T08:41:25.964423+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -144,8 +144,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-09-27T15:57:23.478956+00:00", - "publish_time": "2022-09-27T15:57:23.476956+00:00", + "entry_create_time": "2022-09-23T08:41:25.969423+00:00", + "publish_time": "2022-09-23T08:41:25.967423+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -179,7 +179,7 @@ }, "properties": {} }, - "entry_id": "lYPqAtM6RMqWKzqliyjIMA", + "entry_id": "S4TS7jK6SZih_TlG6f6pzw", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -189,10 +189,10 @@ "license": "CC BY 4.0" }, { - "upload_id": "eXyPaEkuRWeKrgGbRohlVg", + "upload_id": "Ki9Q8rlqTg2mbH3F-vTcCw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "eJ7Y5NzfSjO84UiW_sCNnA", + "calc_id": "L2XdKIejR26-tY8oh-8Elg", "published": true, "writers": [ { @@ -202,7 +202,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-09-27T15:57:23.473956+00:00", + "upload_create_time": "2022-09-23T08:41:25.964423+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -215,8 +215,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-09-27T15:57:23.477956+00:00", - "publish_time": "2022-09-27T15:57:23.476956+00:00", + "entry_create_time": "2022-09-23T08:41:25.968423+00:00", + "publish_time": "2022-09-23T08:41:25.967423+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -251,7 +251,225 @@ }, "properties": {} }, - "entry_id": "eJ7Y5NzfSjO84UiW_sCNnA", + "entry_id": "L2XdKIejR26-tY8oh-8Elg", + "authors": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "license": "CC BY 4.0" + }, + { + "upload_id": "hjmWTEduRbu38CyRfioc6Q", + "parser_name": "parsers/vasp", + "origin": "Markus Scheidgen", + "calc_id": "wgUs1YepS_qsmjDxxDiPzg", + "published": true, + "writers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "datasets": [], + "n_quantities": 0, + "upload_create_time": "2022-09-23T08:40:30.393991+00:00", + "processed": true, + "mainfile": "upload/archive.json", + "main_author": { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + }, + "viewers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "entry_create_time": "2022-09-23T08:40:30.399991+00:00", + "publish_time": "2022-09-23T08:40:30.396991+00:00", + "with_embargo": false, + "domain": "dft", + "results": { + "material": { + "elements": [ + "Hf", + "Nb", + "Ta", + "Ti", + "Zr" + ], + "elements_exclusive": "Hf Nb Ta Ti Zr", + "chemical_formula_anonymous": "ABCDE", + "material_id": "test_material_id", + "structural_type": "bulk", + "chemical_formula_reduced": "HfNbTaTiZr", + "n_elements": 5, + "chemical_formula_descriptive": "HfNbTaTiZr", + "chemical_formula_hill": "HfNbTaTiZr" + }, + "method": { + "simulation": { + "program_version": "not processed", + "dft": { + "basis_set_type": "unavailable", + "core_electron_treatment": "unavailable", + "xc_functional_type": "not processed", + "xc_functional_names": [ + "GGA_X_PBE_SOL", + "GGA_C_PBE_SOL" + ] + }, + "program_name": "VASP" + } + }, + "properties": {} + }, + "entry_id": "wgUs1YepS_qsmjDxxDiPzg", + "authors": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "license": "CC BY 4.0" + }, + { + "upload_id": "hjmWTEduRbu38CyRfioc6Q", + "parser_name": "parsers/vasp", + "origin": "Markus Scheidgen", + "calc_id": "RmcAx4wdTfSaLjOLfIwuXw", + "published": true, + "writers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "datasets": [], + "n_quantities": 0, + "upload_create_time": "2022-09-23T08:40:30.393991+00:00", + "processed": true, + "mainfile": "upload/archive.json", + "main_author": { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + }, + "viewers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "entry_create_time": "2022-09-23T08:40:30.398991+00:00", + "publish_time": "2022-09-23T08:40:30.396991+00:00", + "with_embargo": false, + "domain": "dft", + "results": { + "material": { + "elements": [ + "C" + ], + "elements_exclusive": "C", + "chemical_formula_anonymous": "A", + "material_id": "test_material_id", + "structural_type": "2D", + "chemical_formula_reduced": "C", + "n_elements": 1, + "chemical_formula_descriptive": "C", + "chemical_formula_hill": "C" + }, + "method": { + "simulation": { + "program_version": "not processed", + "dft": { + "basis_set_type": "unavailable", + "core_electron_treatment": "unavailable", + "xc_functional_type": "not processed", + "xc_functional_names": [ + "LDA_X_PZ", + "LDA_C_PZ" + ] + }, + "program_name": "exciting" + } + }, + "properties": {} + }, + "entry_id": "RmcAx4wdTfSaLjOLfIwuXw", + "authors": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "license": "CC BY 4.0" + }, + { + "upload_id": "hjmWTEduRbu38CyRfioc6Q", + "parser_name": "parsers/vasp", + "origin": "Markus Scheidgen", + "calc_id": "DKtmMb41Q8CjZSZDJUdD-g", + "published": true, + "writers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "datasets": [], + "n_quantities": 0, + "upload_create_time": "2022-09-23T08:40:30.393991+00:00", + "processed": true, + "mainfile": "upload/archive.json", + "main_author": { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + }, + "viewers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "entry_create_time": "2022-09-23T08:40:30.397991+00:00", + "publish_time": "2022-09-23T08:40:30.396991+00:00", + "with_embargo": false, + "domain": "dft", + "results": { + "material": { + "elements": [ + "C", + "H" + ], + "elements_exclusive": "C H", + "chemical_formula_anonymous": "AB2", + "material_id": "test_material_id", + "structural_type": "molecule / cluster", + "chemical_formula_reduced": "CH3", + "n_elements": 2, + "chemical_formula_descriptive": "CH3", + "chemical_formula_hill": "CH3" + }, + "method": { + "simulation": { + "program_version": "not processed", + "dft": { + "basis_set_type": "unavailable", + "core_electron_treatment": "unavailable", + "xc_functional_type": "not processed", + "xc_functional_names": [ + "GGA_X_PBE_SOL", + "GGA_C_PBE_SOL" + ] + }, + "program_name": "VASP" + } + }, + "properties": {} + }, + "entry_id": "DKtmMb41Q8CjZSZDJUdD-g", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -264,7 +482,7 @@ }, "headers": { "connection": "close", - "content-length": "6647", + "content-length": "13124", "content-type": "application/json", "server": "uvicorn" } @@ -289,7 +507,7 @@ "headers": { "accept": "application/json", "content-type": "application/json", - "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSWFFIV1YxSEJ6cmh5U3h3UmRDdkhCcUF1WVNKRzZWSEJSZXg0TW5oX293In0.eyJqdGkiOiJjMWJmYTY0NS04MmQ1LTRmYjEtOGNiMS1mYWYwNGU2N2FhZWMiLCJleHAiOjE2NjQzMzAyMzMsIm5iZiI6MCwiaWF0IjoxNjY0Mjk0MjUxLCJpc3MiOiJodHRwczovL25vbWFkLWxhYi5ldS9mYWlyZGkva2V5Y2xvYWsvYXV0aC9yZWFsbXMvZmFpcmRpX25vbWFkX3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjg4NzhhZjctNjg0NS00NmMwLWIyYzEtMjUwZDRkOGViNDcwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibm9tYWRfZ3VpX2RldiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjQzZWZhNmRjLTRkZjAtNDc5OC1hNTRkLWNlYzVjZWVjNGRhZiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTWFya3VzIFNjaGVpZGdlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3QiLCJnaXZlbl9uYW1lIjoiTWFya3VzIiwiZmFtaWx5X25hbWUiOiJTY2hlaWRnZW4iLCJlbWFpbCI6Im1hcmt1cy5zY2hlaWRnZW5AZmhpLWJlcmxpbi5kZSJ9.VZhtBxWyIVTasiI2ZzThfLRoOmdJ4ATow9hiGVzYR-Dm0yZWPUmu2zDe0OpVOKIPKf4pqXutzavtEVuR1prAJnQZxSA6Glg9MnxPoACDYKtTWciocIbNJKET9pDwv-IzbCZROVd5xuvMYLmWj34fx1UZTpnnFTlOI3dRo_HJA_Vt6uLbwZnUOFnOYZgjK-M9nkKdV0vlVE10IDmewMm5MBDOK8WVna1ERv_OhPgcAMZkYfEW-a23pIp_VlNsUUw7Jo2cUf4PctjdQ1DCy3XiHYQbHpT1wWAhHfzX47TdWYo5a64L2CKm4Kj5ctgZXFzpizfdBa4MtIbnrkiw6cqU6A", + "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSWFFIV1YxSEJ6cmh5U3h3UmRDdkhCcUF1WVNKRzZWSEJSZXg0TW5oX293In0.eyJqdGkiOiI0ZGE5ZTRmOC01NjcxLTQzNTktYjU2NS0xMjg1ZTg1ODIwODMiLCJleHAiOjE2NjM5NTg0NzIsIm5iZiI6MCwiaWF0IjoxNjYzOTIyNDk1LCJpc3MiOiJodHRwczovL25vbWFkLWxhYi5ldS9mYWlyZGkva2V5Y2xvYWsvYXV0aC9yZWFsbXMvZmFpcmRpX25vbWFkX3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjg4NzhhZjctNjg0NS00NmMwLWIyYzEtMjUwZDRkOGViNDcwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibm9tYWRfZ3VpX2RldiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6Ijc5Y2IwNzA5LTc3MTItNGI3NS1hYzNkLTFmYTQyNDc2MjNhNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTWFya3VzIFNjaGVpZGdlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3QiLCJnaXZlbl9uYW1lIjoiTWFya3VzIiwiZmFtaWx5X25hbWUiOiJTY2hlaWRnZW4iLCJlbWFpbCI6Im1hcmt1cy5zY2hlaWRnZW5AZmhpLWJlcmxpbi5kZSJ9.GeFNgOEBxtRibwOc-mmDL0JHFP5yI3RWGwo7QyPnZTi4jnL7qEnkIG0_BbdBbC7B1hKppXjGGHLY2zgYMoPddJkeywXwqdZP72WY3Wijb8qpCilGHrMTToGobUNetR_NMRzjs1zTYp02ilzpeL_F0BCluMxxF9DHuKLtCrzPiOC-M7vvojxN1W6NjvJF0oWPRZH8hRoAtITJCEVjMFqA853UOKzYt3pxA8SAHeFCrshfLgHMqLLnqnE2awCzaVOznsnCYnvqftAkdDDcKkBi3AbrW-OkBPRsWgTptSkRMpTbz289Dqm7YnpiaTZcMM5PHnClOFpB3Q3Y6H86pYDS9Q", "cookie": null } }, @@ -304,14 +522,14 @@ "page_size": 10, "order_by": "entry_id", "order": "asc", - "total": 3 + "total": 6 }, "data": [ { - "upload_id": "eXyPaEkuRWeKrgGbRohlVg", + "upload_id": "hjmWTEduRbu38CyRfioc6Q", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "eJ7Y5NzfSjO84UiW_sCNnA", + "calc_id": "DKtmMb41Q8CjZSZDJUdD-g", "published": true, "writers": [ { @@ -321,7 +539,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-09-27T15:57:23.473956+00:00", + "upload_create_time": "2022-09-23T08:40:30.393991+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -334,8 +552,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-09-27T15:57:23.477956+00:00", - "publish_time": "2022-09-27T15:57:23.476956+00:00", + "entry_create_time": "2022-09-23T08:40:30.397991+00:00", + "publish_time": "2022-09-23T08:40:30.396991+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -370,7 +588,7 @@ }, "properties": {} }, - "entry_id": "eJ7Y5NzfSjO84UiW_sCNnA", + "entry_id": "DKtmMb41Q8CjZSZDJUdD-g", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -380,10 +598,10 @@ "license": "CC BY 4.0" }, { - "upload_id": "eXyPaEkuRWeKrgGbRohlVg", + "upload_id": "Ki9Q8rlqTg2mbH3F-vTcCw", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "lYPqAtM6RMqWKzqliyjIMA", + "calc_id": "L2XdKIejR26-tY8oh-8Elg", "published": true, "writers": [ { @@ -393,7 +611,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-09-27T15:57:23.473956+00:00", + "upload_create_time": "2022-09-23T08:41:25.964423+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -406,8 +624,151 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-09-27T15:57:23.478956+00:00", - "publish_time": "2022-09-27T15:57:23.476956+00:00", + "entry_create_time": "2022-09-23T08:41:25.968423+00:00", + "publish_time": "2022-09-23T08:41:25.967423+00:00", + "with_embargo": false, + "domain": "dft", + "results": { + "material": { + "elements": [ + "C", + "H" + ], + "elements_exclusive": "C H", + "chemical_formula_anonymous": "AB2", + "material_id": "test_material_id", + "structural_type": "molecule / cluster", + "chemical_formula_reduced": "CH3", + "n_elements": 2, + "chemical_formula_descriptive": "CH3", + "chemical_formula_hill": "CH3" + }, + "method": { + "simulation": { + "program_version": "not processed", + "dft": { + "basis_set_type": "unavailable", + "core_electron_treatment": "unavailable", + "xc_functional_type": "not processed", + "xc_functional_names": [ + "GGA_X_PBE_SOL", + "GGA_C_PBE_SOL" + ] + }, + "program_name": "VASP" + } + }, + "properties": {} + }, + "entry_id": "L2XdKIejR26-tY8oh-8Elg", + "authors": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "license": "CC BY 4.0" + }, + { + "upload_id": "hjmWTEduRbu38CyRfioc6Q", + "parser_name": "parsers/vasp", + "origin": "Markus Scheidgen", + "calc_id": "RmcAx4wdTfSaLjOLfIwuXw", + "published": true, + "writers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "datasets": [], + "n_quantities": 0, + "upload_create_time": "2022-09-23T08:40:30.393991+00:00", + "processed": true, + "mainfile": "upload/archive.json", + "main_author": { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + }, + "viewers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "entry_create_time": "2022-09-23T08:40:30.398991+00:00", + "publish_time": "2022-09-23T08:40:30.396991+00:00", + "with_embargo": false, + "domain": "dft", + "results": { + "material": { + "elements": [ + "C" + ], + "elements_exclusive": "C", + "chemical_formula_anonymous": "A", + "material_id": "test_material_id", + "structural_type": "2D", + "chemical_formula_reduced": "C", + "n_elements": 1, + "chemical_formula_descriptive": "C", + "chemical_formula_hill": "C" + }, + "method": { + "simulation": { + "program_version": "not processed", + "dft": { + "basis_set_type": "unavailable", + "core_electron_treatment": "unavailable", + "xc_functional_type": "not processed", + "xc_functional_names": [ + "LDA_X_PZ", + "LDA_C_PZ" + ] + }, + "program_name": "exciting" + } + }, + "properties": {} + }, + "entry_id": "RmcAx4wdTfSaLjOLfIwuXw", + "authors": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "license": "CC BY 4.0" + }, + { + "upload_id": "Ki9Q8rlqTg2mbH3F-vTcCw", + "parser_name": "parsers/vasp", + "origin": "Markus Scheidgen", + "calc_id": "S4TS7jK6SZih_TlG6f6pzw", + "published": true, + "writers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "datasets": [], + "n_quantities": 0, + "upload_create_time": "2022-09-23T08:41:25.964423+00:00", + "processed": true, + "mainfile": "upload/archive.json", + "main_author": { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + }, + "viewers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "entry_create_time": "2022-09-23T08:41:25.969423+00:00", + "publish_time": "2022-09-23T08:41:25.967423+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -441,7 +802,82 @@ }, "properties": {} }, - "entry_id": "lYPqAtM6RMqWKzqliyjIMA", + "entry_id": "S4TS7jK6SZih_TlG6f6pzw", + "authors": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "license": "CC BY 4.0" + }, + { + "upload_id": "Ki9Q8rlqTg2mbH3F-vTcCw", + "parser_name": "parsers/vasp", + "origin": "Markus Scheidgen", + "calc_id": "kJVNJu-7QIiAA7mFfFCUHA", + "published": true, + "writers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "datasets": [], + "n_quantities": 0, + "upload_create_time": "2022-09-23T08:41:25.964423+00:00", + "processed": true, + "mainfile": "upload/archive.json", + "main_author": { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + }, + "viewers": [ + { + "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", + "name": "Markus Scheidgen" + } + ], + "entry_create_time": "2022-09-23T08:41:25.970423+00:00", + "publish_time": "2022-09-23T08:41:25.967423+00:00", + "with_embargo": false, + "domain": "dft", + "results": { + "material": { + "elements": [ + "Hf", + "Nb", + "Ta", + "Ti", + "Zr" + ], + "elements_exclusive": "Hf Nb Ta Ti Zr", + "chemical_formula_anonymous": "ABCDE", + "material_id": "test_material_id", + "structural_type": "bulk", + "chemical_formula_reduced": "HfNbTaTiZr", + "n_elements": 5, + "chemical_formula_descriptive": "HfNbTaTiZr", + "chemical_formula_hill": "HfNbTaTiZr" + }, + "method": { + "simulation": { + "program_version": "not processed", + "dft": { + "basis_set_type": "unavailable", + "core_electron_treatment": "unavailable", + "xc_functional_type": "not processed", + "xc_functional_names": [ + "GGA_X_PBE_SOL", + "GGA_C_PBE_SOL" + ] + }, + "program_name": "VASP" + } + }, + "properties": {} + }, + "entry_id": "kJVNJu-7QIiAA7mFfFCUHA", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -451,10 +887,10 @@ "license": "CC BY 4.0" }, { - "upload_id": "eXyPaEkuRWeKrgGbRohlVg", + "upload_id": "hjmWTEduRbu38CyRfioc6Q", "parser_name": "parsers/vasp", "origin": "Markus Scheidgen", - "calc_id": "um6IA3yDTza2Pul4ybmIPw", + "calc_id": "wgUs1YepS_qsmjDxxDiPzg", "published": true, "writers": [ { @@ -464,7 +900,7 @@ ], "datasets": [], "n_quantities": 0, - "upload_create_time": "2022-09-27T15:57:23.473956+00:00", + "upload_create_time": "2022-09-23T08:40:30.393991+00:00", "processed": true, "mainfile": "upload/archive.json", "main_author": { @@ -477,8 +913,8 @@ "name": "Markus Scheidgen" } ], - "entry_create_time": "2022-09-27T15:57:23.479956+00:00", - "publish_time": "2022-09-27T15:57:23.476956+00:00", + "entry_create_time": "2022-09-23T08:40:30.399991+00:00", + "publish_time": "2022-09-23T08:40:30.396991+00:00", "with_embargo": false, "domain": "dft", "results": { @@ -516,7 +952,7 @@ }, "properties": {} }, - "entry_id": "um6IA3yDTza2Pul4ybmIPw", + "entry_id": "wgUs1YepS_qsmjDxxDiPzg", "authors": [ { "user_id": "68878af7-6845-46c0-b2c1-250d4d8eb470", @@ -529,7 +965,7 @@ }, "headers": { "connection": "close", - "content-length": "6656", + "content-length": "13133", "content-type": "application/json", "server": "uvicorn" } @@ -559,7 +995,7 @@ "headers": { "accept": "application/json", "content-type": "application/json", - "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSWFFIV1YxSEJ6cmh5U3h3UmRDdkhCcUF1WVNKRzZWSEJSZXg0TW5oX293In0.eyJqdGkiOiJjMWJmYTY0NS04MmQ1LTRmYjEtOGNiMS1mYWYwNGU2N2FhZWMiLCJleHAiOjE2NjQzMzAyMzMsIm5iZiI6MCwiaWF0IjoxNjY0Mjk0MjUxLCJpc3MiOiJodHRwczovL25vbWFkLWxhYi5ldS9mYWlyZGkva2V5Y2xvYWsvYXV0aC9yZWFsbXMvZmFpcmRpX25vbWFkX3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjg4NzhhZjctNjg0NS00NmMwLWIyYzEtMjUwZDRkOGViNDcwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibm9tYWRfZ3VpX2RldiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjQzZWZhNmRjLTRkZjAtNDc5OC1hNTRkLWNlYzVjZWVjNGRhZiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTWFya3VzIFNjaGVpZGdlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3QiLCJnaXZlbl9uYW1lIjoiTWFya3VzIiwiZmFtaWx5X25hbWUiOiJTY2hlaWRnZW4iLCJlbWFpbCI6Im1hcmt1cy5zY2hlaWRnZW5AZmhpLWJlcmxpbi5kZSJ9.VZhtBxWyIVTasiI2ZzThfLRoOmdJ4ATow9hiGVzYR-Dm0yZWPUmu2zDe0OpVOKIPKf4pqXutzavtEVuR1prAJnQZxSA6Glg9MnxPoACDYKtTWciocIbNJKET9pDwv-IzbCZROVd5xuvMYLmWj34fx1UZTpnnFTlOI3dRo_HJA_Vt6uLbwZnUOFnOYZgjK-M9nkKdV0vlVE10IDmewMm5MBDOK8WVna1ERv_OhPgcAMZkYfEW-a23pIp_VlNsUUw7Jo2cUf4PctjdQ1DCy3XiHYQbHpT1wWAhHfzX47TdWYo5a64L2CKm4Kj5ctgZXFzpizfdBa4MtIbnrkiw6cqU6A", + "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSWFFIV1YxSEJ6cmh5U3h3UmRDdkhCcUF1WVNKRzZWSEJSZXg0TW5oX293In0.eyJqdGkiOiI0ZGE5ZTRmOC01NjcxLTQzNTktYjU2NS0xMjg1ZTg1ODIwODMiLCJleHAiOjE2NjM5NTg0NzIsIm5iZiI6MCwiaWF0IjoxNjYzOTIyNDk1LCJpc3MiOiJodHRwczovL25vbWFkLWxhYi5ldS9mYWlyZGkva2V5Y2xvYWsvYXV0aC9yZWFsbXMvZmFpcmRpX25vbWFkX3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjg4NzhhZjctNjg0NS00NmMwLWIyYzEtMjUwZDRkOGViNDcwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibm9tYWRfZ3VpX2RldiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6Ijc5Y2IwNzA5LTc3MTItNGI3NS1hYzNkLTFmYTQyNDc2MjNhNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTWFya3VzIFNjaGVpZGdlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3QiLCJnaXZlbl9uYW1lIjoiTWFya3VzIiwiZmFtaWx5X25hbWUiOiJTY2hlaWRnZW4iLCJlbWFpbCI6Im1hcmt1cy5zY2hlaWRnZW5AZmhpLWJlcmxpbi5kZSJ9.GeFNgOEBxtRibwOc-mmDL0JHFP5yI3RWGwo7QyPnZTi4jnL7qEnkIG0_BbdBbC7B1hKppXjGGHLY2zgYMoPddJkeywXwqdZP72WY3Wijb8qpCilGHrMTToGobUNetR_NMRzjs1zTYp02ilzpeL_F0BCluMxxF9DHuKLtCrzPiOC-M7vvojxN1W6NjvJF0oWPRZH8hRoAtITJCEVjMFqA853UOKzYt3pxA8SAHeFCrshfLgHMqLLnqnE2awCzaVOznsnCYnvqftAkdDDcKkBi3AbrW-OkBPRsWgTptSkRMpTbz289Dqm7YnpiaTZcMM5PHnClOFpB3Q3Y6H86pYDS9Q", "cookie": null } }, @@ -573,7 +1009,7 @@ "optimade_filter" ] ], - "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* LPAR\n\t* IDENTIFIER\n\t* SIGNED_INT\n\t* NOT\n\t* ESCAPED_STRING\n\t* SIGNED_FLOAT\n", + "msg": "Could not parse optimade filter: Syntax error: Unable to parse filter .. Lark traceback: \nNo terminal matches '.' in the current parser context, at line 1 col 1\n\n.\n^\nExpected one of: \n\t* SIGNED_FLOAT\n\t* SIGNED_INT\n\t* ESCAPED_STRING\n\t* IDENTIFIER\n\t* NOT\n\t* LPAR\n", "type": "value_error.exception" } ] @@ -607,7 +1043,7 @@ "headers": { "accept": "application/json", "content-type": "application/json", - "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSWFFIV1YxSEJ6cmh5U3h3UmRDdkhCcUF1WVNKRzZWSEJSZXg0TW5oX293In0.eyJqdGkiOiJjMWJmYTY0NS04MmQ1LTRmYjEtOGNiMS1mYWYwNGU2N2FhZWMiLCJleHAiOjE2NjQzMzAyMzMsIm5iZiI6MCwiaWF0IjoxNjY0Mjk0MjUxLCJpc3MiOiJodHRwczovL25vbWFkLWxhYi5ldS9mYWlyZGkva2V5Y2xvYWsvYXV0aC9yZWFsbXMvZmFpcmRpX25vbWFkX3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjg4NzhhZjctNjg0NS00NmMwLWIyYzEtMjUwZDRkOGViNDcwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibm9tYWRfZ3VpX2RldiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjQzZWZhNmRjLTRkZjAtNDc5OC1hNTRkLWNlYzVjZWVjNGRhZiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTWFya3VzIFNjaGVpZGdlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3QiLCJnaXZlbl9uYW1lIjoiTWFya3VzIiwiZmFtaWx5X25hbWUiOiJTY2hlaWRnZW4iLCJlbWFpbCI6Im1hcmt1cy5zY2hlaWRnZW5AZmhpLWJlcmxpbi5kZSJ9.VZhtBxWyIVTasiI2ZzThfLRoOmdJ4ATow9hiGVzYR-Dm0yZWPUmu2zDe0OpVOKIPKf4pqXutzavtEVuR1prAJnQZxSA6Glg9MnxPoACDYKtTWciocIbNJKET9pDwv-IzbCZROVd5xuvMYLmWj34fx1UZTpnnFTlOI3dRo_HJA_Vt6uLbwZnUOFnOYZgjK-M9nkKdV0vlVE10IDmewMm5MBDOK8WVna1ERv_OhPgcAMZkYfEW-a23pIp_VlNsUUw7Jo2cUf4PctjdQ1DCy3XiHYQbHpT1wWAhHfzX47TdWYo5a64L2CKm4Kj5ctgZXFzpizfdBa4MtIbnrkiw6cqU6A", + "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJSWFFIV1YxSEJ6cmh5U3h3UmRDdkhCcUF1WVNKRzZWSEJSZXg0TW5oX293In0.eyJqdGkiOiI0ZGE5ZTRmOC01NjcxLTQzNTktYjU2NS0xMjg1ZTg1ODIwODMiLCJleHAiOjE2NjM5NTg0NzIsIm5iZiI6MCwiaWF0IjoxNjYzOTIyNDk1LCJpc3MiOiJodHRwczovL25vbWFkLWxhYi5ldS9mYWlyZGkva2V5Y2xvYWsvYXV0aC9yZWFsbXMvZmFpcmRpX25vbWFkX3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNjg4NzhhZjctNjg0NS00NmMwLWIyYzEtMjUwZDRkOGViNDcwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibm9tYWRfZ3VpX2RldiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6Ijc5Y2IwNzA5LTc3MTItNGI3NS1hYzNkLTFmYTQyNDc2MjNhNCIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiKiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoiTWFya3VzIFNjaGVpZGdlbiIsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3QiLCJnaXZlbl9uYW1lIjoiTWFya3VzIiwiZmFtaWx5X25hbWUiOiJTY2hlaWRnZW4iLCJlbWFpbCI6Im1hcmt1cy5zY2hlaWRnZW5AZmhpLWJlcmxpbi5kZSJ9.GeFNgOEBxtRibwOc-mmDL0JHFP5yI3RWGwo7QyPnZTi4jnL7qEnkIG0_BbdBbC7B1hKppXjGGHLY2zgYMoPddJkeywXwqdZP72WY3Wijb8qpCilGHrMTToGobUNetR_NMRzjs1zTYp02ilzpeL_F0BCluMxxF9DHuKLtCrzPiOC-M7vvojxN1W6NjvJF0oWPRZH8hRoAtITJCEVjMFqA853UOKzYt3pxA8SAHeFCrshfLgHMqLLnqnE2awCzaVOznsnCYnvqftAkdDDcKkBi3AbrW-OkBPRsWgTptSkRMpTbz289Dqm7YnpiaTZcMM5PHnClOFpB3Q3Y6H86pYDS9Q", "cookie": null } }, diff --git a/nomad/cli/admin/admin.py b/nomad/cli/admin/admin.py index 9c149c37de00770953ffe229eac11b4fb8e6e5aa..7adf4e15548cbc03166a9f1bb750d685f8a9bf44 100644 --- a/nomad/cli/admin/admin.py +++ b/nomad/cli/admin/admin.py @@ -244,7 +244,7 @@ def gui_config(): env_js_file = os.path.join(run_gui_folder, 'env.js') if not os.path.exists(env_js_file): with open(env_js_file, 'wt') as f: - conf = get_gui_config(proxy=True) + conf = get_gui_config() f.write(conf) # replace base path in all GUI files diff --git a/nomad/cli/dev.py b/nomad/cli/dev.py index d118b2abd0e99b1c7ae70d364ca119570f16a5ca..06bc58067e91a83fed6d7fe8c980facf4093e62e 100644 --- a/nomad/cli/dev.py +++ b/nomad/cli/dev.py @@ -139,7 +139,9 @@ def _all_metainfo_packages(): return export -def _generate_search_quantities(): +@dev.command(help='Generates a JSON with all search quantities.') +def search_quantities(): + _all_metainfo_packages() # Currently only quantities with "entry_type" are included. from nomad.metainfo.elasticsearch_extension import entry_type, Elasticsearch from nomad.datamodel import EntryArchive @@ -203,27 +205,15 @@ def parser_metadata(): print(json.dumps(code_metadata, indent=2, sort_keys=True)) -def get_gui_config(proxy: bool = False) -> str: +def get_gui_config(): '''Create a simplified and strippped version of the nomad.yaml contents that is used by the GUI. - - Args: - proxy: Whether the build is using a proxy. Affects whether calls to different - services use an explicit host+port+path as configured in the config, or whether - they simply use a relative path that a proxy can resolve. ''' from nomad import config - if proxy: - appBase = f'{config.services.api_base_path.rstrip("/")}' - northBase = f'{config.services.api_base_path.rstrip("/")}/north' - else: - appBase = f'{"https" if config.services.https else "http"}://{config.services.api_host}:{config.services.api_port}{config.services.api_base_path.rstrip("/")}' - northBase = f'{"https" if config.services.https else "http"}://{config.north.hub_host}:{config.north.hub_port}{config.services.api_base_path.rstrip("/")}/north' - return f'''window.nomadEnv = {{ - 'appBase': '{appBase}', - 'northBase': '{northBase}', + 'appBase': '{"https" if config.services.https else "http"}://{config.services.api_host}:{config.services.api_port}{config.services.api_base_path.rstrip("/")}', + 'northBase': '{"https" if config.services.https else "http"}://{config.north.hub_host}:{config.north.hub_port}{config.services.api_base_path.rstrip("/")}/north', 'keycloakBase': '{config.keycloak.public_server_url}', 'keycloakRealm': '{config.keycloak.realm_name}', 'keycloakClientId': '{config.keycloak.client_id}', @@ -238,12 +228,13 @@ def get_gui_config(proxy: bool = False) -> str: }};''' -@dev.command(help='Generates the GUI development config JS file based on NOMAD config.') +@dev.command(help='Generates a JS file that contains a subset of the nomad.yaml config needed by the GUI.') def gui_config(): print(get_gui_config()) -def _generate_example_upload_metadata(): +@dev.command(help='Generates a JSON file from example-uploads metadata in the YAML file.') +def example_upload_metadata(): import yaml with open('examples/data/uploads/example_uploads.yml') as infile: return yaml.load(infile, Loader=yaml.FullLoader) diff --git a/nomad/config.py b/nomad/config.py index 33eb0f9c078cde6a3dcde893129c5fe03e74f7d3..ae24e5f0c4b92190b076126aa8104a69c1406bf1 100644 --- a/nomad/config.py +++ b/nomad/config.py @@ -343,7 +343,7 @@ datacite = NomadConfig( ) meta = NomadConfig( - version='1.1.5', + version='1.1.4', commit=gitinfo.commit, deployment='devel', label=None, @@ -442,7 +442,7 @@ archive = NomadConfig( ui = NomadConfig( search_contexts={ - "include": ["entries", "eln", "materials", "solar_cells"], + "include": ["entries"], "exclude": [], "options": { "entries": { @@ -450,45 +450,44 @@ ui = NomadConfig( 'path': "entries", 'resource': 'entries', 'breadcrumb': "Entries search", - 'description': "Search individual entries", + 'description': "Search individual database entries", 'help': { 'title': 'Entries search', - 'content': inspect.cleandoc(r''' - This page allows you to **search entries** within NOMAD. Entries represent - individual calculations or experiments that have bee uploaded into NOMAD. - - The search page consists of three main elements: the filter panel, the search - bar, and the result list. - - The filter panel on the left allows you to graphically explore and enter - different search filters. It also gives a visual indication of the currently - active search filters for each category. This is a good place to start exploring - the available search filters and their meaning. - - The search bar allows you to specify filters by typing them in and pressing - enter. You can also start by simply typing keywords of interest, which will - toggle a list of suggestions. For numerical data you can also use range queries, - e.g. \`0.0 < band_gap <= 0.1\`. - - Notice that the units used in the filter panel and in the queries can be changed - using the **units** button on the top right corner. When using the search bar, - you can also specify a unit by typing the unit abbreviations, e.g. \`band_gap >= - 0.1 Ha\` - - The result list on the right is automatically updated according to the filters - you have specified. You can browse through the results by scrolling through the - available items and loading more results as you go. Here you can also change the - sorting of the results, modify the displayed columns, access individual entries - or even download the raw data or the archive document by selecting individual - entries and pressing the download button that appears. The ellipsis button shown - for each entry will navigate you to that entry's page. This entry page will show - more metadata, raw files, the entry's archive, and processing logs. - '''), + 'content': r''' + This page allows you to **search entries** within NOMAD. Entries represent + individual calculations or experiments that have bee uploaded into NOMAD. + + The search page consists of three main elements: the filter panel, the search + bar, and the result list. + + The filter panel on the left allows you to graphically explore and enter + different search filters. It also gives a visual indication of the currently + active search filters for each category. This is a good place to start exploring + the available search filters and their meaning. + + The search bar allows you to specify filters by typing them in and pressing + enter. You can also start by simply typing keywords of interest, which will + toggle a list of suggestions. For numerical data you can also use range queries, + e.g. \`0.0 < band_gap <= 0.1\`. + + Notice that the units used in the filter panel and in the queries can be changed + using the **units** button on the top right corner. When using the search bar, + you can also specify a unit by typing the unit abbreviations, e.g. \`band_gap >= + 0.1 Ha\` + + The result list on the right is automatically updated according to the filters + you have specified. You can browse through the results by scrolling through the + available items and loading more results as you go. Here you can also change the + sorting of the results, modify the displayed columns, access individual entries + or even download the raw data or the archive document by selecting individual + entries and pressing the download button that appears. The ellipsis button shown + for each entry will navigate you to that entry's page. This entry page will show + more metadata, raw files, the entry's archive, and processing logs. + ''', }, 'pagination': { 'order_by': 'upload_create_time', 'order': 'desc', - 'page_size': 20, }, 'columns': { 'enable': [ @@ -550,17 +549,6 @@ ui = NomadConfig( 'published': {'label': 'Access'} } }, - 'rows': { - 'actions': { - 'enable': True - }, - 'details': { - 'enable': True - }, - 'selection': { - 'enable': True - } - }, 'filter_menus': { 'include': [ 'material', @@ -590,350 +578,30 @@ ui = NomadConfig( ], 'exclude': [], 'options': { - 'material': {'label': 'Material', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'elements': {'label': 'Elements / Formula', 'level': 1, 'size': 'large', 'menu_items': {}}, - 'symmetry': {'label': 'Symmetry', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'method': {'label': 'Method', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'simulation': {'label': 'Simulation', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'dft': {'label': 'DFT', 'level': 2, 'size': 'small', 'menu_items': {}}, - 'gw': {'label': 'GW', 'level': 2, 'size': 'small', 'menu_items': {}}, + 'material': {'label': 'Material', 'level': 0, 'size': 'small'}, + 'elements': {'label': 'Elements / Formula', 'level': 1, 'size': 'large'}, + 'symmetry': {'label': 'Symmetry', 'level': 1, 'size': 'small'}, + 'method': {'label': 'Method', 'level': 0, 'size': 'small'}, + 'simulation': {'label': 'Simulation', 'level': 1, 'size': 'small'}, + 'dft': {'label': 'DFT', 'level': 2, 'size': 'small'}, + 'gw': {'label': 'GW', 'level': 2, 'size': 'small'}, 'experiment': {'label': 'Experiment', 'level': 1, 'size': 'small'}, - 'eels': {'label': 'EELS', 'level': 2, 'size': 'small', 'menu_items': {}}, + 'eels': {'label': 'EELS', 'level': 2, 'size': 'small'}, 'properties': {'label': 'Properties', 'level': 0, 'size': 'small'}, - 'electronic': {'label': 'Electronic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'optoelectronic': {'label': 'Optoelectronic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'vibrational': {'label': 'Vibrational', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'mechanical': {'label': 'Mechanical', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'spectroscopy': {'label': 'Spectroscopy', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'thermodynamic': {'label': 'Thermodynamic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'geometry_optimization': {'label': 'Geometry Optimization', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'eln': {'label': 'Electronic Lab Notebook', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'author': {'label': 'Author / Origin', 'level': 0, 'size': 'medium', 'menu_items': {}}, - 'dataset': {'label': 'Dataset', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'access': {'label': 'Access', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'ids': {'label': 'IDs', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'processed_data_quantities': {'label': 'Processed Data Quantities', 'level': 0, 'size': 'medium', 'menu_items': {}}, - 'optimade': {'label': 'Optimade', 'level': 0, 'size': 'medium', 'menu_items': {}}, - } - } - }, - "eln": { - 'label': "ELN", - 'path': "eln", - 'resource': 'entries', - 'breadcrumb': "ELN entries search", - 'description': "Search individual ELN entries", - 'help': { - 'title': 'ELN entries search', - 'content': inspect.cleandoc(r''' - This page allows you to specifically **search ELN entries** within NOMAD. - It is very similar to the *Entries search*, but with a reduced - filter set and specialized arrangement of default columns. - '''), - }, - 'pagination': { - 'order_by': 'upload_create_time', - 'order': 'desc', - 'page_size': 20, - }, - 'columns': { - 'enable': [ - 'entry_name', - 'entry_type', - 'upload_create_time', - 'authors' - ], - 'include': [ - 'entry_name', - 'results.material.chemical_formula_hill', - 'entry_type', - 'results.method.method_name', - 'results.method.simulation.program_name', - 'results.method.simulation.dft.basis_set_name', - 'results.method.simulation.dft.xc_functional_type', - 'results.material.structural_type', - 'results.material.symmetry.crystal_system', - 'results.material.symmetry.space_group_symbol', - 'results.material.symmetry.space_group_number', - 'results.eln.lab_ids', - 'results.eln.sections', - 'results.eln.methods', - 'results.eln.tags', - 'results.eln.instruments', - 'mainfile', - 'upload_create_time', - 'authors', - 'comment', - 'references', - 'datasets', - 'published', - ], - 'exclude': [], - 'options': { - 'entry_name': {'label': 'Name', 'align': 'left'}, - 'results.material.chemical_formula_hill': {'label': 'Formula', 'align': 'left'}, - 'entry_type': {'label': 'Entry type', 'align': 'left'}, - 'results.method.method_name': {'label': 'Method name'}, - 'results.method.simulation.program_name': {'label': 'Program name'}, - 'results.method.simulation.dft.basis_set_name': {'label': 'Basis set name'}, - 'results.method.simulation.dft.xc_functional_type': {'label': 'XC functional type'}, - 'results.material.structural_type': {'label': 'Structural type'}, - 'results.material.symmetry.crystal_system': {'label': 'Crystal system'}, - 'results.material.symmetry.space_group_symbol': {'label': 'Space group symbol'}, - 'results.material.symmetry.space_group_number': {'label': 'Space group number'}, - 'results.eln.lab_ids': {'label': 'Lab IDs'}, - 'results.eln.sections': {'label': 'Sections'}, - 'results.eln.methods': {'label': 'Methods'}, - 'results.eln.tags': {'label': 'Tags'}, - 'results.eln.instruments': {'label': 'Instruments'}, - 'mainfile': {'label': 'Mainfile', 'align': 'left'}, - 'upload_create_time': {'label': 'Upload time', 'align': 'left'}, - 'authors': {'label': 'Authors', 'align': 'left'}, - 'comment': {'label': 'Comment', 'align': 'left'}, - 'references': {'label': 'References', 'align': 'left'}, - 'datasets': {'label': 'Datasets', 'align': 'left'}, - 'published': {'label': 'Access'} - } - }, - 'rows': { - 'actions': { - 'enable': True - }, - 'details': { - 'enable': True - }, - 'selection': { - 'enable': True - } - }, - 'filter_menus': { - 'include': [ - 'material', - 'elements', - 'eln', - 'symmetry', - 'method', - 'symmetry', - 'dft', - 'gw', - 'experiment', - 'eels', - 'properties', - 'electronic', - 'optoelectronic', - 'vibrational', - 'mechanical', - 'spectroscopy', - 'thermodynamic', - 'geometry_optimization', - 'author', - 'dataset', - 'access', - 'ids', - 'processed_data_quantities', - 'optimade', - ], - 'exclude': [ - 'symmetry', - 'method', - 'simulation', - 'dft', - 'gw', - 'experiment', - 'eels', - 'properties', - 'electronic', - 'optoelectronic', - 'vibrational', - 'mechanical', - 'spectroscopy', - 'thermodynamic', - 'geometry_optimization', - 'optimade', - ], - 'options': { - 'material': {'label': 'Material', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'elements': {'label': 'Elements / Formula', 'level': 1, 'size': 'large', 'menu_items': {}}, - 'symmetry': {'label': 'Symmetry', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'method': {'label': 'Method', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'simulation': {'label': 'Simulation', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'dft': {'label': 'DFT', 'level': 2, 'size': 'small', 'menu_items': {}}, - 'gw': {'label': 'GW', 'level': 2, 'size': 'small', 'menu_items': {}}, - 'experiment': {'label': 'Experiment', 'level': 1, 'size': 'small'}, - 'eels': {'label': 'EELS', 'level': 2, 'size': 'small', 'menu_items': {}}, - 'properties': {'label': 'Properties', 'level': 0, 'size': 'small'}, - 'electronic': {'label': 'Electronic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'optoelectronic': {'label': 'Optoelectronic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'vibrational': {'label': 'Vibrational', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'mechanical': {'label': 'Mechanical', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'spectroscopy': {'label': 'Spectroscopy', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'thermodynamic': {'label': 'Thermodynamic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'geometry_optimization': {'label': 'Geometry Optimization', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'eln': {'label': 'Electronic Lab Notebook', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'author': {'label': 'Author / Origin', 'level': 0, 'size': 'medium', 'menu_items': {}}, - 'dataset': {'label': 'Dataset', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'access': {'label': 'Access', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'ids': {'label': 'IDs', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'processed_data_quantities': {'label': 'Processed Data Quantities', 'level': 0, 'size': 'medium', 'menu_items': {}}, - 'optimade': {'label': 'Optimade', 'level': 0, 'size': 'medium', 'menu_items': {}}, - } - } - }, - "materials": { - 'label': "Materials", - 'path': "materials", - 'resource': 'materials', - 'breadcrumb': "Materials search", - 'description': "Search materials that are identified from the entries", - 'help': { - 'title': 'Materials search', - 'content': inspect.cleandoc(r''' - This page allows you to **search materials** within NOMAD. NOMAD can - automatically detect the material from individual entries and can then group the - data by using these detected materials. This allows you to search individual - materials which have properties that are aggregated from several entries. - - The search page consists of three main elements: the filter panel, the search - bar, and the result list. - - The filter panel on the left allows you to graphically explore and enter - different search filters. It also gives a visual indication of the currently - active search filters for each category. This is a good place to start exploring - the available search filters and their meaning. - - The search bar allows you to specify filters by typing them in and pressing - enter. You can also start by simply typing keywords of interest, which will - toggle a list of suggestions. For numerical data you can also use range queries, - e.g. \`0.0 < band_gap <= 0.1\`. - - The units used in the filter panel and in the queries can be changed - using the **units** button on the top right corner. When using the search bar, - you can also specify a unit by typing the unit abbreviations, e.g. \`band_gap >= - 0.1 Ha\`. - - Notice that by default the properties that you search can be combined from - several different entries. If instead you wish to search for a material with an - individual entry fullfilling your search criteria, uncheck the **combine results - from several entries**-checkbox. - - The result list on the right is automatically updated according to the filters - you have specified. You can scroll through the available items and load more - results as you go. Here you can also change the sorting of the results, modify - the displayed columns and access individual materials. The ellipsis button shown - for each material will navigate you into the material overview page within the - NOMAD Encyclopedia. This page will show a more detailed overview for that - specific material. - '''), - }, - 'pagination': { - 'order_by': 'chemical_formula_hill', - 'order': 'asc' - }, - 'columns': { - 'enable': [ - 'chemical_formula_hill', - 'structural_type', - 'symmetry.structure_name', - 'symmetry.space_group_number', - 'symmetry.crystal_system', - ], - 'include': [ - 'chemical_formula_hill', - 'structural_type', - 'symmetry.structure_name', - 'symmetry.crystal_system', - 'symmetry.space_group_symbol', - 'symmetry.space_group_number', - 'material_id', - ], - 'exclude': [], - 'options': { - 'chemical_formula_hill': {'label': 'Formula', 'align': 'left'}, - 'structural_type': {'label': 'Structural type'}, - 'symmetry.structure_name': {'label': 'Structure name'}, - 'symmetry.crystal_system': {'label': 'Crystal system'}, - 'symmetry.space_group_symbol': {'label': 'Space group symbol'}, - 'symmetry.space_group_number': {'label': 'Space group number'}, - 'material_id': {'label': 'Material ID'}, - } - }, - 'rows': { - 'actions': { - 'enable': True - }, - 'details': { - 'enable': False - }, - 'selection': { - 'enable': False - } - }, - 'filter_menus': { - 'include': [ - 'material', - 'elements', - 'symmetry', - 'method', - 'simulation', - 'dft', - 'gw', - 'experiment', - 'eels', - 'properties', - 'electronic', - 'optoelectronic', - 'vibrational', - 'mechanical', - 'spectroscopy', - 'thermodynamic', - 'geometry_optimization', - 'eln', - 'author', - 'dataset', - 'access', - 'ids', - 'processed_data_quantities', - 'optimade', - 'combine', - ], - 'exclude': [], - 'options': { - 'material': {'label': 'Material', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'elements': {'label': 'Elements / Formula', 'level': 1, 'size': 'large', 'menu_items': {}}, - 'symmetry': {'label': 'Symmetry', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'method': {'label': 'Method', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'simulation': {'label': 'Simulation', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'dft': {'label': 'DFT', 'level': 2, 'size': 'small', 'menu_items': {}}, - 'gw': {'label': 'GW', 'level': 2, 'size': 'small', 'menu_items': {}}, - 'experiment': {'label': 'Experiment', 'level': 1, 'size': 'small'}, - 'eels': {'label': 'EELS', 'level': 2, 'size': 'small', 'menu_items': {}}, - 'properties': {'label': 'Properties', 'level': 0, 'size': 'small'}, - 'electronic': {'label': 'Electronic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'optoelectronic': {'label': 'Optoelectronic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'vibrational': {'label': 'Vibrational', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'mechanical': {'label': 'Mechanical', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'spectroscopy': {'label': 'Spectroscopy', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'thermodynamic': {'label': 'Thermodynamic', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'geometry_optimization': {'label': 'Geometry Optimization', 'level': 1, 'size': 'small', 'menu_items': {}}, - 'eln': {'label': 'Electronic Lab Notebook', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'author': {'label': 'Author / Origin', 'level': 0, 'size': 'medium', 'menu_items': {}}, - 'dataset': {'label': 'Dataset', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'access': {'label': 'Access', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'ids': {'label': 'IDs', 'level': 0, 'size': 'small', 'menu_items': {}}, - 'processed_data_quantities': {'label': 'Processed Data Quantities', 'level': 0, 'size': 'medium', 'menu_items': {}}, - 'optimade': {'label': 'Optimade', 'level': 0, 'size': 'medium', 'menu_items': {}}, - 'combine': { - 'actions': { - 'include': ['combine'], - 'options': { - 'combine': { - 'type': 'checkbox', - 'label': "Combine results from several entries", - 'quantity': 'combine' - } - } - } - } + 'electronic': {'label': 'Electronic', 'level': 1, 'size': 'small'}, + 'optoelectronic': {'label': 'Optoelectronic', 'level': 1, 'size': 'small'}, + 'vibrational': {'label': 'Vibrational', 'level': 1, 'size': 'small'}, + 'mechanical': {'label': 'Mechanical', 'level': 1, 'size': 'small'}, + 'spectroscopy': {'label': 'Spectroscopy', 'level': 1, 'size': 'small'}, + 'thermodynamic': {'label': 'Thermodynamic', 'level': 1, 'size': 'small'}, + 'geometry_optimization': {'label': 'Geometry Optimization', 'level': 1, 'size': 'small'}, + 'eln': {'label': 'Electronic Lab Notebook', 'level': 0, 'size': 'small'}, + 'author': {'label': 'Author / Origin', 'level': 0, 'size': 'medium'}, + 'dataset': {'label': 'Dataset', 'level': 0, 'size': 'small'}, + 'access': {'label': 'Access', 'level': 0, 'size': 'small'}, + 'ids': {'label': 'IDs', 'level': 0, 'size': 'small'}, + 'processed_data_quantities': {'label': 'Processed Data Quantities', 'level': 0, 'size': 'medium'}, + 'optimade': {'label': 'Optimade', 'level': 0, 'size': 'medium'}, } } }, diff --git a/nomad/metainfo/metainfo.py b/nomad/metainfo/metainfo.py index 1931a48d5bacd325b46b716f8ef87e6ef55948a4..4ac01786e2f71fc58699b382edbd2545529911e2 100644 --- a/nomad/metainfo/metainfo.py +++ b/nomad/metainfo/metainfo.py @@ -51,6 +51,78 @@ Elasticsearch = TypeVar('Elasticsearch') MSectionBound = TypeVar('MSectionBound', bound='MSection') SectionDefOrCls = Union['Section', 'SectionProxy', Type['MSection']] T = TypeVar('T') +_hash_method = 'sha1' # choose from hashlib.algorithms_guaranteed +reserved_name_re = re.compile(r'^(m_|a_|_+).*$') + +_primitive_types = { + str: lambda v: None if v is None else str(v), + # TODO it is more complicated than that, because bytes cannot be naturally serialized to JSON + # bytes: lambda v: None if v is None else bytes(v), + int: int, + float: lambda v: None if v is None else float(v), + bool: bool, + np.bool_: bool} + +primitive_type_aliases = {'string': str, 'boolean': bool} + +_primitive_type_names = { + primitive_type.__name__: primitive_type for primitive_type in _primitive_types} + +_primitive_type_names.update(primitive_type_aliases) + +_types_int_numpy = {np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64} +_types_int_python = {int} +_types_int = _types_int_python | _types_int_numpy +_types_float_numpy = {np.float16, np.float32, np.float64} +_types_float_python = {float} +_types_float = _types_float_python | _types_float_numpy +_types_num_numpy = _types_int_numpy | _types_float_numpy +_types_num_python = _types_int_python | _types_float_python +_types_num = _types_num_python | _types_num_numpy +_types_str_numpy = {np.str_} +_types_bool_numpy = {np.bool_} +_types_numpy = _types_num_numpy | _types_str_numpy | _types_bool_numpy +_delta_symbols = {'delta_', 'Δ'} + +validElnTypes = { + 'str': ['str', 'string'], + 'bool': ['bool', 'boolean'], + 'number': [x.__name__ for x in _types_num_python] + [f'np.{x.__name__}' for x in _types_num_numpy], + 'datetime': ['Datetime'], + 'enum': ['{type_kind: Enum, type_data: [Operator, Responsible_person]}'], + 'user': ['User'], + 'author': ['Author'], + 'reference': [''] +} + +validElnComponents = { + 'str': ['StringEditQuantity', 'FileEditQuantity', 'RichTextEditQuantity', 'EnumEditQuantity'], + 'bool': ['BoolEditQuantity'], + 'number': ['NumberEditQuantity', 'SliderEditQuantity'], + 'datetime': ['DateTimeEditQuantity'], + 'enum': ['EnumEditQuantity', 'AutocompleteEditQuantity', 'RadioEnumEditQuantity'], + 'user': ['UserEditQuantity'], + 'author': ['AuthorEditQuantity'], + 'reference': ['ReferenceEditQuantity'] +} + +_unset_value = '__UNSET__' + + +def _default_hash(): + return hashlib.new(_hash_method) + + +def _split_python_definition(definition_with_id: str) -> Tuple[list, Union[str, None]]: + ''' + Split a Python type name into names and an optional id. + + Example: + mypackage.mysection@myid ==> (['mypackage', 'mysection'], 'myid') + mypackage.mysection ==> (['mypackage', 'mysection'], None) + ''' + if '@' not in definition_with_id: + return definition_with_id.split('.'), None _unset_value = '__UNSET__' _HASH_OBJ = Type['hashlib._Hash'] # type: ignore @@ -1334,13 +1406,21 @@ class MSection(metaclass=MObjectMeta): # TODO find a way to make this a subclas if value == _unset_value: return - elif dimensions == 1: - if type(value) == str or not isinstance(value, IterableABC): - raise TypeError( - f'The shape of {quantity_def} requires an iterable value, but {value} is not iterable.') + if value == _unset_value: + return + + elif dimensions == 1: + if type(value) == str or not isinstance(value, IterableABC): + raise TypeError( + f'The shape of {quantity_def} requires an iterable value, but {value} is not iterable.') - value = [v for v in list( - self.__set_normalize(quantity_def, item) for item in value) if v != _unset_value] + list_value = list() + for item in value: + item_value = self.__set_normalize(quantity_def, item) + if item_value == _unset_value: + continue + list_value.append(item_value) + value = list_value else: raise MetainfoError( diff --git a/nomad/normalizing/material.py b/nomad/normalizing/material.py index beba2f130f863a0a335623aacfcb8d91e518b7cd..19dcff4a82e0a81d174138bee69f7ba5671e9895 100644 --- a/nomad/normalizing/material.py +++ b/nomad/normalizing/material.py @@ -27,9 +27,9 @@ import numpy as np import matid.geometry from matid.classification.structureclusterer import StructureClusterer from matid import Classifier -from matid.classifications import Class0D, Atom, Class1D, Material2D, Surface, Class3D, Unknown +from matid.classifications import Class0D, Atom, Class1D, Material2D, Surface, Class3D, Class2D, Unknown from matid.symmetry.symmetryanalyzer import SymmetryAnalyzer -from nomad.datamodel.results import Symmetry, Material, System, Relation, Structure, Prototype +from nomad.datamodel.results import Symmetry, Material, System, Relation, Structure, Prototype, Cell from nomad import atomutils from nomad.utils import hash from nomad.units import ureg @@ -568,7 +568,6 @@ class MaterialNormalizer(): clusters = self._perform_matid_clustering(structure_original) cluster_indices_list, cluster_symmetries = self._filter_clusters(clusters) - # Add all meaningful clusters to the topology topologies.append(original) for indices, symm in zip(cluster_indices_list, cluster_symmetries): @@ -579,9 +578,9 @@ class MaterialNormalizer(): continue topologies.append(subsystem) original = self._add_child_system(original, id_subsystem) - if subsystem.structural_type == 'surface': + if subsystem.structural_type == 'surface' or subsystem.structural_type == '2D': id_conv = f'/results/material/topology/{len(topologies)}' - symmsystem = self._create_conv_cell_system(symm, id_conv, id_subsystem) + symmsystem = self._create_conv_cell_system(symm, id_conv, id_subsystem, subsystem.structural_type) topologies.append(symmsystem) subsystem = self._add_child_system(subsystem, id_conv) @@ -589,8 +588,8 @@ class MaterialNormalizer(): # the topology is accepted and returned. TODO: This should be modified # in the future to also accept other kind of topologies besides # heterostructures. - if len([x for x in topologies if (x.structural_type in ('surface', '2D') and x.label == "subsystem")]) < 2: - return None + # if len([x for x in topologies if (x.structural_type in ('surface', '2D') and x.label == "subsystem")]) < 2: + # return None return topologies def _create_orig_topology(self, material: Material, top_id: str) -> Tuple[System, Structure]: @@ -648,7 +647,7 @@ class MaterialNormalizer(): subsystem.child_systems = parent_children_subsystem return subsystem - def _create_conv_cell_system(self, symm, top_id: str, parent_id: str): + def _create_conv_cell_system(self, symm, top_id: str, parent_id: str, structural_type: str): ''' Creates a new topology item for a conventional cell. ''' @@ -661,12 +660,21 @@ class MaterialNormalizer(): parent_system=parent_id ) conv_system = symm.get_conventional_system() - wyckoff_sets = symm.get_wyckoff_sets_conventional() - symmsystem.atoms = structure_from_ase_atoms(conv_system, wyckoff_sets, logger=self.logger) + if structural_type == 'surface': + wyckoff_sets = symm.get_wyckoff_sets_conventional() + symmsystem.atoms = structure_from_ase_atoms(conv_system, wyckoff_sets, logger=self.logger) + elif structural_type == '2D': + wyckoff_sets = None + symmsystem.atoms = structure_from_ase_atoms(conv_system, wyckoff_sets, logger=self.logger) + symmsystem.atoms.lattice_parameters.c = None + symmsystem.atoms.lattice_parameters.alpha = None + symmsystem.atoms.lattice_parameters.beta = None + symmsystem.atoms.cell_volume = None + subspecies = conv_system.get_chemical_symbols() symmsystem.structural_type = 'bulk' symmsystem = self._add_subsystem_properties(subspecies, symmsystem) - symmsystem = self._create_symmsystem(symm, symmsystem) + symmsystem = self._create_symmsystem(symm, symmsystem, structural_type) return symmsystem def _check_original_structure(self) -> Optional[Structure]: @@ -729,12 +737,15 @@ class MaterialNormalizer(): regions = cluster.regions number_of_atoms: List[int] = [] for region in regions: + # TODO: some how regions[0] is None if region: number_of_atoms.append(region.cell.get_number_of_atoms()) - + else: + number_of_atoms.append(-1) # TODO: What happens when there are 2 regions that have the same size? largest_region_index = number_of_atoms.index(max(number_of_atoms)) largest_region_system = regions[largest_region_index].cell + # TODO: only SymmetryAnalyzer for 2D and surface symm = SymmetryAnalyzer(largest_region_system) cluster_symmetries += [symm] @@ -748,6 +759,7 @@ class MaterialNormalizer(): Atom: 'atom', Class0D: 'molecule / cluster', Class1D: '1D', + Class2D: '2D', Surface: 'surface', Material2D: '2D', Unknown: 'unavailable'} @@ -787,13 +799,22 @@ class MaterialNormalizer(): subsystem.elements = elements return subsystem - def _create_symmsystem(self, symm: SymmetryAnalyzer, subsystem: System) -> System: + def _create_symmsystem(self, symm: SymmetryAnalyzer, subsystem: System, structural_type: str) -> System: """ Creates the subsystem with the symmetry information of the conventional cell """ conv_system = symm.get_conventional_system() subsystem.cell = cell_from_ase_atoms(conv_system) - symmetry = self._create_symmetry(subsystem, symm) + if structural_type == 'surface': + symmetry = self._create_symmetry(symm) + elif structural_type == '2D': + subsystem.cell.c = None + subsystem.cell.alpha = None + subsystem.cell.beta = None + subsystem.cell.volume = None + subsystem.cell.atomic_density = None + subsystem.cell.mass_density = None + symmetry = None subsystem.symmetry = symmetry prototype = self._create_prototype(symm, conv_system) spg_number = symm.get_space_group_number() @@ -803,7 +824,7 @@ class MaterialNormalizer(): subsystem.material_id = material_id return subsystem - def _create_symmetry(self, subsystem: System, symm: SymmetryAnalyzer) -> Symmetry: + def _create_symmetry(self, symm: SymmetryAnalyzer) -> Symmetry: international_short = symm.get_space_group_international_short() sec_symmetry = Symmetry() @@ -823,7 +844,11 @@ class MaterialNormalizer(): def _create_prototype(self, symm: SymmetryAnalyzer, conv_system: System) -> Prototype: spg_number = symm.get_space_group_number() atom_species = conv_system.get_atomic_numbers() - wyckoffs = conv_system.wyckoff_letters + #TODO: for some reasons conv_system comes back as Atoms or None + if type(conv_system) == Atoms or conv_system.wyckoff_letters is None: + wyckoffs = symm.get_wyckoff_letters_conventional() + else: + wyckoffs = conv_system.wyckoff_letters norm_wyckoff = atomutils.get_normalized_wyckoff(atom_species, wyckoffs) protoDict = atomutils.search_aflow_prototype(spg_number, norm_wyckoff) diff --git a/ops/kubernetes/deployments/prod-develop-values.yaml b/ops/kubernetes/deployments/prod-develop-values.yaml index 40faf0e0a9b6e11c25969f5ae0d888345a1af77e..c398c61e3a2a897715087ae457d20f183d9de903 100644 --- a/ops/kubernetes/deployments/prod-develop-values.yaml +++ b/ops/kubernetes/deployments/prod-develop-values.yaml @@ -1,5 +1,5 @@ version: - label: "1.1.5" + label: "1.1.4" isBeta: true usesBetaData: false officialUrl: "https://nomad-lab.eu/prod/v1/gui" diff --git a/ops/kubernetes/deployments/prod-staging-values.yaml b/ops/kubernetes/deployments/prod-staging-values.yaml index ce5c671101c789bc54b5e98e9c79a29d6703ad0e..a2de544d9a1433a7a0e04437a1b0baa8b28aaf66 100644 --- a/ops/kubernetes/deployments/prod-staging-values.yaml +++ b/ops/kubernetes/deployments/prod-staging-values.yaml @@ -1,5 +1,5 @@ version: - label: "1.1.5" + label: "1.1.4" isBeta: true usesBetaData: false officialUrl: "https://nomad-lab.eu/prod/v1/gui" diff --git a/ops/kubernetes/deployments/prod-test-values.yaml b/ops/kubernetes/deployments/prod-test-values.yaml index 577c25c73a96cab0acc9134759e78cc38528078b..fbcc9afd28e74beb9d50d4853c6679cb0c261939 100644 --- a/ops/kubernetes/deployments/prod-test-values.yaml +++ b/ops/kubernetes/deployments/prod-test-values.yaml @@ -1,5 +1,5 @@ version: - label: "1.1.5" + label: "1.1.4" isBeta: true usesBetaData: true officialUrl: "https://nomad-lab.eu/prod/v1/gui" diff --git a/ops/kubernetes/deployments/prod-util-values.yaml b/ops/kubernetes/deployments/prod-util-values.yaml index 48d45d1db6a477c24eb0cea4afcd84e0b7acd804..6c7b8c214deb907dd4c58d909a330d8478bf33f3 100644 --- a/ops/kubernetes/deployments/prod-util-values.yaml +++ b/ops/kubernetes/deployments/prod-util-values.yaml @@ -1,5 +1,5 @@ version: - label: "1.1.5" + label: "1.1.4" isBeta: true usesBetaData: false officialUrl: "https://nomad-lab.eu/prod/v1/gui" diff --git a/ops/kubernetes/deployments/prod-values.yaml b/ops/kubernetes/deployments/prod-values.yaml index e08c736f03da86fb6a8843545ad72cf5e64b8764..add83e441ec744ddc11c5ce7955fe6951e97dd2f 100644 --- a/ops/kubernetes/deployments/prod-values.yaml +++ b/ops/kubernetes/deployments/prod-values.yaml @@ -1,5 +1,5 @@ version: - label: "1.1.5" + label: "1.1.4" isBeta: true usesBetaData: false officialUrl: "https://nomad-lab.eu/prod/v1/gui" diff --git a/ops/kubernetes/nomad/Chart.yaml b/ops/kubernetes/nomad/Chart.yaml index 412c6d09d410ac3d1f161fd313420d9ecf650bc8..82a91c12ae838e5178e587009d64c626a603f852 100644 --- a/ops/kubernetes/nomad/Chart.yaml +++ b/ops/kubernetes/nomad/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v2 name: nomad description: A Helm chart for Kubernetes that only runs nomad services and uses externally hosted databases. -appVersion: "1.1.5" +appVersion: "1.1.4" type: application -version: 1.1.5 +version: 1.1.4 dependencies: - name: rabbitmq version: "8.30.1" diff --git a/ops/kubernetes/nomad/values.yaml b/ops/kubernetes/nomad/values.yaml index e8fb5ac082b45ca72879feaffb4ea9a5dfecd717..3cc59f6e236080745ff09b0250abfcec1c7b7e47 100644 --- a/ops/kubernetes/nomad/values.yaml +++ b/ops/kubernetes/nomad/values.yaml @@ -1,6 +1,6 @@ ## Default values for nomad@FAIRDI version: - label: "1.1.5" + label: "1.1.4" isTest: false isBeta: false usesBetaData: false diff --git a/tests/metainfo/test_yaml_schema.py b/tests/metainfo/test_yaml_schema.py index 9df452d73e62af04c6598949ee65b7ac23ae677c..18f0436176215f19c5a66d9fce32fc0c63eba8d8 100644 --- a/tests/metainfo/test_yaml_schema.py +++ b/tests/metainfo/test_yaml_schema.py @@ -20,6 +20,8 @@ import numpy as np import pytest import yaml +from nomad.datamodel.data import UserReference, AuthorReference +from nomad.metainfo.metainfo import validElnComponents, validElnTypes, primitive_type_aliases from nomad.utils import strip from nomad.metainfo import ( Package, MSection, Quantity, Reference, SubSection, Section, MProxy, MetainfoError, @@ -251,23 +253,78 @@ def test_sub_section_tree(): assert yaml.m_to_dict() == reference.m_to_dict() -@pytest.mark.parametrize('source_type, target_type', [ - pytest.param( - 'nomad.datamodel.data.ArchiveSection', - 'nomad.datamodel.data.ArchiveSection', - id='python'), - pytest.param('MySection', '/section_definitions/0', id='yaml'), -]) -def test_references(source_type, target_type): - yaml = yaml_to_package(f''' - sections: - MySection: - quantities: - reference: - type: {source_type} - ''') +@pytest.mark.parametrize("eln_type", validElnTypes.keys()) +@pytest.mark.parametrize("eln_component", sum(validElnComponents.values(), [])) +def test_datatype_component_annotations(eln_type, eln_component): + base_schema = ''' + m_def: 'nomad.metainfo.metainfo.Package' + sections: + Sample: + base_section: 'nomad.datamodel.metainfo.measurements.Sample' + quantities: + sample_id: + type: str + m_annotations: + eln: + component: StringEditQuantity + Process: + quantities: + quantity_name: + type: quantity_type + m_annotations: + eln: + component: eln_component + ''' + + for quantity_type in validElnTypes[eln_type]: + if eln_type == 'reference': + yaml_schema = base_schema.replace("quantity_type", "'#/Sample'").replace("eln_component", eln_component) + else: + yaml_schema = base_schema.replace("quantity_type", quantity_type).replace("eln_component", eln_component) + + if eln_component not in validElnComponents[eln_type]: + with pytest.raises(Exception) as exception: + package = yaml_to_package(yaml_schema) + type_name = quantity_type + if eln_type == 'number' or eln_type == 'datetime' or eln_type == 'enum' or eln_type == 'reference': + process = next(filter(lambda section: section['name'] == 'Process', package['section_definitions']), None) + quantity = process['quantities'][0] + if type(quantity.type).__name__ != 'type': + type_name = type(quantity.type).__name__ + if type_name in primitive_type_aliases.keys(): + type_name = primitive_type_aliases[type_name].__name__ + package.__init_metainfo__() + assert isinstance(exception.value, MetainfoError) + assert exception.value.args[0] == 'One constraint was violated: The component `%s` is not compatible with the quantity `%s` of the type `%s`. Accepted components: %s (there are 0 more violations)' \ + % (eln_component, 'quantity_name', type_name, ', '.join(validElnComponents[eln_type])) + + +yaml_schema_user_author = strip(''' +m_def: 'nomad.metainfo.metainfo.Package' +sections: + Sample: + base_section: 'nomad.datamodel.metainfo.measurements.Sample' + quantities: + my_user: + type: User + m_annotations: + eln: + component: UserEditQuantity + my_author: + type: Author + m_annotations: + eln: + component: AuthorEditQuantity +''') + + +def test_user_author_yaml_deserialization(): + des_m_package = yaml_to_package(yaml_schema_user_author) + des_sample = des_m_package['section_definitions'][0] + des_my_user = des_sample.quantities[0] + des_my_author = des_sample.quantities[1] - assert yaml.m_to_dict()['section_definitions'][0]['quantities'][0]['type'] == { - 'type_kind': 'reference', - 'type_data': target_type - } + assert des_my_user.name == 'my_user' + assert des_my_author.name == 'my_author' + assert isinstance(des_my_user.type, UserReference) + assert isinstance(des_my_author.type, AuthorReference) diff --git a/tests/normalizing/conftest.py b/tests/normalizing/conftest.py index 9f92bc5c8f7c10696f56775005afdbab2c5b1a3a..4b57800c7f86e0998941d38d3f27931482b881cb 100644 --- a/tests/normalizing/conftest.py +++ b/tests/normalizing/conftest.py @@ -29,6 +29,7 @@ from nomad.utils import strip from nomad.units import ureg from nomad.normalizing import normalizers from nomad.datamodel import EntryArchive +from nomad.datamodel.results import System, Relation, Symmetry, Prototype, Cell, Structure from nomad.datamodel.metainfo.simulation.run import Run, Program from nomad.datamodel.metainfo.simulation.method import ( Method, BasisSet, Electronic, DFT, XCFunctional, Functional, @@ -848,3 +849,39 @@ def band_path_cF_nonstandard() -> EntryArchive: filepath = 'tests/data/normalizers/band_structure/cF_nonstandard/INFO.OUT' archive = parse_file((parser_name, filepath)) return run_normalize(archive) + +def create_system(label: str, + structural_type: str, + elements: List[str], + formula_hill: str, + formula_reduced: str, + formula_anonymous: str, + system_relation: Relation, + indices: List[int]=None, + material_id: str=None, + atoms: Structure=None, + cell: Cell=None, + symmetry: Symmetry=None, + prototype: Prototype=None) -> System: + from nomad.datamodel.results import System + system = System() + system.label = label + system.structural_type = structural_type + system.elements = elements + system.formula_hill = formula_hill + system.formula_reduced = formula_reduced + system.formula_anonymous = formula_anonymous + system.system_relation = system_relation + if label == 'subsystem': + system.indices = indices + elif label == 'conventional cell': + system.material_id = material_id + system.atoms = atoms + system.cell = cell + system.symmetry = Symmetry() + system.symmetry = symmetry + system.prototype = prototype + else: + from warnings import warn + warn('Warning: subsystem label is missing') + return system diff --git a/tests/normalizing/test_material.py b/tests/normalizing/test_material.py index 4fc49194170c9f23b613866a9d346068ebc5913d..2f2e0423b51dd92921326b483c75895983425bd7 100644 --- a/tests/normalizing/test_material.py +++ b/tests/normalizing/test_material.py @@ -27,7 +27,9 @@ from matid.symmetry.wyckoffset import WyckoffSet from nomad.units import ureg from nomad import atomutils from nomad.utils import hash -from tests.normalizing.conftest import get_template_for_structure, get_template_topology +from nomad.datamodel.results import Symmetry, Cell, Prototype, Relation, Structure, LatticeParameters, WyckoffSet +from nomad.datamodel.optimade import Species +from tests.normalizing.conftest import get_template_for_structure, get_template_topology, create_system def assert_material(material): @@ -62,7 +64,8 @@ def assert_structure(structure, has_cell=True, has_wyckoff=False): assert structure.species[0].chemical_symbols if has_cell: assert len(structure.dimension_types) == 3 - assert np.sum(structure.dimension_types) == structure.nperiodic_dimensions + assert np.sum( + structure.dimension_types) == structure.nperiodic_dimensions assert structure.lattice_vectors.shape == (3, 3) a = structure.lattice_parameters.a b = structure.lattice_parameters.b @@ -145,9 +148,11 @@ def test_material_1d(one_d): assert conv.n_sites == 4 assert conv.species_at_sites == ["C", "C", "H", "H"] assert np.array_equal(conv.dimension_types, [1, 0, 0]) - assert conv.lattice_parameters.a.to(ureg.angstrom).magnitude == pytest.approx(2.459, abs=1e-3) + assert conv.lattice_parameters.a.to( + ureg.angstrom).magnitude == pytest.approx(2.459, abs=1e-3) assert conv.lattice_parameters.b.to(ureg.angstrom).magnitude == 0 - assert conv.lattice_parameters.c.to(ureg.angstrom).magnitude == pytest.approx(2.890, abs=1e-3) + assert conv.lattice_parameters.c.to( + ureg.angstrom).magnitude == pytest.approx(2.890, abs=1e-3) assert conv.lattice_parameters.alpha is None assert conv.lattice_parameters.beta.magnitude == pytest.approx(np.pi / 2) assert conv.lattice_parameters.gamma is None @@ -182,12 +187,15 @@ def test_material_2d(two_d): assert conv.n_sites == 2 assert conv.species_at_sites == ["C", "C"] assert np.array_equal(conv.dimension_types, [1, 1, 0]) - assert conv.lattice_parameters.a.to(ureg.angstrom).magnitude == pytest.approx(2.461, abs=1e-3) - assert conv.lattice_parameters.b.to(ureg.angstrom).magnitude == pytest.approx(2.461, abs=1e-3) + assert conv.lattice_parameters.a.to( + ureg.angstrom).magnitude == pytest.approx(2.461, abs=1e-3) + assert conv.lattice_parameters.b.to( + ureg.angstrom).magnitude == pytest.approx(2.461, abs=1e-3) assert conv.lattice_parameters.c.to(ureg.angstrom).magnitude == 0 assert conv.lattice_parameters.alpha is None assert conv.lattice_parameters.beta is None - assert conv.lattice_parameters.gamma.magnitude == pytest.approx(120 / 180 * np.pi) + assert conv.lattice_parameters.gamma.magnitude == pytest.approx( + 120 / 180 * np.pi) # Original structure assert_structure(two_d.results.properties.structures.structure_original) @@ -232,11 +240,15 @@ def test_material_bulk(bulk): conv = bulk.results.properties.structures.structure_conventional assert_structure(conv, has_wyckoff=True) assert conv.n_sites == 8 - assert conv.species_at_sites == ["Si", "Si", "Si", "Si", "Si", "Si", "Si", "Si"] + assert conv.species_at_sites == [ + "Si", "Si", "Si", "Si", "Si", "Si", "Si", "Si"] assert np.array_equal(conv.dimension_types, [1, 1, 1]) - assert conv.lattice_parameters.a.to(ureg.angstrom).magnitude == pytest.approx(5.431, abs=1e-3) - assert conv.lattice_parameters.b.to(ureg.angstrom).magnitude == pytest.approx(5.431, abs=1e-3) - assert conv.lattice_parameters.c.to(ureg.angstrom).magnitude == pytest.approx(5.431, abs=1e-3) + assert conv.lattice_parameters.a.to( + ureg.angstrom).magnitude == pytest.approx(5.431, abs=1e-3) + assert conv.lattice_parameters.b.to( + ureg.angstrom).magnitude == pytest.approx(5.431, abs=1e-3) + assert conv.lattice_parameters.c.to( + ureg.angstrom).magnitude == pytest.approx(5.431, abs=1e-3) assert conv.lattice_parameters.alpha.magnitude == pytest.approx(np.pi / 2) assert conv.lattice_parameters.beta.magnitude == pytest.approx(np.pi / 2) assert conv.lattice_parameters.gamma.magnitude == pytest.approx(np.pi / 2) @@ -281,7 +293,8 @@ def test_1d_material_identification(): pos = nanotube4.get_positions() pos += 0.2 * np.random.rand(pos.shape[0], pos.shape[1]) nanotube4.set_positions(pos) - hash4 = get_template_for_structure(nanotube4).results.material.material_id + hash4 = get_template_for_structure( + nanotube4).results.material.material_id assert hash4 == hash1 # Too distorted copy should not match @@ -303,7 +316,8 @@ def test_2d_material_identification(): indices=[0, 1] )] space_group_number = 191 - norm_hash_string = atomutils.get_symmetry_string(space_group_number, wyckoff_sets, is_2d=True) + norm_hash_string = atomutils.get_symmetry_string( + space_group_number, wyckoff_sets, is_2d=True) graphene_material_id = hash(norm_hash_string) # Graphene orthogonal cell @@ -322,13 +336,15 @@ def test_2d_material_identification(): ], pbc=True ) - material_id = get_template_for_structure(graphene).results.material.material_id + material_id = get_template_for_structure( + graphene).results.material.material_id assert material_id == graphene_material_id # Graphene orthogonal supercell graphene2 = graphene.copy() graphene2 *= [2, 1, 2] - material_id = get_template_for_structure(graphene2).results.material.material_id + material_id = get_template_for_structure( + graphene2).results.material.material_id assert material_id == graphene_material_id # Graphene primitive cell @@ -345,7 +361,8 @@ def test_2d_material_identification(): ], pbc=True ) - material_id = get_template_for_structure(graphene3).results.material.material_id + material_id = get_template_for_structure( + graphene3).results.material.material_id assert material_id == graphene_material_id # Slightly distorted system should match @@ -355,7 +372,8 @@ def test_2d_material_identification(): pos = graphene4.get_positions() pos += 0.05 * np.random.rand(pos.shape[0], pos.shape[1]) graphene4.set_positions(pos) - material_id = get_template_for_structure(graphene4).results.material.material_id + material_id = get_template_for_structure( + graphene4).results.material.material_id assert material_id == graphene_material_id # Too distorted system should not match @@ -364,7 +382,8 @@ def test_2d_material_identification(): np.random.seed(4) pos += 1 * np.random.rand(pos.shape[0], pos.shape[1]) graphene5.set_positions(pos) - material_id = get_template_for_structure(graphene5).results.material.material_id + material_id = get_template_for_structure( + graphene5).results.material.material_id assert material_id != graphene_material_id # Expected information for MoS2. MoS2 has finite thichkness unlike @@ -388,7 +407,8 @@ def test_2d_material_identification(): ) ] space_group_number = 11 - norm_hash_string = atomutils.get_symmetry_string(space_group_number, wyckoff_sets, is_2d=True) + norm_hash_string = atomutils.get_symmetry_string( + space_group_number, wyckoff_sets, is_2d=True) mos2_material_id = hash(norm_hash_string) # MoS2 orthogonal cell @@ -409,30 +429,36 @@ def test_2d_material_identification(): ], pbc=True ) - material_id = get_template_for_structure(atoms).results.material.material_id + material_id = get_template_for_structure( + atoms).results.material.material_id assert material_id == mos2_material_id # MoS2 orthogonal supercell atoms *= [2, 3, 1] - material_id = get_template_for_structure(atoms).results.material.material_id + material_id = get_template_for_structure( + atoms).results.material.material_id assert material_id == mos2_material_id def test_bulk_material_identification(): # Original system - wurtzite = ase.build.bulk("SiC", crystalstructure="wurtzite", a=3.086, c=10.053) - material_id_wurtzite = get_template_for_structure(wurtzite).results.material.material_id + wurtzite = ase.build.bulk( + "SiC", crystalstructure="wurtzite", a=3.086, c=10.053) + material_id_wurtzite = get_template_for_structure( + wurtzite).results.material.material_id # Rotated wurtzite2 = wurtzite.copy() wurtzite2.rotate(90, "z", rotate_cell=True) - material_id = get_template_for_structure(wurtzite2).results.material.material_id + material_id = get_template_for_structure( + wurtzite2).results.material.material_id assert material_id == material_id_wurtzite # Supercell wurtzite3 = wurtzite.copy() wurtzite3 *= [2, 3, 1] - materia_id = get_template_for_structure(wurtzite3).results.material.material_id + materia_id = get_template_for_structure( + wurtzite3).results.material.material_id assert materia_id == material_id_wurtzite # Slightly distorted system should match @@ -442,7 +468,8 @@ def test_bulk_material_identification(): pos = wurtzite4.get_positions() pos += 0.05 * np.random.rand(pos.shape[0], pos.shape[1]) wurtzite4.set_positions(pos) - material_id = get_template_for_structure(wurtzite4).results.material.material_id + material_id = get_template_for_structure( + wurtzite4).results.material.material_id assert material_id == material_id_wurtzite # Too distorted system should not match @@ -451,7 +478,8 @@ def test_bulk_material_identification(): np.random.seed(4) pos += 1 * np.random.rand(pos.shape[0], pos.shape[1]) wurtzite5.set_positions(pos) - material_id = get_template_for_structure(wurtzite5).results.material.material_id + material_id = get_template_for_structure( + wurtzite5).results.material.material_id assert material_id != material_id_wurtzite @@ -552,13 +580,15 @@ def test_conventional_structure(atoms, expected): """ entry = get_template_for_structure(atoms) structure_conventional = entry.results.properties.structures.structure_conventional - pos = structure_conventional.cartesian_site_positions.to(ureg.angstrom).magnitude + pos = structure_conventional.cartesian_site_positions.to( + ureg.angstrom).magnitude cell = structure_conventional.lattice_vectors.to(ureg.angstrom).magnitude pbc = np.array(structure_conventional.dimension_types, dtype=bool) assert np.array_equal(pbc, expected.get_pbc()) assert np.allclose(pos, expected.get_positions()) - assert np.array_equal(structure_conventional.species_at_sites, expected.get_chemical_symbols()) + assert np.array_equal( + structure_conventional.species_at_sites, expected.get_chemical_symbols()) assert np.allclose(cell, expected.get_cell()) @@ -663,168 +693,539 @@ def test_no_topology(fixture, request): assert not entry.results.material.topology -@pytest.mark.parametrize('entry_id', [ - pytest.param('heterostructure_2d_1', id='heterostructure-three-2D'), - pytest.param('heterostructure_surface_1', id='heterostructure-surface-1'), - pytest.param('heterostructure_surface_2', id='heterostructure-surface-2'), -]) -def test_topology_matid(entry_id): - # Load test data - with open(f'tests/data/normalizers/topology/{entry_id}.json', 'r') as f: - test_data = load(f) - - # Get system values - ref_topology = test_data['topology'] - ref_labels = np.array(ref_topology[0]['atoms']['labels']) - ref_positions = np.array(ref_topology[0]['atoms']['positions']) - ref_lattice_vectors = ref_topology[0]['atoms']['lattice_vectors'] - ref_pbc = ref_topology[0]['atoms']['periodic'] - - # Create ase.atoms - atoms = Atoms( - symbols=ref_labels, - positions=ref_positions, - cell=ref_lattice_vectors, - pbc=ref_pbc - ) - # Parse ase.atoms and get calculated topology - entry_archive = get_template_for_structure(atoms) +Symmetry_fcc = Symmetry(bravais_lattice="cF", crystal_system="cubic", hall_number=523, + hall_symbol="-F 4 2 3", point_group="m-3m", space_group_number=225, space_group_symbol="Fm-3m") + +Symmetry_bcc = Symmetry(bravais_lattice="cI", crystal_system="cubic", hall_number=529, + hall_symbol="-I 4 2 3", point_group="m-3m", space_group_number=229, space_group_symbol="Im-3m") + +# single Cu surface +Cu_fcc_100 = ase.build.fcc100('Cu', (3, 5, 5), vacuum=10, periodic=True) +Cu_fcc_100.rattle(stdev=0.001, seed=None, rng=None) +Cu_fcc_110 = ase.build.fcc110('Cu', (3, 5, 5), vacuum=10, periodic=True) +Cu_fcc_110.rattle(stdev=0.001, seed=None, rng=None) +Cell_Cu_fcc = [Cell(a=3.610000000000001 * ureg.angstrom, + b=3.610000000000001 * ureg.angstrom, + c=3.610000000000001 * ureg.angstrom, + alpha=1.5707963267948966 * ureg.rad, + beta=1.5707963267948966 * ureg.rad, + gamma=1.5707963267948966 * ureg.rad)] +formula_hill_Cu_fcc = ["Cu4"] +prototype_Cu_fcc = Prototype() +prototype_Cu_fcc.aflow_id = "A_cF4_225_a" +prototype_Cu_fcc.assignment_method = "normalized-wyckoff" +prototype_Cu_fcc.label = "225-Cu-cF4" +prototype_Cu_fcc.formula = "Cu4" + +# create Cu topology system +label_Cu = 'subsystem' +structural_type_Cu = 'surface' +elements_Cu = ['Cu'] +formula_hill_Cu = 'Cu75' +formula_reduced_Cu = 'Cu75' +formula_anonymous_Cu = 'A75' +system_relation = Relation() +system_relation.type = "subsystem" +indices_Cu = [i for i in range(75)] + +subsystem_Cu = create_system(label_Cu, structural_type_Cu, elements_Cu, formula_hill_Cu, formula_reduced_Cu, formula_anonymous_Cu, system_relation, indices=indices_Cu) +topologies_Cu = [subsystem_Cu] + +label_Cu_conv = 'conventional cell' +structural_type_Cu_conv = 'bulk' +formula_hill_Cu_conv = 'Cu4' +formula_reduced_Cu_conv = 'Cu4' +formula_anonymous_Cu_conv = 'A4' +material_id_Cu_conv = "3M6onRRrQbutydx916-Y15I79Z_X" +atoms_Cu_conv = Structure() +atoms_Cu_conv.dimension_types = [0, 0, 0] +atoms_Cu_conv.lattice_vectors = [[3.609999999999999, 0.0, 0.0], [0.0, 3.609999999999999e-10, 0.0], [0.0, 0.0, 3.609999999999999]] * ureg.angstrom +atoms_Cu_conv.cartesian_site_positions = [[0.0, 0.0, 0.0], [0.0, 1.8049999999999995, 1.8049999999999995], [1.8049999999999995, 0.0, 1.8049999999999995], [1.8049999999999995, 1.8049999999999995, 0.0]] * ureg.angstrom +atoms_Cu_conv.species_at_sites = ["Cu", "Cu", "Cu", "Cu"] +atoms_Cu_conv.cell_volume = 4.704588099999991e-29 +species = Species() +species.name = "Cu" +species.chemical_symbols = ["Cu"] +species.concentration = [1.0] +atoms_Cu_conv.species = [species] +atoms_Cu_conv.lattice_parameters = LatticeParameters() +atoms_Cu_conv.lattice_parameters.a = 3.609999999999999 * ureg.angstrom +atoms_Cu_conv.lattice_parameters.b = 3.609999999999999 * ureg.angstrom +atoms_Cu_conv.lattice_parameters.c = 3.609999999999999 * ureg.angstrom +atoms_Cu_conv.lattice_parameters.alpha = 1.5707963267948966 * ureg.rad +atoms_Cu_conv.lattice_parameters.beta = 1.5707963267948966 * ureg.rad +atoms_Cu_conv.lattice_parameters.gamma = 1.5707963267948966 * ureg.rad +wyckoff_sets = WyckoffSet() +wyckoff_sets.wyckoff_letter = "a" +wyckoff_sets.indices = [0, 1, 2, 3] +wyckoff_sets.element = "Cu" +atoms_Cu_conv.wyckoff_sets = [wyckoff_sets] + +convsystem_Cu = create_system(label_Cu_conv, structural_type_Cu_conv, elements_Cu, formula_hill_Cu_conv, formula_reduced_Cu_conv, formula_anonymous_Cu_conv, system_relation, material_id=material_id_Cu_conv, atoms=atoms_Cu_conv, cell=Cell_Cu_fcc[0], symmetry=Symmetry_fcc, prototype=prototype_Cu_fcc) +topologies_Cu.append(convsystem_Cu) + +# single Cr surface +Cr_bcc_100 = ase.build.bcc100('Cr', (5, 5, 5), vacuum=10, periodic=True) +Cr_bcc_100.rattle(stdev=0.001, seed=None, rng=None) +Cr_bcc_110 = ase.build.bcc110('Cr', (5, 5, 5), vacuum=10, periodic=True) +Cr_bcc_110.rattle(stdev=0.001, seed=None, rng=None) +Cell_Cr_bcc = [Cell(a=2.8800000000000014 * ureg.angstrom, + b=2.8800000000000014 * ureg.angstrom, + c=2.8800000000000014 * ureg.angstrom, + alpha=1.5707963267948966 * ureg.rad, + beta=1.5707963267948966 * ureg.rad, + gamma=1.5707963267948966 * ureg.rad)] +formula_hill_Cr_bcc = ["Cr2"] +prototype_Cr_bcc = Prototype() +prototype_Cr_bcc.aflow_id = "A_cI2_229_a" +prototype_Cr_bcc.assignment_method = "normalized-wyckoff" +prototype_Cr_bcc.label = "229-W-cI2" +prototype_Cr_bcc.formula = "W2" + +# create Cr topology system +label = 'subsystem' +structural_type = 'surface' +elements = ['Cr'] +formula_hill = 'Cr125' +formula_reduced = 'Cr125' +formula_anonymous = 'A125' +system_relation = Relation() +system_relation.type = "subsystem" +indices = [i for i in range(75)] + +subsystem_Cr = create_system(label, structural_type, elements, formula_hill, formula_reduced, formula_anonymous, system_relation, indices=indices) +topologies_Cr = [subsystem_Cr] + +label = 'conventional cell' +structural_type = 'bulk' +elements = ['Cr'] +formula_hill = 'Cr2' +formula_reduced = 'Cr2' +formula_anonymous = 'A2' +material_id = "MDlo8h4C2Ppy-kLY9fHRovgnTN9T" +atoms = Structure() +atoms.dimension_types = [0, 0, 0] +atoms.lattice_vectors = [[2.8800000000000014, 0.0, 0.0], [0.0, 2.8800000000000014e-10, 0.0], [0.0, 0.0, 2.8800000000000014]] * ureg.angstrom +atoms.cartesian_site_positions = [[0.0, 0.0, 0.0], [1.4400000000000007, 1.4400000000000007, 1.4400000000000007]] * ureg.angstrom +atoms.species_at_sites = ["Cr", "Cr"] +atoms.cell_volume = 2.388787200000006e-29 +species = Species() +species.name = "Cr" +species.chemical_symbols = ["Cr"] +species.concentration = [1.0] +atoms.species = [species] +atoms.lattice_parameters = LatticeParameters() +atoms.lattice_parameters.a = 2.8800000000000014 * ureg.angstrom +atoms.lattice_parameters.b = 2.8800000000000014 * ureg.angstrom +atoms.lattice_parameters.c = 2.8800000000000014 * ureg.angstrom +atoms.lattice_parameters.alpha = 1.5707963267948966 * ureg.rad +atoms.lattice_parameters.beta = 1.5707963267948966 * ureg.rad +atoms.lattice_parameters.gamma = 1.5707963267948966 * ureg.rad +wyckoff_sets = WyckoffSet() +wyckoff_sets.wyckoff_letter = "a" +wyckoff_sets.indices = [0, 1] +wyckoff_sets.element = "Cr" +atoms.wyckoff_sets = [wyckoff_sets] + +convsystem_Cr = create_system(label, structural_type, elements, formula_hill, formula_reduced, formula_anonymous, system_relation, material_id=material_id, atoms=atoms, cell=Cell_Cr_bcc[0], symmetry=Symmetry_bcc, prototype=prototype_Cr_bcc) +topologies_Cr.append(convsystem_Cr) + +# single Ni surface +Ni_fcc_111 = ase.build.fcc111('Ni', (3, 5, 5), vacuum=None, periodic=False) +Ni_fcc_111.rattle(stdev=0.001, seed=None, rng=None) +Cell_Ni_fcc = [Cell(a=3.52 * ureg.angstrom, + b=3.52 * ureg.angstrom, + c=3.52 * ureg.angstrom, + alpha=1.5707963267948966 * ureg.rad, + beta=1.5707963267948966 * ureg.rad, + gamma=1.5707963267948966 * ureg.rad)] +formula_hill_Ni_fcc = ["Ni4"] + +# create Ni topology +label = 'subsystem' +structural_type = 'surface' +elements = ['Ni'] +formula_hill = 'Ni75' +formula_reduced = 'Ni75' +formula_anonymous = 'A75' +system_relation = Relation() +system_relation.type = "subsystem" +indices = [i for i in range(75, 150)] + +subsystem_Ni = create_system(label, structural_type, elements, formula_hill, formula_reduced, formula_anonymous, system_relation, indices=indices) +topologies_Ni = [subsystem_Ni] + +label = 'conventional cell' +structural_type = 'bulk' +elements = ['Ni'] +formula_hill = 'Ni4' +formula_reduced = 'Ni4' +formula_anonymous = 'A4' +material_id = "NdIWxnQzlp-aeP1IM2d8YJ04h6T0" +atoms = Structure() +atoms.dimension_types = [0, 0, 0] +atoms.lattice_vectors = [[3.52, 0.0, 0.0], [0.0, 3.52, 0.0], [0.0, 0.0, 3.52]] * ureg.angstrom +atoms.cartesian_site_positions = [[0.0, 0.0, 0.0], [0.0, 1.76, 1.76], [1.76, 0.0, 1.76], [1.76, 1.76, 0.0]] * ureg.angstrom +atoms.species_at_sites = ["Ni", "Ni", "Ni", "Ni"] +atoms.cell_volume = 4.3614208000000044e-29 +species = Species() +species.name = "Ni" +species.chemical_symbols = ["Ni"] +species.concentration = [1.0] +atoms.species = [species] +atoms.lattice_parameters = LatticeParameters() +atoms.lattice_parameters.a = 3.52 * ureg.angstrom +atoms.lattice_parameters.b = 3.52 * ureg.angstrom +atoms.lattice_parameters.c = 3.52 * ureg.angstrom +atoms.lattice_parameters.alpha = 1.5707963267948966 * ureg.rad +atoms.lattice_parameters.beta = 1.5707963267948966 * ureg.rad +atoms.lattice_parameters.gamma = 1.5707963267948966 * ureg.rad +wyckoff_sets = WyckoffSet() +wyckoff_sets.wyckoff_letter = "a" +wyckoff_sets.indices = [0, 1, 2, 3] +wyckoff_sets.element = "Ni" +atoms.wyckoff_sets = [wyckoff_sets] + +convsystem_Ni = create_system(label, structural_type, elements, formula_hill, formula_reduced, formula_anonymous, system_relation, material_id=material_id, atoms=atoms, cell=Cell_Ni_fcc[0], symmetry=Symmetry_fcc, prototype=prototype_Cu_fcc) +topologies_Ni.append(convsystem_Ni) + +# stacked Cu and Ni surface +Cu_fcc_111 = ase.build.fcc111('Cu', (3, 5, 5), vacuum=None, periodic=False) +Cu_fcc_111.rattle(stdev=0.001, seed=None, rng=None) +Ni_fcc_111 = ase.build.fcc111('Ni', (3, 5, 5), vacuum=None, periodic=False) +Ni_fcc_111.rattle(stdev=0.001, seed=None, rng=None) +CuNi_fcc_111 = ase.build.stack(Cu_fcc_111, Ni_fcc_111, axis=2, distance=2, maxstrain=2.4) +Cell_CuNi = Cell_Cu_fcc + Cell_Ni_fcc +formula_hill_CuNi = formula_hill_Cu_fcc + formula_hill_Ni_fcc + +# create stacked Cu and Ni surface topology +topologies_Cu_Ni = topologies_Cu + topologies_Ni + +#------------------------------------------------ +# 2D +# Graphene +symbols_C = ['C', 'C'] +positions_C = [[0.0, 0.0, 2.1712595], + [1.2338620706831436, -0.712370598651782, 2.1712595]] * ureg.angstrom +cell_C = [[1.2338620706831436, -2.137111795955346, 0.0], + [1.2338620706831436, 2.137111795955346, 0.0], + [0.0, 0.0, 8.685038]] * ureg.angstrom +system_C = Atoms( + symbols=symbols_C, + positions=positions_C, + cell=cell_C, + pbc=True +) +system_C.rattle(stdev=0.001, seed=None, rng=None) +C_2 = ase.build.surface(system_C, (0, 0, 1), layers=1, periodic=True) +C_4 = ase.build.stack(C_2, C_2, axis=0) +C_8 = ase.build.stack(C_4, C_4, axis=1) +C_16 = ase.build.stack(C_8, C_8, axis=0) +C_32 = ase.build.stack(C_16, C_16, axis=1) + +# create graphene topology +label_C = 'subsystem' +structural_type_C = '2D' +elements_C = ['C'] +formula_hill_C = 'C32' +formula_reduced_C = 'C32' +formula_anonymous_C = 'A32' +system_relation = Relation() +system_relation.type = "subsystem" +indices_C = [i for i in range(32)] + +subsystem_C = create_system(label_C, structural_type_C, elements_C, formula_hill_C, formula_reduced_C, formula_anonymous_C, system_relation, indices=indices_C) +topologies_C = [subsystem_C] + +label_C_conv = 'conventional cell' +structural_type_C_conv = 'bulk' +elements_C_conv = ['C'] +formula_hill_C_conv = 'C2' +formula_reduced_C_conv = 'C2' +formula_anonymous_C_conv = 'A2' +material_id_C_conv = "jdP9AhZIFuYhubLWkm2FPtEV5IZA" +atoms_C_conv = Structure() +atoms_C_conv.dimension_types = [1, 1, 0] + +atoms_C_conv.lattice_vectors = [[2.4677241413662866, 0.0, 0.0], + [-1.2338620706831433, 2.1371117959553457, 0.0], + [0.0, 0.0, 1]] * ureg.angstrom +atoms_C_conv.cartesian_site_positions = [ + [1.2338620706831433, 0.712370598651782, 0.5], + [-2.7636130944313266e-16, 1.4247411973035641, 0.5]] * ureg.angstrom +atoms_C_conv.species_at_sites = ["C", "C"] +species = Species() +species.name = "C" +species.chemical_symbols = ["C"] +species.concentration = [1.0] +atoms_C_conv.species = [species] +atoms_C_conv.lattice_parameters = LatticeParameters() +atoms_C_conv.lattice_parameters.a = 2.4677241413662866 * ureg.angstrom +atoms_C_conv.lattice_parameters.b = 2.4677241413662866 * ureg.angstrom +atoms_C_conv.lattice_parameters.gamma = 2.0943951023931957 * ureg.rad +atoms_C_conv.wyckoff_sets = None + +Cell_C_conv = [Cell(a=atoms_C_conv.lattice_parameters.a, + b=atoms_C_conv.lattice_parameters.b, + gamma=atoms_C_conv.lattice_parameters.gamma)] + +convsystem_C = create_system(label_C_conv, structural_type_C_conv, elements_C_conv, formula_hill_C_conv, formula_reduced_C_conv, formula_anonymous_C_conv, system_relation, material_id=material_id_C_conv, atoms=atoms_C_conv, cell=Cell_C_conv[0], symmetry=None, prototype=None) +topologies_C.append(convsystem_C) + + +# boron nitride +symbols_BN = ['B', 'N'] +positions_BN = [[1.2557999125000436, -0.7250364175302085, 6.200847], [0.0, 0.0, 6.200847]] * ureg.angstrom +cell_BN = [[1.2557999125000436, -2.1751092525906257, 0.0], + [1.2557999125000436, 2.1751092525906257, 0.0], + [0.0, 0.0, 8.267796]] * ureg.angstrom +system_BN = Atoms( + symbols=symbols_BN, + positions=positions_BN, + cell=cell_BN, + pbc=True +) +system_BN.rattle(stdev=0.001, seed=None, rng=None) +BN_2D = ase.build.surface(system_BN, (0, 0, 1), layers=1, periodic=True) +BN_4 = ase.build.stack(BN_2D, BN_2D, axis=0) +BN_8 = ase.build.stack(BN_4, BN_4, axis=1) +BN_16 = ase.build.stack(BN_8, BN_8, axis=0) +BN_32 = ase.build.stack(BN_16, BN_16, axis=1) + +# create boron nitrid topology +label = 'subsystem' +structural_type = '2D' +elements = ['B', 'N'] +formula_hill = 'B16N16' +formula_reduced = 'B16N16' +formula_anonymous = 'A16B16' +system_relation = Relation() +system_relation.type = "subsystem" +indices_BN = [i for i in range(32)] + +subsystem_BN = create_system(label, structural_type, elements, formula_hill, formula_reduced, formula_anonymous, system_relation, indices=indices_BN) +topologies_BN = [subsystem_BN] + +label = 'conventional cell' +structural_type = 'bulk' +elements = ['B', 'N'] +formula_hill = 'BN' +formula_reduced = 'BN' +formula_anonymous = 'AB' +material_id = "RxRsol0dp1vDkU7-pE3v2exglkpM" +atoms = Structure() +atoms.dimension_types = [1, 1, 0] +atoms.lattice_vectors = [[2.510266994011973, 0.0, 0.0], + [-1.2551334970059864, 2.1739549870959678, 0.0], + [0.0, 0.0, 1]] * ureg.angstrom +atoms.cartesian_site_positions = [[0.0, 0.0, 0.5], + [9.441836090972668e-18, 1.449303324730645, 0.5]] * ureg.angstrom +atoms.species_at_sites = ["B", "N"] +species_B = Species() +species_B.name = "B" +species_B.chemical_symbols = ["B"] +species_B.concentration = [1.0] +species_N = Species() +species_N.name = "N" +species_N.chemical_symbols = ["N"] +species_N.concentration = [1.0] +atoms.species = [species_B, species_N] +atoms.lattice_parameters = LatticeParameters() +atoms.lattice_parameters.a = 2.510266994011973 * ureg.angstrom +atoms.lattice_parameters.b = 2.510266994011973 * ureg.angstrom +atoms.lattice_parameters.gamma = 2.0943951023931957 * ureg.rad +atoms.wyckoff_sets = None + +Cell_BN = [Cell(a=atoms.lattice_parameters.a, + b=atoms.lattice_parameters.b, + c=atoms.lattice_parameters.c, + alpha=atoms.lattice_parameters.alpha, + beta=atoms.lattice_parameters.beta, + gamma=atoms.lattice_parameters.gamma)] +convsystem_BN = create_system(label, structural_type, elements, formula_hill, formula_reduced, formula_anonymous, system_relation, material_id=material_id, atoms=atoms, cell=Cell_BN[0], symmetry=None, prototype=None) +topologies_BN.append(convsystem_BN) + +# MoS2 +symbols_MoS2 = ['Mo', 'S', 'S'] +positions_MoS2 = [[0.0, 0.0, 9.063556323175761], + [1.5920332323422965, 0.9191608152516547, 10.62711264635152], + [1.5920332323422965, 0.9191608152516547, 7.5]] * ureg.angstrom +cell_MoS2 = [[3.184066464684593, 0.0, 0.0], + [-1.5920332323422965, 2.7574824457549643, 0.0], + [0.0, 0.0, 18.127112646351521]]* ureg.angstrom +system_MoS2 = Atoms( + symbols=symbols_MoS2, + positions=positions_MoS2, + cell=cell_MoS2, + pbc=True +) +system_MoS2.rattle(stdev=0.001, seed=None, rng=None) +MoS2_2D = ase.build.surface(system_MoS2, (1,1,0), layers=4, vacuum=None, periodic=True) +stacked_2D_MoS2 = ase.build.stack(MoS2_2D, MoS2_2D, axis=2, distance=2.5) +stacked_2D_MoS2_2 = ase.build.stack(stacked_2D_MoS2, stacked_2D_MoS2, axis=2) +stacked_2D_MoS2_3 = ase.build.stack(stacked_2D_MoS2, stacked_2D_MoS2, axis=0) + +# create MoS2 topology +label = 'subsystem' +structural_type = '2D' +elements = ['Mo', 'S'] +formula_hill = 'Mo16S32' +formula_reduced = 'Mo16S32' +formula_anonymous = 'A32B16' +system_relation = Relation() +system_relation.type = "subsystem" +indices_MoS2 = [i for i in range(48)] +subsystem_MoS2 = create_system(label, structural_type, elements, formula_hill, formula_reduced, formula_anonymous, system_relation, indices=indices_MoS2) +topologies_MoS2 = [subsystem_MoS2] + +label = 'conventional cell' +structural_type = 'bulk' +elements = ['Mo', 'S'] +formula_hill = 'MoS2' +formula_reduced = 'MoS2' +formula_anonymous = 'A2B' +material_id = "KV4aYm-S1VJOH-SKeXXuG8JkTiGF" +atoms = Structure() +atoms.dimension_types = [1, 1, 0] +atoms.lattice_vectors = [[3.253646631826119, 0.0, 0.0], + [-1.6268233159130596, 2.8177406380990937, 0.0], + [0.0, 0.0, 3.124912396241947]] * ureg.angstrom +atoms.cartesian_site_positions = [[0.0, 0.0, 1.562456198120974], + [1.626823332181293, 0.9392468699738958, 3.124912396241947], + [1.626823332181293, 0.9392468699738958, 0.0]] * ureg.angstrom +atoms.species_at_sites = ["Mo", "S", "S"] +species_Mo = Species() +species_Mo.name = "Mo" +species_Mo.chemical_symbols = ["Mo"] +species_Mo.concentration = [1.0] +species_S = Species() +species_S.name = "S" +species_S.chemical_symbols = ["S"] +species_S.concentration = [1.0] +atoms.species = [species_Mo, species_S] +atoms.lattice_parameters = LatticeParameters() +atoms.lattice_parameters.a = 3.253646631826119 * ureg.angstrom +atoms.lattice_parameters.b = 3.253646631826119 * ureg.angstrom +atoms.lattice_parameters.gamma = 2.0943951023931957 * ureg.rad +atoms.wyckoff_sets = None +Cell_MoS2 = [Cell(a=atoms.lattice_parameters.a, + b=atoms.lattice_parameters.b, + gamma=atoms.lattice_parameters.gamma)] +convsystem_MoS2 = create_system(label, structural_type, elements, formula_hill, formula_reduced, formula_anonymous, system_relation, material_id=material_id, atoms=atoms, cell=Cell_MoS2[0], symmetry=None, prototype=None) +topologies_MoS2.append(convsystem_MoS2) + +# stacked 2D of C and BN +stacked_C_BN = ase.build.stack(BN_32, C_32, axis=2, maxstrain=6.7) +stacked_C_BN = ase.build.surface(stacked_C_BN, (0, 0, 1), layers=1, vacuum=10, periodic=True) + +# create stacked C and BN topologies +indices_C_stack = [i for i in range(32, 64)] +subsystem_C_stack = create_system(label_C, structural_type_C, elements_C, formula_hill_C, formula_reduced_C, formula_anonymous_C, system_relation, indices=indices_C_stack) +topologies_C_stack = [subsystem_C_stack] + +convsystem_C_stack = create_system(label_C_conv, structural_type_C_conv, elements_C_conv, formula_hill_C_conv, formula_reduced_C_conv, formula_anonymous_C_conv, system_relation, material_id=material_id_C_conv, atoms=atoms_C_conv, cell=Cell_C_conv[0], symmetry=None, prototype=None) +topologies_C_stack.append(convsystem_C_stack) + +topologies_C_BN = topologies_C_stack + topologies_BN + + +@pytest.mark.parametrize('surface, ref_topologies', [ + pytest.param(Cu_fcc_100, topologies_Cu, + id='single surface Cu FCC 100'), + pytest.param(Cu_fcc_110, topologies_Cu, + id='single surface Cu FCC 110'), + pytest.param(Cr_bcc_100, topologies_Cr, + id='single surface Cr BCC 100'), + pytest.param(Cr_bcc_110, topologies_Cr, id='single surface Cr BCC 110'), + pytest.param(CuNi_fcc_111, topologies_Cu_Ni, id='stacked surfaces of Cu and Ni'), + pytest.param(C_32, topologies_C, id='single 2D layer of graphene'), + pytest.param(BN_32, topologies_BN, id='single 2D layer of BN'), + pytest.param(stacked_2D_MoS2_3, topologies_MoS2, id='single 2D layer of MoS2'), + pytest.param(stacked_C_BN, topologies_C_BN, id='stacked layer of BN and C') + ]) +def test_surface_2D_topology(surface, ref_topologies): + entry_archive = get_template_for_structure(surface) topology = entry_archive.results.material.topology - - number_of_systems = 1 - outlier_threshold = 1 - + subsystem_topologies = topology[1:] # Compare topology with reference system topology. topology[0] is the original system - for cluster in topology[1:]: - if cluster['label'] == 'subsystem': - ref_number_of_systems = assert_subsystem(cluster, ref_topology, outlier_threshold) - number_of_systems += 1 - if ref_number_of_systems is None: - continue - elif cluster['label'] == 'conventional cell': - assert_conventional_cell(cluster, ref_topology) - assert number_of_systems == ref_number_of_systems - - -def assert_subsystem(cluster, ref_topology, outlier_threshold): - elements = cluster['elements'] - formula_hill = cluster['formula_hill'] - indices = cluster['indices'] - system_type = cluster['structural_type'] - if len(indices[0]) <= outlier_threshold: - return None - similarity_value = [] - ref_number_of_systems = 1 - for ref_cluster in ref_topology[1:]: - if ref_cluster['label'] != 'subsystem': - similarity_value += [0] - continue - ref_number_of_systems += 1 - # Load reference cluster. Pass if system type is not a surface or 2D. - ref_system_type = ref_cluster['structural_type'] - assert ref_system_type in {'2D', 'surface'} - - ref_elements = ref_cluster['elements'] - ref_formula_hill = ref_cluster['formula_hill'] - ref_indices = ref_cluster['indices'] - # Similarity calculation - indices_overlap = set( - ref_indices).intersection(set(indices[0])) - indices_similarity = len( - indices_overlap) / len(ref_indices) > 0.90 - element_similarity = set(ref_elements) == set(elements) - formula_hill_similarity = ref_formula_hill == formula_hill - system_type_similarity = ref_system_type == system_type - - similarity_value += [indices_similarity + element_similarity - + formula_hill_similarity + system_type_similarity] - - # Get most similar reference cluster. +1 because 0 is the original system - max_similarity = similarity_value.index(max(similarity_value)) + 1 - topology_max_similarity = ref_topology[max_similarity] - - # Indices: passes if the index overlapp is great enough - ref_indices_most_similar = topology_max_similarity['indices'] - indices_overlap_most_similar = set( - ref_indices_most_similar).intersection(set(indices[0])) - assert len(indices_overlap_most_similar) / \ - len(ref_indices_most_similar) > 0.85 - - # Elements - assert set(topology_max_similarity['elements']) == set(elements) - - # Formula hill: passes if the deviation is smaller than 15% - if topology_max_similarity['formula_hill'] != formula_hill: - ref_element_quantity = Formula(topology_max_similarity['formula_hill']).count() - element_quantity = Formula(formula_hill).count() - diff = 0 - for element in ref_element_quantity.keys(): - diff += abs(ref_element_quantity[element] - element_quantity[element]) - deviation = diff / sum(ref_element_quantity.values()) - assert deviation < 0.15 - - # System type - assert topology_max_similarity['structural_type'] == system_type - - return ref_number_of_systems - - -def assert_conventional_cell(cluster, ref_topology): - elements = cluster['elements'] - formula_hill = cluster['formula_hill'] - material_id = cluster['material_id'] - cell = cluster['cell'] - symmetry = cluster['symmetry'].m_to_dict() - - similarity_value = [] - - for ref_cluster in ref_topology[1:]: - if ref_cluster['label'] != 'conventional cell': - similarity_value += [0] - continue - ref_elements = ref_cluster['elements'] - ref_formula_hill = ref_cluster['formula_hill'] - ref_material_id = ref_cluster['material_id'] - ref_cell = ref_cluster['cell'] - ref_symmetry = ref_cluster['symmetry'] - - element_similarity = set(ref_elements) == set(elements) - formula_hill_similarity = ref_formula_hill == formula_hill - material_id_similarity = ref_material_id == material_id - symmetrie_similarity = 0 - - # Cell - cell_similarity = np.allclose(list(cell.values()), list(ref_cell.values()), rtol=1e-05, atol=1e-12) - - # Symmetry - for ref_symmetry_property_key, ref_symmetry_property in ref_symmetry.items(): - symmetry_property = symmetry[ref_symmetry_property_key] - symmetrie_similarity += symmetry_property == ref_symmetry_property - - symmetrie_similarity = symmetrie_similarity / len(symmetry) - - similarity_value += [element_similarity + formula_hill_similarity + material_id_similarity + cell_similarity + symmetrie_similarity] - - if similarity_value == []: - return - - # TODO: For now, this is necessary to prevent some tests from failing. The algorithm calculates conventional cells that are most likely not correct. Therefore, these conventional cells are not included in the reference data, but are calculated nevertheless. To prevent the comparison of these conventional cells, I set a threshold for the similarity value for comparison. This should be removed as soon as the test data is more suitable! - if max(similarity_value) <= 3: - return - - # Get most similar reference cluster. +1 because 0 is the original system - max_similarity = similarity_value.index(max(similarity_value)) + 1 - topology_max_similarity = ref_topology[max_similarity] - - # Elements, formula hill, material id: - assert topology_max_similarity['elements'] == elements - assert topology_max_similarity['formula_hill'] == formula_hill - assert topology_max_similarity['material_id'] == material_id - - # Cell: - assert np.allclose(list(cell.values()), list(topology_max_similarity['cell'].values()), rtol=3e-03, atol=1e-12) - - # Symmetry: - for ref_symmetry_property_key, ref_symmetry_property in ref_symmetry.items(): - symmetry_property = symmetry[ref_symmetry_property_key] - assert symmetry_property == ref_symmetry_property + assert len(subsystem_topologies) == len(ref_topologies) + for subsystem_topology in subsystem_topologies: + formula_hill = subsystem_topology['formula_hill'] + for ref_top_counter, ref_topology in enumerate(ref_topologies): + if ref_topology['formula_hill'] == formula_hill: + ref_formula_hill = ref_topology['formula_hill'] + ref_index = ref_top_counter + break + ref_elements = ref_topologies[ref_index]['elements'] + elements = subsystem_topology['elements'] + assert elements == ref_elements + assert formula_hill == ref_formula_hill + + ref_structural_type = ref_topologies[ref_index]['structural_type'] + structural_type = subsystem_topology['structural_type'] + assert ref_structural_type == structural_type + + if subsystem_topology['label'] == 'conventional cell': + + # Cell + ref_cell = ref_topologies[ref_index]['cell'] + cell = subsystem_topology['cell'] + if ref_structural_type == '2D': + assert np.allclose(list(cell.values()), list(ref_cell.values()), rtol=1e-05, atol=1e-9) + else: + assert np.allclose(list(cell.values())[:6], list(ref_cell.values()), rtol=1e-05, atol=1e-9) + + # Symmetry + if ref_topologies[ref_index].symmetry: + symmetry = subsystem_topology['symmetry'].m_to_dict() + ref_symmetry = ref_topologies[ref_index]['symmetry'].m_to_dict() + for ref_symmetry_property_key, ref_symmetry_property in ref_symmetry.items(): + symmetry_property = symmetry[ref_symmetry_property_key] + assert ref_symmetry_property == symmetry_property + else: + assert subsystem_topology.symmetry == ref_topologies[ref_index].symmetry + + # Prototype + if ref_topologies[ref_index].prototype: + prototype = subsystem_topology['prototype'].m_to_dict() + ref_prototype = ref_topologies[ref_index]['prototype'].m_to_dict() + for ref_prototype_property_key, ref_prototype_property in ref_prototype.items(): + prototype_property = prototype[ref_prototype_property_key] + assert ref_prototype_property == prototype_property + else: + assert ref_topologies[ref_index].prototype == subsystem_topology.prototype + + # Atoms + atoms = subsystem_topology['atoms'].m_to_dict() + ref_atoms = ref_topologies[ref_index]['atoms'].m_to_dict() + for ref_atoms_property_key, ref_atoms_property in ref_atoms.items(): + atoms_property = atoms[ref_atoms_property_key] + if type(atoms_property) == list: + property = atoms_property[0] + if type(property) == list: + assert np.allclose(atoms_property, ref_atoms_property, rtol=1e-05, atol=1e-9) + elif type(property) == dict: + for property_keys, property_values in property.items(): + ref_property = ref_atoms_property[0][property_keys] + assert property_values == ref_property + elif type(atoms_property) == dict: + for property_keys, property_values in atoms_property.items(): + ref_property_value = ref_atoms_property[property_keys] + if type(property_values) == float: + assert np.allclose(property_values, ref_property_value, rtol=1e-05, atol=1e-9) + else: + assert ref_atoms_property == property_values + else: + if type(atoms_property) == float: + assert np.allclose(ref_atoms_property, atoms_property, rtol=1e-05, atol=1e-9) + else: + assert ref_atoms_property == atoms_property + + + elif subsystem_topology['label'] == 'subsystem': + # Indices: passes if the index overlapp is large enough + ref_indices = ref_topologies[ref_index].indices + indices = subsystem_topology['indices'][0] + indices_overlap = set(ref_indices).intersection(set(indices)) + assert len(indices_overlap) / \ + len(ref_indices) > 0.85