{ "cells": [ { "cell_type": "code", "execution_count": 5, "id": "97e4d8d2", "metadata": {}, "outputs": [], "source": [ "import rdflib" ] }, { "cell_type": "markdown", "id": "7d1c1b02", "metadata": {}, "source": [ "# Querying the Knowledge Graph\n", "\n", "Testing the KG and ontology with SPARQL built from the requirements and competency questions.\n", "\n", "\n", "|Identifier|Requirement or Competency Question |\n", "|---------|-----------------------------------------------------------------------------------------------------------------------------|\n", "|R1 |Articles have title, year, journal, issue, abstract, volume and author |\n", "|R2 |Each article may refer to one or more experiments |\n", "|R3 |Each experiment must have a catalyst |\n", "|R4 |Each experiment may have additional inputs apart from the catalyst |\n", "|R5 |Each experiment must specify surface area and band gap |\n", "|R6 |An experiment must indicate operation conditions, including temperature, pressure, reaction time, medium and operation mode |\n", "|R7 |Experiments may also indicate type of reactor |\n", "|R8 |Electrocatalysis and Photoelectrocatalysis experiments may also indicate electrochemical configuration |\n", "|R9 |Photocatalysis and Photoelectrocatalysis experiments must indicate the light source used, including type of light, lamp, wavelength, irradiance and power|\n", "|R10 |TiO2 catalysts must indicate crystal structure |\n", "|R11 |Medium reaction must be either gas or liquid |\n", "|R12 |When reaction medium is liquid, the pH value must be indicated |\n", "|R13 |Operation modes must be either batch or continuous |\n", "|R14 |When the operation mode is continuous, the spacial speed value must be indicated |\n", "|R15 |Each experiment may have one or more outputs |\n", "|R16 |When the light source is not solar or solar simulation, the wavelength must be indicated |\n", "|R17 |An experiment may provide conversion metrics, quantum efficiency metrics and electrochemical metrics |\n", "|CQ1 |How many experiments are reported per year? |\n", "|CQ2 |How many experiments are reported per country? |\n", "|CQ3 |How many experiments are there per type of catalyst? |\n", "|CQ4 |Which articles have been published in the ACS nano Journal in 2020 in volume 14? |\n", "|CQ5 |Which experiments use TiO2 as catalyst, liquid medium an produce H2 as output? |\n", "|CQ6 |Which experiments use TiO2 as catalyst, liquid medium and produce the most H2 output in µmol/gh? |\n" ] }, { "cell_type": "code", "execution_count": 6, "id": "f71f4170", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Failed to convert Literal lexical form to value. Datatype=http://www.w3.org/2001/XMLSchema#float, Converter=\n", "Traceback (most recent call last):\n", " File \"/Users/aiglesias/miniconda3/envs/kgc/lib/python3.9/site-packages/rdflib/term.py\", line 2119, in _castLexicalToPython\n", " return conv_func(lexical) # type: ignore[arg-type]\n", "ValueError: could not convert string to float: '4 ,6 '\n", "Failed to convert Literal lexical form to value. Datatype=http://www.w3.org/2001/XMLSchema#float, Converter=\n", "Traceback (most recent call last):\n", " File \"/Users/aiglesias/miniconda3/envs/kgc/lib/python3.9/site-packages/rdflib/term.py\", line 2119, in _castLexicalToPython\n", " return conv_func(lexical) # type: ignore[arg-type]\n", "ValueError: could not convert string to float: '0.26:1'\n", "Failed to convert Literal lexical form to value. Datatype=http://www.w3.org/2001/XMLSchema#float, Converter=\n", "Traceback (most recent call last):\n", " File \"/Users/aiglesias/miniconda3/envs/kgc/lib/python3.9/site-packages/rdflib/term.py\", line 2119, in _castLexicalToPython\n", " return conv_func(lexical) # type: ignore[arg-type]\n", "ValueError: could not convert string to float: '0.65:1'\n", "Failed to convert Literal lexical form to value. Datatype=http://www.w3.org/2001/XMLSchema#float, Converter=\n", "Traceback (most recent call last):\n", " File \"/Users/aiglesias/miniconda3/envs/kgc/lib/python3.9/site-packages/rdflib/term.py\", line 2119, in _castLexicalToPython\n", " return conv_func(lexical) # type: ignore[arg-type]\n", "ValueError: could not convert string to float: '0.5 + 1.0'\n", "Failed to convert Literal lexical form to value. Datatype=http://www.w3.org/2001/XMLSchema#float, Converter=\n", "Traceback (most recent call last):\n", " File \"/Users/aiglesias/miniconda3/envs/kgc/lib/python3.9/site-packages/rdflib/term.py\", line 2119, in _castLexicalToPython\n", " return conv_func(lexical) # type: ignore[arg-type]\n", "ValueError: could not convert string to float: '0.92:1'\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2193658\n" ] } ], "source": [ "g = rdflib.Graph()\n", "g.parse(\"../ontology/solarchem-core.owl\", format='turtle')\n", "g.parse(\"result/solarchem-kg.nt\")\n", "print(len(g))" ] }, { "cell_type": "markdown", "id": "a6c603db", "metadata": {}, "source": [ "## R1: Articles have title, year, journal, issue, abstract, volume and author" ] }, { "cell_type": "code", "execution_count": 4, "id": "23532dc9", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of articles with all properties: 1254\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX schema: \n", "\n", " SELECT (COUNT (DISTINCT ?article) AS ?count)\n", " WHERE {\n", " ?article a schema:ScholarlyArticle ;\n", " bibo:doi ?doi ;\n", " schema:name ?name ;\n", " schema:volumeNumber ?volume ;\n", " schema:issueNumber ?issue ;\n", " schema:datePublished ?date ;\n", " schema:pageStart ?pagestart;\n", " schema:pageEnd ?pageend;\n", " schema:isPartOf ?journal .\n", " } \n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Number of articles with all properties: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "f1d1736a", "metadata": {}, "source": [ "## R2: Each article may refer to one or more experiments" ] }, { "cell_type": "code", "execution_count": 10, "id": "b5f0dee4", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of articles with experiments associated: 1093\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", "\n", " SELECT (COUNT (DISTINCT ?article) AS ?count)\n", " WHERE {\n", " ?article a schema:ScholarlyArticle ;\n", " solar:hasExperimentExecution ?expexec .\n", " }\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Number of articles with experiments associated: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "a2d9030a", "metadata": {}, "source": [ "## R3: Each experiment must have a catalyst" ] }, { "cell_type": "code", "execution_count": 11, "id": "44455bfe", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "http://w3id.org/solar/i/ExpExec/7837 http://purl.obolibrary.org/obo/CHEBI_50860 Reduced graphene Oxide\n", "http://w3id.org/solar/i/ExpExec/5111 http://www.wikidata.org/entity/Q193521 TiO2\n", "http://w3id.org/solar/i/ExpExec/6617 http://w3id.org/solar/i/Chemical/CsPbBr3 CsPbBr3\n", "http://w3id.org/solar/i/ExpExec/7686 http://w3id.org/solar/i/Chemical/TiMOF+and+ZnTCPP TiMOF and ZnTCPP\n", "http://w3id.org/solar/i/ExpExec/4715 http://www.wikidata.org/entity/Q193521 TiO2\n", "http://w3id.org/solar/i/ExpExec/7262 http://w3id.org/solar/i/Chemical/g-C3N4 g-C3N4\n", "http://w3id.org/solar/i/ExpExec/3190 http://purl.obolibrary.org/obo/CHEBI_81908 Cu2O\n", "http://w3id.org/solar/i/ExpExec/4840 http://w3id.org/solar/i/Chemical/Phthalocyanine+%28Co%29 Phthalocyanine (Co)\n", "http://w3id.org/solar/i/ExpExec/5032 http://w3id.org/solar/i/Chemical/Al2O3 Al2O3\n", "http://w3id.org/solar/i/ExpExec/5766 http://www.wikidata.org/entity/Q193521 TiO2\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX rdfs: \n", " PREFIX qudt: \n", "\n", " SELECT ?expexec ?catalyst ?chem\n", " WHERE {\n", " ?expexec prov:used ?input .\n", " ?input a solar:Input ;\n", " rdfs:label ?catalyst ;\n", " solar:hasRole solar:Catalyst ;\n", " solar:hasChemical ?chem\n", " } LIMIT 10\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.expexec} {row.chem} {row.catalyst}\")" ] }, { "cell_type": "markdown", "id": "15c080f6", "metadata": {}, "source": [ "## R4: Each experiment may have additional inputs apart from the catalyst" ] }, { "cell_type": "code", "execution_count": 12, "id": "fd60266e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "http://w3id.org/solar/i/ExpExec/5460 H2O https://w3id.org/solar/o/pc#Reductant\n", "http://w3id.org/solar/i/ExpExec/7565 Bi2WO6 https://w3id.org/solar/o/core#Co-catalyst\n", "http://w3id.org/solar/i/ExpExec/4948 Pt https://w3id.org/solar/o/core#Co-catalyst\n", "http://w3id.org/solar/i/ExpExec/1929 CdS https://w3id.org/solar/o/core#Co-catalyst\n", "http://w3id.org/solar/i/ExpExec/4766 SiO2 https://w3id.org/solar/o/pc#Support\n", "http://w3id.org/solar/i/ExpExec/6801 Co(NO3)2⋅6H2O https://w3id.org/solar/o/core#Co-catalyst\n", "http://w3id.org/solar/i/ExpExec/3760 CuAlGaO4 https://w3id.org/solar/o/core#Co-catalyst\n", "http://w3id.org/solar/i/ExpExec/7193 H2O https://w3id.org/solar/o/pc#Reductant\n", "http://w3id.org/solar/i/ExpExec/5838 H2O https://w3id.org/solar/o/pc#Reductant\n", "http://w3id.org/solar/i/ExpExec/839 CH3OH https://w3id.org/solar/o/pc#Reductant\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX rdfs: \n", " PREFIX qudt: \n", "\n", " SELECT DISTINCT ?expexec ?inputlabel ?role\n", " WHERE {\n", " ?expexec prov:used ?input .\n", " ?input a solar:Input ;\n", " rdfs:label ?inputlabel ;\n", " solar:hasRole ?role .\n", " FILTER(?role != solar:Catalyst)\n", " } LIMIT 10\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.expexec} {row.inputlabel} {row.role}\")" ] }, { "cell_type": "markdown", "id": "46b81a84", "metadata": {}, "source": [ "## R5: Each experiment must specify surface area and band gap" ] }, { "cell_type": "code", "execution_count": 13, "id": "993a2c3d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "http://w3id.org/solar/i/ExpExec/5111 Bandgap: 3.2 http://qudt.org/vocab/unit/EV | Surface area: 48.0 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/6388 Bandgap: 1.3 http://qudt.org/vocab/unit/EV | Surface area: 92.12 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/4765 Bandgap: 2.92 http://qudt.org/vocab/unit/EV | Surface area: 148.0 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/3662 Bandgap: 3.16 http://qudt.org/vocab/unit/EV | Surface area: 48.0 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/6571 Bandgap: 2.34 http://qudt.org/vocab/unit/EV | Surface area: 39.12 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/2222 Bandgap: 3.4 http://qudt.org/vocab/unit/EV | Surface area: 240.0 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/1702 Bandgap: 2.85 http://qudt.org/vocab/unit/EV | Surface area: 52.4 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/1971 Bandgap: 2.33 http://qudt.org/vocab/unit/EV | Surface area: 330.0 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/2375 Bandgap: 3.2 http://qudt.org/vocab/unit/EV | Surface area: 5.4 http://qudt.org/vocab/unit/M2-PER-GM\n", "http://w3id.org/solar/i/ExpExec/3157 Bandgap: 2.64 http://qudt.org/vocab/unit/EV | Surface area: 35.6 http://qudt.org/vocab/unit/M2-PER-GM\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX rdfs: \n", " PREFIX qudt: \n", "\n", " SELECT DISTINCT ?expexec ?surfacearea ?saunit ?bgap ?bgapunit\n", " WHERE {\n", " ?expexec prov:used ?input .\n", " ?input a solar:Input ;\n", " solar:hasBandGap [ qudt:numericValue ?bgap; qudt:unit ?bgapunit ] ;\n", " solar:hasSurfaceArea [ qudt:numericValue ?surfacearea; qudt:unit ?saunit ] .\n", " } LIMIT 10\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.expexec} Bandgap: {row.bgap} {row.bgapunit} | Surface area: {row.surfacearea} {row.saunit}\")\n", " #print(f\"{row.expexec} | Surface area: {row.surfacearea} {row.saunit}\")" ] }, { "cell_type": "markdown", "id": "55a74cc9", "metadata": {}, "source": [ "## R6: An experiment must indicate operation conditions, including temperature, pressure, reaction time, medium and operation mode\n", "Note: Medium and operation mode classes in onto, not in this KG's version" ] }, { "cell_type": "code", "execution_count": 14, "id": "9795210e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of experiments with conditions: 6664\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", "\n", " SELECT (COUNT (DISTINCT ?expexec) AS ?count)\n", " WHERE {\n", " ?expexec solar:hasCondition ?condition .\n", " ?condition a ?condition_type .\n", " VALUES ?condition_type {solar:TimeCondition solar:PressureCondition solar:TemperatureCondition}\n", " }\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Number of experiments with conditions: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "aa2fc538", "metadata": {}, "source": [ "## R7: Experiments may also indicate type of reactor" ] }, { "cell_type": "code", "execution_count": 21, "id": "8cd23c74", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of articles with reactor conditions: 6663\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", "\n", " SELECT (COUNT (DISTINCT ?expexec) AS ?count)\n", " WHERE {\n", " ?expexec solar:hasCondition ?reactorCondition .\n", " ?reactorCondition a solar:ReactorCondition\n", " }\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Number of articles with reactor conditions: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "b2ea4519", "metadata": {}, "source": [ "## R8: Electrocatalysis and Photoelectrocatalysis experiments may also indicate electrochemical configuration\n", "No experiments so far with this condition, only from photocatalysis" ] }, { "cell_type": "code", "execution_count": 22, "id": "45b2ef6e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of articles with electrochemical configuration: 0\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", "\n", " SELECT (COUNT (DISTINCT ?expexec) AS ?count)\n", " WHERE {\n", " ?expexec solar:hasCondition ?condition .\n", " ?condition a solar:ElectrochemicalConfiguration .\n", " }\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Number of articles with electrochemical configuration: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "f850e5a6", "metadata": {}, "source": [ "## R9: Photocatalysis and Photoelectrocatalysis experiments must indicate the light source used, including type of light, lamp, wavelength, irradiance, illuminated area and power" ] }, { "cell_type": "code", "execution_count": 23, "id": "eb8aa4e7", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://w3id.org/solar/i/ExpExec/3734\n", "\tLamp: https://w3id.org/solar/o/core#XenonLamp\n", "\tWavelength: https://w3id.org/solar/o/core#192-280WL\n", "\tIrradiance: 2700.0\n", "\tPower: 300.0\n", "\tIlluminated Area: 368.0\n", "https://w3id.org/solar/i/ExpExec/3022\n", "\tLamp: https://w3id.org/solar/o/core#XenonLamp\n", "\tWavelength: https://w3id.org/solar/o/core#400-780WL\n", "\tIrradiance: 350.0\n", "\tPower: 500.0\n", "\tIlluminated Area: 238.0\n", "https://w3id.org/solar/i/ExpExec/3008\n", "\tLamp: https://w3id.org/solar/o/core#Mercury-XenonLamp\n", "\tWavelength: https://w3id.org/solar/o/core#192-280WL\n", "\tIrradiance: 200.0\n", "\tPower: 254.0\n", "\tIlluminated Area: 196.0\n", "https://w3id.org/solar/i/ExpExec/3059\n", "\tLamp: https://w3id.org/solar/o/core#XenonLamp\n", "\tWavelength: https://w3id.org/solar/o/core#400-780WL\n", "\tIrradiance: 350.0\n", "\tPower: 500.0\n", "\tIlluminated Area: 238.0\n", "https://w3id.org/solar/i/ExpExec/6682\n", "\tLamp: https://w3id.org/solar/o/core#MercuryLamp\n", "\tWavelength: https://w3id.org/solar/o/core#192-280WL\n", "\tIrradiance: 20.0\n", "\tPower: 350.0\n", "\tIlluminated Area: 0.01\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", " PREFIX obi: \n", "\n", " SELECT DISTINCT ?expexec ?lamp ?wl ?irradiance ?power ?illum_area\n", " WHERE {\n", " ?expexec solar:hasLightSource ?light_source.\n", " ?light_source a obi:0400065 ;\n", " solar:hasLamp ?lamp ;\n", " solar:hasWavelength ?wl ;\n", " solar:hasIrradiance [qudt:numericValue ?irradiance] ;\n", " solar:hasPower [qudt:numericValue ?power] ;\n", " solar:hasIlluminatedArea [qudt:numericValue ?illum_area] .\n", " \n", " } LIMIT 5\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.expexec}\\n\\tLamp: {row.lamp}\\n\\tWavelength: {row.wl}\\n\\tIrradiance: {row.irradiance}\\n\\tPower: {row.power}\\n\\tIlluminated Area: {row.illum_area}\")" ] }, { "cell_type": "markdown", "id": "ea66c96d", "metadata": {}, "source": [ "## R10: TiO2 catalysts must indicate crystal structure" ] }, { "cell_type": "code", "execution_count": 24, "id": "b2d25492", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://w3id.org/solar/i/Input/Catalyst/7704-TiO2 Anatase\n", "https://w3id.org/solar/i/Input/Catalyst/2426-TiO2 Anatase\n", "https://w3id.org/solar/i/Input/Catalyst/2296-TiO2 Anatase\n", "https://w3id.org/solar/i/Input/Catalyst/5831-TiO2 Mix\n", "https://w3id.org/solar/i/Input/Catalyst/7771-TiO2 Mix\n", "https://w3id.org/solar/i/Input/Catalyst/785-TiO2 Anatase\n", "https://w3id.org/solar/i/Input/Catalyst/285-TiO2 Mix\n", "https://w3id.org/solar/i/Input/Catalyst/7814-TiO2 Anatase\n", "https://w3id.org/solar/i/Input/Catalyst/21-TiO2 P25\n", "https://w3id.org/solar/i/Input/Catalyst/4652-TiO2 Rutile\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX rdfs: \n", " PREFIX qudt: \n", "\n", " SELECT ?input ?crystal_str\n", " WHERE {\n", " ?input a solar:Input ;\n", " rdfs:label \"TiO2\" ;\n", " solar:hasRole solar:Catalyst ;\n", " solar:crystalStructure ?crystal_str .\n", " } LIMIT 10\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.input} {row.crystal_str}\")" ] }, { "cell_type": "markdown", "id": "846b5b71", "metadata": {}, "source": [ "## R11: Medium reaction must be either gas or liquid" ] }, { "cell_type": "code", "execution_count": 25, "id": "90e930c1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gas Medium\n", "Liquid Medium\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", "\n", " SELECT DISTINCT ?label\n", " WHERE {\n", " ?medium a solar:ReactionMediumCondition ;\n", " rdfs:label ?label\n", " }\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.label}\")" ] }, { "cell_type": "markdown", "id": "77df8962", "metadata": {}, "source": [ "## R12: When reaction medium is liquid, the pH value must be indicated" ] }, { "cell_type": "code", "execution_count": 26, "id": "3193893c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://w3id.org/solar/i/ExpExec/6197 pH: 7.0\n", "https://w3id.org/solar/i/ExpExec/5059 pH: 7.0\n", "https://w3id.org/solar/i/ExpExec/6293 pH: 7.0\n", "https://w3id.org/solar/i/ExpExec/3299 pH: 8.0\n", "https://w3id.org/solar/i/ExpExec/7792 pH: 3.0\n", "https://w3id.org/solar/i/ExpExec/6660 pH: 7.0\n", "https://w3id.org/solar/i/ExpExec/6300 pH: 7.0\n", "https://w3id.org/solar/i/ExpExec/4817 pH: 7.0\n", "https://w3id.org/solar/i/ExpExec/5205 pH: 7.0\n", "https://w3id.org/solar/i/ExpExec/5216 pH: 7.0\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", "\n", " SELECT ?expexec ?ph\n", " WHERE {\n", " ?expexec solar:hasCondition solar:LiquidMedium ;\n", " solar:hasCondition ?ph_cond .\n", " ?ph_cond a solar:pHCondition ;\n", " qudt:numericValue ?ph .\n", " } LIMIT 10\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.expexec} pH: {row.ph}\")" ] }, { "cell_type": "markdown", "id": "16349eaa", "metadata": {}, "source": [ "## R13: Operation modes must be either batch or continuous" ] }, { "cell_type": "code", "execution_count": 27, "id": "8751990f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Batch Mode\n", "Continuous Mode\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", "\n", " SELECT DISTINCT ?label\n", " WHERE {\n", " ?medium a solar:OperationModeCondition ;\n", " rdfs:label ?label\n", " }\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.label}\")" ] }, { "cell_type": "markdown", "id": "8da9992e", "metadata": {}, "source": [ "## R14: When the operation mode is continuous, the spacial speed value must be indicated\n" ] }, { "cell_type": "code", "execution_count": 28, "id": "9601563a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://w3id.org/solar/i/ExpExec/4914 Residence time: 0.24 http://qudt.org/vocab/unit/PER-MIN\n", "https://w3id.org/solar/i/ExpExec/34 Residence time: 83.3 http://qudt.org/vocab/unit/PER-MIN\n", "https://w3id.org/solar/i/ExpExec/4897 Residence time: 0.03 http://qudt.org/vocab/unit/PER-MIN\n", "https://w3id.org/solar/i/ExpExec/687 Residence time: 15.0 http://qudt.org/vocab/unit/PER-MIN\n", "https://w3id.org/solar/i/ExpExec/2974 Residence time: 360.0 http://qudt.org/vocab/unit/PER-MIN\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", "\n", " SELECT ?expexec ?restime ?unit\n", " WHERE {\n", " ?expexec solar:hasCondition solar:ContinuousMode ;\n", " solar:hasCondition ?restime_cond .\n", " ?restime_cond a solar:ResidenceTimeCondition ;\n", " qudt:numericValue ?restime;\n", " qudt:unit ?unit.\n", " } LIMIT 5\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.expexec} Residence time: {row.restime} {row.unit}\")" ] }, { "cell_type": "markdown", "id": "6ea3af76", "metadata": {}, "source": [ "## R15: Each experiment may have one or more outputs" ] }, { "cell_type": "code", "execution_count": 35, "id": "505e515c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of experiments with outputs: 6664\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX rdfs: \n", " PREFIX qudt: \n", " PREFIX prov: \n", "\n", " SELECT (COUNT (DISTINCT ?expexec) AS ?count)\n", " WHERE {\n", " ?output a solar:Output ;\n", " prov:wasGeneratedBy ?expexec .\n", " }\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Number of experiments with outputs: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "5858a393", "metadata": {}, "source": [ "## R16: When the light source is not solar or solar simulation, the wavelength must be indicated" ] }, { "cell_type": "code", "execution_count": 36, "id": "5557420f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Number of lightsources with all properties: 5398\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX solarpc: \n", " PREFIX qudt: \n", " PREFIX obi: \n", "\n", " SELECT (COUNT (DISTINCT ?light_source) AS ?count)\n", " WHERE {\n", " ?light_source a ?type ;\n", " solar:hasWavelength ?wl .\n", " FILTER (?type != solar:SolarLightSource || ?type != solar:SolarSimulatorLightSource )\n", " } #LIMIT 10\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Number of lightsources with all properties: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "60757644", "metadata": {}, "source": [ "## R17: An experiment may provide conversion metrics, quantum efficiency metrics and electrochemical metrics\n", "Not yet in the KG, only photocatalysis experiments" ] }, { "cell_type": "markdown", "id": "d14dbdf2", "metadata": {}, "source": [ "## CQ1: How many experiments are reported per year?" ] }, { "cell_type": "code", "execution_count": 38, "id": "b7ac205f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Experiments in 2022: 263\n", "Experiments in 2021: 1176\n", "Experiments in 2020: 1149\n", "Experiments in 2019: 311\n", "Experiments in 2018: 530\n", "Experiments in 2017: 719\n", "Experiments in 2016: 343\n", "Experiments in 2015: 579\n", "Experiments in 2014: 392\n", "Experiments in 2013: 347\n", "Experiments in 2012: 202\n", "Experiments in 2011: 201\n", "Experiments in 2010: 41\n", "Experiments in 2009: 41\n", "Experiments in 2008: 46\n", "Experiments in 2007: 53\n", "Experiments in 2006: 15\n", "Experiments in 2005: 20\n", "Experiments in 2004: 19\n", "Experiments in 2003: 22\n", "Experiments in 2002: 18\n", "Experiments in 2001: 19\n", "Experiments in 2000: 4\n", "Experiments in 1999: 8\n", "Experiments in 1998: 21\n", "Experiments in 1997: 30\n", "Experiments in 1996: 2\n", "Experiments in 1995: 17\n", "Experiments in 1994: 20\n", "Experiments in 1993: 14\n", "Experiments in 1992: 9\n", "Experiments in 1991: 1\n", "Experiments in 1990: 2\n", "Experiments in 1987: 1\n", "Experiments in 1984: 6\n", "Experiments in 1979: 7\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX schema: \n", "\n", " SELECT ?year (COUNT (DISTINCT ?expexec) AS ?count)\n", " WHERE {\n", " ?article a schema:ScholarlyArticle ;\n", " schema:datePublished ?year ;\n", " solar:hasExperimentExecution ?expexec\n", " } GROUP BY ?year\n", " ORDER BY DESC (?year)\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Experiments in {row.year}: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "4a89ca70", "metadata": {}, "source": [ "## CQ2: How many experiments are reported per country?\n" ] }, { "cell_type": "code", "execution_count": 40, "id": "9d48ef73", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Experiments in https://w3id.org/solar/i/Country/CN: 6086\n", "Experiments in https://w3id.org/solar/i/Country/JP: 5051\n", "Experiments in https://w3id.org/solar/i/Country/ES: 4973\n", "Experiments in https://w3id.org/solar/i/Country/AU: 4970\n", "Experiments in https://w3id.org/solar/i/Country/SA: 4947\n", "Experiments in https://w3id.org/solar/i/Country/US: 4945\n", "Experiments in https://w3id.org/solar/i/Country/MY: 4933\n", "Experiments in https://w3id.org/solar/i/Country/SG: 4903\n", "Experiments in https://w3id.org/solar/i/Country/DE: 4870\n", "Experiments in https://w3id.org/solar/i/Country/PK: 4862\n", "Experiments in https://w3id.org/solar/i/Country/GB: 4838\n", "Experiments in https://w3id.org/solar/i/Country/HK: 4831\n", "Experiments in https://w3id.org/solar/i/Country/TW: 4821\n", "Experiments in https://w3id.org/solar/i/Country/IR: 4817\n", "Experiments in https://w3id.org/solar/i/Country/NL: 4807\n", "Experiments in https://w3id.org/solar/i/Country/KR: 4806\n", "Experiments in https://w3id.org/solar/i/Country/IN: 4804\n", "Experiments in https://w3id.org/solar/i/Country/IT: 4802\n", "Experiments in https://w3id.org/solar/i/Country/CZ: 4798\n", "Experiments in https://w3id.org/solar/i/Country/PL: 4797\n", "Experiments in https://w3id.org/solar/i/Country/MX: 4796\n", "Experiments in https://w3id.org/solar/i/Country/SE: 4795\n", "Experiments in https://w3id.org/solar/i/Country/BE: 4793\n", "Experiments in https://w3id.org/solar/i/Country/TH: 4791\n", "Experiments in https://w3id.org/solar/i/Country/RU: 4785\n", "Experiments in https://w3id.org/solar/i/Country/FR: 4784\n", "Experiments in https://w3id.org/solar/i/Country/VN: 4784\n", "Experiments in https://w3id.org/solar/i/Country/DK: 4783\n", "Experiments in https://w3id.org/solar/i/Country/EG: 4782\n", "Experiments in https://w3id.org/solar/i/Country/CA: 4781\n", "Experiments in https://w3id.org/solar/i/Country/IE: 4778\n", "Experiments in https://w3id.org/solar/i/Country/HU: 4778\n", "Experiments in https://w3id.org/solar/i/Country/ID: 4778\n", "Experiments in https://w3id.org/solar/i/Country/ZA: 4778\n", "Experiments in https://w3id.org/solar/i/Country/YE: 4778\n", "Experiments in https://w3id.org/solar/i/Country/IL: 4778\n", "Experiments in https://w3id.org/solar/i/Country/LB: 4778\n", "Experiments in https://w3id.org/solar/i/Country/PT: 4778\n", "Experiments in https://w3id.org/solar/i/Country/AR: 4778\n", "Experiments in https://w3id.org/solar/i/Country/BR: 4778\n", "Experiments in https://w3id.org/solar/i/Country/DZ: 4778\n", "Experiments in https://w3id.org/solar/i/Country/UA: 4778\n", "Experiments in https://w3id.org/solar/i/Country/FI: 4778\n", "Experiments in https://w3id.org/solar/i/Country/CH: 4778\n", "Experiments in https://w3id.org/solar/i/Country/RO: 4778\n", "Experiments in https://w3id.org/solar/i/Country/AE: 184\n", "Experiments in https://w3id.org/solar/i/Country/QA: 30\n", "Experiments in https://w3id.org/solar/i/Country/NZ: 21\n", "Experiments in https://w3id.org/solar/i/Country/TR: 21\n", "Experiments in https://w3id.org/solar/i/Country/MO: 14\n", "Experiments in https://w3id.org/solar/i/Country/GH: 6\n", "Experiments in https://w3id.org/solar/i/Country/KW: 6\n", "Experiments in https://w3id.org/solar/i/Country/AT: 4\n", "Experiments in https://w3id.org/solar/i/Country/BN: 4\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX schema: \n", "\n", " SELECT ?country (COUNT (DISTINCT ?expexec) AS ?count)\n", " WHERE {\n", " ?article a schema:ScholarlyArticle ;\n", " solar:hasExperimentExecution ?expexec ;\n", " schema:author ?author .\n", " ?author schema:affiliation ?affiliation .\n", " ?affiliation schema:addressCountry ?country\n", " } GROUP BY ?country\n", " ORDER BY DESC (?count)\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Experiments in {row.country}: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "9a8ccefb", "metadata": {}, "source": [ "## CQ3: How many experiments are there per type of catalyst?" ] }, { "cell_type": "code", "execution_count": 41, "id": "aae4aebf", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Experiments with TiO2: 2131\n", "Experiments with g-C3N4: 745\n", "Experiments with Ti-KIT-6: 201\n", "Experiments with ZnO: 182\n", "Experiments with CeO2: 160\n", "Experiments with ZnS: 138\n", "Experiments with CdS: 112\n", "Experiments with BiOCl: 85\n", "Experiments with Cu2O: 83\n", "Experiments with Bi2WO6: 82\n", "Experiments with CsPbBr3: 66\n", "Experiments with WO3: 65\n", "Experiments with BiVO4: 64\n", "Experiments with LDH: 55\n", "Experiments with MgIn2S4: 55\n", "Experiments with Ga2O3: 54\n", "Experiments with In2O3: 41\n", "Experiments with CuAlGaO4: 40\n", "Experiments with AgBr: 40\n", "Experiments with K2Ti6O13: 38\n", "Experiments with ZIF-9: 38\n", "Experiments with ZrO2: 38\n", "Experiments with Zn2GeO4: 34\n", "Experiments with Pd(bpy)-F23: 34\n", "Experiments with InTaO4: 31\n", "Experiments with UIO-66-NH2(Zr): 31\n", "Experiments with BiOBr: 30\n", "Experiments with Bi3O4Cl: 30\n", "Experiments with SrTiO3: 29\n", "Experiments with MoS2: 29\n", "Experiments with MoO3-x: 28\n", "Experiments with Carbon Nitride: 26\n", "Experiments with C3N4: 26\n", "Experiments with ZnIn2S4: 25\n", "Experiments with [Zn1.5Cu1.5Ga(OH)8]2(CO3)2- mH2O: 22\n", "Experiments with SiC: 22\n", "Experiments with Al2O3: 21\n", "Experiments with CuO: 21\n", "Experiments with [Zn2Cr(OH)2]2CO3: 21\n", "Experiments with [Ru(bpy)3]Cl2A 6H2O: 20\n", "Experiments with CN: 20\n", "Experiments with BiOIO3: 19\n", "Experiments with Ti-MCM-41: 18\n", "Experiments with Co3O4: 18\n", "Experiments with Black TiO2: 18\n", "Experiments with In2S3: 18\n", "Experiments with ZIF-8: 17\n", "Experiments with NaTaO3: 17\n", "Experiments with CTF: 16\n", "Experiments with Zn0.5Cd0.5S: 15\n", "Experiments with Cu3SnS4: 15\n", "Experiments with SnO2: 15\n", "Experiments with Ta2O5: 15\n", "Experiments with Bi2MoO6: 14\n", "Experiments with UIO-66-NH2: 14\n", "Experiments with [Zn3Ga(OH)8]2(CO3)2- mH2O: 14\n", "Experiments with b-Ga2O3: 13\n", "Experiments with Fe2O3: 13\n", "Experiments with BaLa4Ti4O15: 13\n", "Experiments with Graphene: 13\n", "Experiments with Black Phosphorus: 12\n", "Experiments with La2Sn2O7: 12\n", "Experiments with Bi2S3: 12\n", "Experiments with BaZrO3: 12\n", "Experiments with Bi4Ti3O12: 12\n", "Experiments with NaNbO3: 12\n", "Experiments with Fe-HZSM-5: 11\n", "Experiments with NiAl-LDH: 11\n", "Experiments with UIO-67(Zr): 11\n", "Experiments with NiO: 11\n", "Experiments with Ti-Kit-6: 11\n", "Experiments with Ti-SBA-15: 11\n", "Experiments with MOF: 11\n", "Experiments with CaTiO3: 11\n", "Experiments with Nb2O5: 10\n", "Experiments with LaPO4: 10\n", "Experiments with Bi2O3: 10\n", "Experiments with Bi12O17Cl2: 10\n", "Experiments with Reduced graphene Oxide: 9\n", "Experiments with BiOI: 9\n", "Experiments with SnS2: 9\n", "Experiments with QD: 9\n", "Experiments with CoP: 9\n", "Experiments with MgAl-LDH: 9\n", "Experiments with Bi6O: 9\n", "Experiments with NH2-MIL-125: 9\n", "Experiments with Bipyridine_COF: 9\n", "Experiments with Zn0.75Mg0.25O: 9\n", "Experiments with CdIn2S4: 9\n", "Experiments with Boron Carbon Nitride: 9\n", "Experiments with InNbO4: 8\n", "Experiments with Carbon: 8\n", "Experiments with Zn0.5Mg0.5O: 8\n", "Experiments with TiMOF and ZnTCPP: 8\n", "Experiments with ZnTCPP: 8\n", "Experiments with [Zn3Al(OH)8]2(CO3)2- mH2O: 8\n", "Experiments with ZnGa2O4: 8\n", "Experiments with Zn0.8Mg0.2O: 8\n", "Experiments with CTO: 8\n", "Experiments with Cu: 8\n", "Experiments with SiO2: 8\n", "Experiments with CoAl-LDH: 8\n", "Experiments with Zn0.67Mg0.33O: 8\n", "Experiments with MIL-101(Fe): 8\n", "Experiments with TS-1: 8\n", "Experiments with CoTe: 8\n", "Experiments with InVO4: 7\n", "Experiments with ZIF-9(Co): 7\n", "Experiments with CuS: 7\n", "Experiments with Zn2SnO4: 7\n", "Experiments with MnS: 7\n", "Experiments with K-PHI: 7\n", "Experiments with CdSe: 7\n", "Experiments with [Zn3Ga(OH)8]2CO3: 7\n", "Experiments with Black P: 7\n", "Experiments with [Zn1.5Cu1.5Al(OH)8]2(CO3)2- mH2O: 7\n", "Experiments with Zn-LDH: 7\n", "Experiments with CoO: 7\n", "Experiments with MIL-125-NH2(Ti): 6\n", "Experiments with Ti-MCM-48: 6\n", "Experiments with Polyimide: 6\n", "Experiments with TiMOF: 6\n", "Experiments with Cd0.2Zn0.8S: 6\n", "Experiments with CNU: 6\n", "Experiments with KTaO3: 6\n", "Experiments with Au@g-C3N4: 6\n", "Experiments with ZIF-67(Co): 6\n", "Experiments with Cs3Bi2I9: 6\n", "Experiments with ZnSe: 6\n", "Experiments with SnNb2O6 : 6\n", "Experiments with KCNO: 6\n", "Experiments with SrNb2O6: 6\n", "Experiments with MIL-100(Cr): 6\n", "Experiments with ZnGaNO: 6\n", "Experiments with [Co5(btz)6(NO3)4(H2O)4]: 6\n", "Experiments with BiTaO4: 6\n", "Experiments with BiNbO4: 6\n", "Experiments with MgFe2O4: 5\n", "Experiments with Nb3O8: 5\n", "Experiments with H2SrTa2O7: 5\n", "Experiments with Gersiloxene: 5\n", "Experiments with MOF-808: 5\n", "Experiments with Ti600: 5\n", "Experiments with Zn1.5Cu1.5Ga(OH)8]+2[Cu(OH)4]2−: 5\n", "Experiments with MgO: 5\n", "Experiments with Bi2Se3: 5\n", "Experiments with H2Ti6O13: 5\n", "Experiments with CuMoxW1-xO4: 5\n", "Experiments with CNS: 5\n", "Experiments with AgCl: 5\n", "Experiments with TpPa COF: 5\n", "Experiments with Ti-N2-600: 5\n", "Experiments with TiOx(OH)y: 5\n", "Experiments with NH2-MIL-68(In): 5\n", "Experiments with Mg-CPO-27: 5\n", "Experiments with Bi2MoO6-SOVs: 5\n", "Experiments with UiO-66-NH2: 5\n", "Experiments with Bi24O31Br10: 5\n", "Experiments with Graphene Oxide: 5\n", "Experiments with CaFe2O4: 5\n", "Experiments with Cr2O3: 5\n", "Experiments with Ti-air-N2-600: 5\n", "Experiments with Bi2O2CO3: 5\n", "Experiments with MnCdS: 4\n", "Experiments with Ni(OH)2: 4\n", "Experiments with ZnIn2Se4: 4\n", "Experiments with ZnTa2O6: 4\n", "Experiments with Pd(bpy)-F21: 4\n", "Experiments with Porphyrin-MOF(Al): 4\n", "Experiments with Porphyrin Polymers: 4\n", "Experiments with CPB: 4\n", "Experiments with BIF-20(Zn): 4\n", "Experiments with PCN222(Zr): 4\n", "Experiments with ZnRh2O4: 4\n", "Experiments with CaTaO2N: 4\n", "Experiments with Ti-b Zeolite: 4\n", "Experiments with TD-COF: 4\n", "Experiments with Zn1.5Cu1.5Ga(OH)8]+2(CO3): 4\n", "Experiments with TRP: 4\n", "Experiments with Cu0.12Ag0.30In0.38Zn1.22S2: 4\n", "Experiments with CuInS2: 4\n", "Experiments with Co(OH)2: 4\n", "Experiments with PPy: 4\n", "Experiments with LaVO4: 4\n", "Experiments with PPZ: 4\n", "Experiments with Ketoamine_COF: 4\n", "Experiments with PbBi2Nb2O9: 4\n", "Experiments with ZnTe: 4\n", "Experiments with Cs4PbBr6: 4\n", "Experiments with CsPb(Br/Cl)3: 4\n", "Experiments with BiFeWOx: 4\n", "Experiments with Cu0.30Ag0.07In0.34Zn1.31S2: 4\n", "Experiments with TiO2-xHx: 4\n", "Experiments with Bi6O7FCl3: 4\n", "Experiments with CaSiO4: 4\n", "Experiments with Melon Polymer: 4\n", "Experiments with Na2V6O16: 4\n", "Experiments with Metalloporphyrin_COF: 4\n", "Experiments with NiAl: 4\n", "Experiments with ZnxCd1-xS: 4\n", "Experiments with Ag2SO3: 4\n", "Experiments with ImI-CMP@Co: 4\n", "Experiments with Cu0.45Ag0.13In0.24Zn1.35S2: 4\n", "Experiments with V2O5: 4\n", "Experiments with UiO-68-NH2: 4\n", "Experiments with Zn-Cr LDH: 4\n", "Experiments with CsPbCl3: 4\n", "Experiments with NiWO4: 4\n", "Experiments with Sn2S3: 4\n", "Experiments with Zn1.7GeN1.8O: 4\n", "Experiments with Cu(OH)2: 4\n", "Experiments with [Zn3Cu3Ga(OH)8]2CO3: 4\n", "Experiments with Ti-air-600: 4\n", "Experiments with PbBiO2Br: 3\n", "Experiments with ZnFe2O4: 3\n", "Experiments with Cu0.23Ag0.21In0.19Zn1.5S2: 3\n", "Experiments with NMF: 3\n", "Experiments with MIL-101(Cr): 3\n", "Experiments with CaLa4Ti4O15: 3\n", "Experiments with UiO-68-NH2(Zr): 3\n", "Experiments with GeZnS: 3\n", "Experiments with ZnO/ZnTe: 3\n", "Experiments with Eosin Y-Polymer: 3\n", "Experiments with In(OH)3: 3\n", "Experiments with SrLa4Ti4O15: 3\n", "Experiments with Ni9S8: 3\n", "Experiments with NaBiO3: 3\n", "Experiments with Porphyrin carboxylate: 3\n", "Experiments with Ti: 3\n", "Experiments with SrZrO3: 3\n", "Experiments with MOF-74(Co): 3\n", "Experiments with Cu0.12Ag0.13In0.57Zn1.02S2: 3\n", "Experiments with Cu0.05Ag0.20In0.06Zn1.78S2: 3\n", "Experiments with [Zn3Cu3Ga(OH)8]2[Cu(OH)4]: 3\n", "Experiments with [Zn3Ga(OH)8]2[Cu(OH)4]: 3\n", "Experiments with Cs2AgBiBr6: 3\n", "Experiments with CuGaS2: 3\n", "Experiments with Fe3O4: 3\n", "Experiments with Ag0.09In0.21Zn1.61S2: 3\n", "Experiments with Bi2O2[BO2(OH)]: 3\n", "Experiments with Cu-ZIF: 3\n", "Experiments with ZnCo2O4: 3\n", "Experiments with Zr-UIO-66-NH2: 3\n", "Experiments with Zn2GaO4: 3\n", "Experiments with MgCo2O4: 3\n", "Experiments with Nitrogen doped Carbon (NC): 3\n", "Experiments with W18O49@Co: 3\n", "Experiments with Fe(OH)3: 3\n", "Experiments with ETS-10: 3\n", "Experiments with Fibrous Phosphorene: 3\n", "Experiments with FeCoS-CoS1.97: 2\n", "Experiments with Dolomite: 2\n", "Experiments with Hydrazone-COF: 2\n", "Experiments with KNb3O8: 2\n", "Experiments with BiOBr: 2\n", "Experiments with CaZrO3: 2\n", "Experiments with Ti3C2: 2\n", "Experiments with BDC-MOF (Ni): 2\n", "Experiments with TiO2/C: 2\n", "Experiments with Ni: 2\n", "Experiments with Co: 2\n", "Experiments with SnNb2O6: 2\n", "Experiments with WO3-TiO2: 2\n", "Experiments with CdWO4: 2\n", "Experiments with FeWO4: 2\n", "Experiments with UiO-67-NH2: 2\n", "Experiments with SnS2/SnO2: 2\n", "Experiments with CdV2O6: 2\n", "Experiments with Au: 2\n", "Experiments with Cu0.37Ag0.15In0.80Zn0.54S2: 2\n", "Experiments with ZnV2O6: 2\n", "Experiments with Ru(bpy): 2\n", "Experiments with (CuGa)0.8Zn0.4S2: 2\n", "Experiments with Carbon fibers: 2\n", "Experiments with COF: 2\n", "Experiments with LiHTiO: 2\n", "Experiments with Zn0.3Cd0.7S: 2\n", "Experiments with Porphyrin-polymer: 2\n", "Experiments with MIL-100(Al): 2\n", "Experiments with [PTi2W10O40] 7−: 2\n", "Experiments with Bi2Sn2O7: 2\n", "Experiments with HNb3O8: 2\n", "Experiments with Cu0.48Ag0.34In0.36Zn1.05S2: 2\n", "Experiments with Bi2O2(OH)(NO3): 2\n", "Experiments with Triazine_COF: 2\n", "Experiments with Fe-MNS: 2\n", "Experiments with acid-aching carbon fbers: 2\n", "Experiments with Azo-Por-POP: 2\n", "Experiments with CoSn(OH)6: 2\n", "Experiments with MIL-88B(Fe): 2\n", "Experiments with Carbon Dots: 2\n", "Experiments with MIL-53(Fe): 2\n", "Experiments with Ni-MOF: 2\n", "Experiments with SAPO-5: 2\n", "Experiments with Zr-PCN-222: 2\n", "Experiments with CuCa2Ag2Se: 2\n", "Experiments with CdAl-LDH: 2\n", "Experiments with SnFe2O4: 2\n", "Experiments with Re-diimine-tricarbonyl: 2\n", "Experiments with ZnAl-LDH: 2\n", "Experiments with MIL-100(Fe): 2\n", "Experiments with BiFeO3: 2\n", "Experiments with TiO2 : 2\n", "Experiments with Co2P: 2\n", "Experiments with UiO-68-NHC: 2\n", "Experiments with (AgIn)0.22Zn1.56S2: 2\n", "Experiments with CuFe2O4: 2\n", "Experiments with Zn0.7Cd0.3S: 2\n", "Experiments with [Zn1.5Cu1.5Ga(OH)8]2CO3: 2\n", "Experiments with ZnMn2O4: 1\n", "Experiments with Ag2CrO4: 1\n", "Experiments with hm-C4N3: 1\n", "Experiments with CMPBDP: 1\n", "Experiments with CuInS8: 1\n", "Experiments with Ca1.28Ti0.85O3: 1\n", "Experiments with L-Co@C: 1\n", "Experiments with BM-S: 1\n", "Experiments with ZnO2: 1\n", "Experiments with talc: 1\n", "Experiments with Ni3B: 1\n", "Experiments with Polypyrrole: 1\n", "Experiments with Porphyrin-MOF(Ni): 1\n", "Experiments with LiNbO3: 1\n", "Experiments with Bi4O5Br2: 1\n", "Experiments with Co2TCPE: 1\n", "Experiments with ZnIn2S4@CNO: 1\n", "Experiments with Pyridine COF: 1\n", "Experiments with CuWo4: 1\n", "Experiments with Oligo (p-pentaphenylene): 1\n", "Experiments with BTO: 1\n", "Experiments with Triazine COF: 1\n", "Experiments with CoSe: 1\n", "Experiments with B6O: 1\n", "Experiments with Pyridin Complex (Mn): 1\n", "Experiments with Bi6Mo2O15: 1\n", "Experiments with MoSe2: 1\n", "Experiments with ZnCuGa(OH): 1\n", "Experiments with Oligo (p-tetraphenylene): 1\n", "Experiments with [Rh(R-bpy)(Cp*)Cl]*: 1\n", "Experiments with fibrous P: 1\n", "Experiments with [Ru(bpy)2(bpm)Ru(CO)2Cl2]: 1\n", "Experiments with pCN: 1\n", "Experiments with Zn(OH)2: 1\n", "Experiments with Ag[Zn3Ga(OH)8]2CO3: 1\n", "Experiments with W18O49: 1\n", "Experiments with MA3Bi2I9: 1\n", "Experiments with OV-BiOBr: 1\n", "Experiments with Oligo (p-hexaphenylene): 1\n", "Experiments with Cs3Bi2Br9: 1\n", "Experiments with NiTiO3: 1\n", "Experiments with Zn0.8Cd0.2S: 1\n", "Experiments with BiVO4/CuGaS2: 1\n", "Experiments with GaP: 1\n", "Experiments with La2Ti2O7: 1\n", "Experiments with F-Co@C: 1\n", "Experiments with ZnO : 1\n", "Experiments with Co-PcS: 1\n", "Experiments with Activated carbon: 1\n", "Experiments with (BiO)2CO3: 1\n", "Experiments with ZnCuAl(OH): 1\n", "Experiments with ZnWO4: 1\n", "Experiments with Sr2KTa5O15: 1\n", "Experiments with Ag/Ag3PO4: 1\n", "Experiments with Pt: 1\n", "Experiments with CuMoO4: 1\n", "Experiments with Ca0.75Ti1.12O3: 1\n", "Experiments with Porphyrin Complex: 1\n", "Experiments with Ir-Phenylpyridine: 1\n", "Experiments with FeCoS2-CoS2: 1\n", "Experiments with Oligo (p-triphenylene): 1\n", "Experiments with Triformylphloroglucinol_COF: 1\n", "Experiments with Rb3Bi2I9: 1\n", "Experiments with GdCrO3: 1\n", "Experiments with NiFe-LDH: 1\n", "Experiments with CoNiO2: 1\n", "Experiments with Co3B: 1\n", "Experiments with HCP-1: 1\n", "Experiments with Fe-MCM-41: 1\n", "Experiments with Phthalocyanine (Co): 1\n", "Experiments with Zn1.10GeN1.92O0.53: 1\n", "Experiments with Pyridin(Ni)_complex: 1\n", "Experiments with MOF-74 (Zn): 1\n", "Experiments with PCN-601 (Ni): 1\n", "Experiments with Phosphazene_Polymer: 1\n", "Experiments with FeSx-CoS2: 1\n", "Experiments with L-Ni@C: 1\n", "Experiments with Kaolitine: 1\n", "Experiments with Co4N: 1\n", "Experiments with Ti-MCM-41 : 1\n", "Experiments with NiCo2O4 : 1\n", "Experiments with CdSeS-diethylenetriamine: 1\n", "Experiments with Graphene oxide: 1\n", "Experiments with Zr-NNU-28: 1\n", "Experiments with Cu0.33Zn0.33Al0.34(OH)2](CO3)0.17 : 1\n", "Experiments with Cs3Bi2Cl9: 1\n", "Experiments with Boron imidazole: 1\n", "Experiments with [Ru(dpbpy)]: 1\n", "Experiments with Si: 1\n", "Experiments with Zn0.2Cd0.8S: 1\n", "Experiments with B4C: 1\n", "Experiments with Porphyrin-MOF(Co): 1\n", "Experiments with Fe2B: 1\n", "Experiments with Azene_Polymer: 1\n", "Experiments with AgIO3: 1\n", "Experiments with CoPc: 1\n", "Experiments with NP/ZIS: 1\n", "Experiments with ZN2GeO4: 1\n", "Experiments with Ni-NiS: 1\n", "Experiments with Fe-HY: 1\n", "Experiments with GeH: 1\n", "Experiments with UIO-68(Zr): 1\n", "Experiments with Cs3Bi2(ClBr)9: 1\n", "Experiments with Bypiridine(Co)_Complex: 1\n", "Experiments with Porphyrin-MOF(Zn): 1\n", "Experiments with Zn0.91GeN1.87O0.36: 1\n", "Experiments with SrBi4Ti4O15: 1\n", "Experiments with MOF-74 (Co): 1\n", "Experiments with MgIn-LDH: 1\n", "Experiments with NiCoFe-LNH: 1\n", "Experiments with NiIn-LDH: 1\n", "Experiments with ZSM-5: 1\n", "Experiments with Cu2Se: 1\n", "Experiments with HCP-3: 1\n", "Experiments with CaO: 1\n", "Experiments with TP-COF: 1\n", "Experiments with ZIF-8 (Zn): 1\n", "Experiments with Au@SnS: 1\n", "Experiments with FAPbBr3: 1\n", "Experiments with HCP-2: 1\n", "Experiments with Carbazole-Triazine COF: 1\n", "Experiments with Fe2+: 1\n", "Experiments with CuInS: 1\n", "Experiments with Cu2ZnSnS4 : 1\n", "Experiments with Siloxene: 1\n", "Experiments with Zn3In2S6: 1\n", "Experiments with CoTPPS: 1\n", "Experiments with UIO-66 (Zr): 1\n", "Experiments with FeCoS2-Co9S8: 1\n", "Experiments with Ni-Metalloporphyrin: 1\n", "Experiments with V2AlC: 1\n", "Experiments with FeNi-MOF: 1\n", "Experiments with PCN-222 (Ni): 1\n", "Experiments with Zr-UiO-66-NH2: 1\n", "Experiments with Bi2O2(OH)(NO3).: 1\n", "Experiments with Cs3Bi2(BrI)9: 1\n", "Experiments with BiOF: 1\n", "Experiments with Cu0.4V2O5: 1\n", "Experiments with MoO2: 1\n", "Experiments with boron imidazolate: 1\n", "Experiments with K4Nb6O17: 1\n", "Experiments with Tetraphenyl-porphyrin: 1\n", "Experiments with Graphdiyne: 1\n", "Experiments with TiN: 1\n", "Experiments with amorphous P: 1\n", "Experiments with Sepiolite: 1\n", "Experiments with Zn: 1\n", "Experiments with Sn2S3-DETA: 1\n", "Experiments with Quinacridone: 1\n", "Experiments with Pyridin Complex (Fe): 1\n", "Experiments with F-Ni@C: 1\n", "Experiments with Oligo (p-diphenylene) : 1\n", "Experiments with Ca1.5Ti0.75O3: 1\n", "Experiments with Bi2Mo0.5W0.5O2: 1\n", "Experiments with [Zn2Cr1(OH)2]2CO3: 1\n", "Experiments with Cu2S: 1\n", "Experiments with LiTaO3: 1\n", "Experiments with SNO: 1\n", "Experiments with CdxCu1-xS: 1\n", "Experiments with SiMo12O40: 1\n", "Experiments with Oxygen doped carbon nitride: 1\n", "Experiments with Cu2ZnS4: 1\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", "\n", " SELECT ?catalyst (COUNT (DISTINCT ?expexec) AS ?count)\n", " WHERE {\n", " ?expexec prov:used ?input .\n", " ?input solar:hasRole solar:Catalyst ;\n", " rdfs:label ?catalyst .\n", " } GROUP BY ?catalyst\n", " ORDER BY DESC (?count)\n", "\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Experiments with {row.catalyst}: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "3ef6a9ea", "metadata": {}, "source": [ "## CQ4: Which articles have been published in the ACS nano Journal in 2020 in volume 14?" ] }, { "cell_type": "code", "execution_count": 27, "id": "5ef3dc47", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://w3id.org/solar/i/Article/1031 Rare-Earth Single-Atom La–N Charge-Transfer Bridge on Carbon Nitride for Highly Efficient and Selective Photocatalytic CO2 Reduction https://doi.org/10.1021/acsnano.0c07083\n", "https://w3id.org/solar/i/Article/894 Room-Temperature Synthesis of Single Iron Site by Electrofiltration for Photoreduction of CO2 into Tunable Syngas https://doi.org/10.1021/acsnano.0c02162\n", "https://w3id.org/solar/i/Article/1012 Identification of Halogen-Associated Active Sites on Bismuth-Based Perovskite Quantum Dots for Efficient and Selective CO2-to-CO Photoreduction https://doi.org/10.1021/acsnano.0c04659\n", "https://w3id.org/solar/i/Article/944 A Single Cu-Center Containing Enzyme-Mimic Enabling Full Photosynthesis under CO2 Reduction https://doi.org/10.1021/acsnano.0c02940\n", "https://w3id.org/solar/i/Article/911 Direct Z-Scheme Heterojunction of Semicoherent FAPbBr3/Bi2WO6 Interface for Photoredox Reaction with Large Driving Force https://doi.org/10.1021/acsnano.0c03146\n" ] } ], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX schema: \n", "\n", " SELECT ?article ?title ?doi\n", " WHERE {\n", " ?article a schema:ScholarlyArticle ;\n", " schema:name ?title ;\n", " bibo:doi ?doi ;\n", " schema:volumeNumber \"14\" ;\n", " schema:datePublished \"2020\"^^xsd:gYear ;\n", " schema:isPartOf \"ACS nano\" .\n", " } \n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"{row.article} {row.title} {row.doi}\")" ] }, { "cell_type": "markdown", "id": "00fdad9e", "metadata": {}, "source": [ "## CQ5: Which experiments use TiO2 as catalyst, liquid medium an produce H2 as output?\n", "Slow with RDFLib, works fine in GraphDB" ] }, { "cell_type": "code", "execution_count": null, "id": "82b2acd5", "metadata": {}, "outputs": [], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", "\n", " SELECT ?expexec\n", " WHERE {\n", " ?expexec prov:used ?input ;\n", " solar:hasCondition solar:LiquidMedium .\n", " \n", " ?input solar:hasRole solar:Catalyst ;\n", " rdfs:label \"TiO2\" .\n", " \n", " ?output rdfs:label \"H2\" ;\n", " prov:wasGeneratedBy ?expexec .\n", " }\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Experiments: {row['count'].value}\")" ] }, { "cell_type": "markdown", "id": "0e5ac2c3", "metadata": {}, "source": [ "## CQ6: Which experiments use TiO2 as catalyst, liquid medium and produce the most H2 output in µmol/gh?" ] }, { "cell_type": "code", "execution_count": null, "id": "a9478324", "metadata": {}, "outputs": [], "source": [ "q_res = g.query(\"\"\" \n", " PREFIX bibo: \n", " PREFIX dc: \n", " PREFIX solar: \n", " PREFIX prov: \n", " PREFIX rdfs: \n", " PREFIX unit: \n", " PREFIX qudt: \n", "\n", " SELECT ?expexec ?value\n", " WHERE {\n", " ?expexec prov:used ?input ;\n", " solar:hasCondition solar:LiquidMedium .\n", " \n", " ?input solar:hasRole solar:Catalyst ;\n", " rdfs:label \"TiO2\" .\n", " \n", " ?output rdfs:label \"H2\" ;\n", " qudt:unit unit:MicroMOL-PER-GM-HR ;\n", " prov:wasGeneratedBy ?expexec ;\n", " qudt:numericValue ?value .\n", " } ORDER BY DESC(?value)\n", "\"\"\")\n", "\n", "for row in q_res:\n", " print(f\"Experiments: {row['count'].value}\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.18" } }, "nbformat": 4, "nbformat_minor": 5 }