Skip to content

emmo-repo/domain-electrochemistry

Repository files navigation

FOOPS Score reason docs unstable

DOI

Electrochemistry Domain Ontology

domain-electrochemistry-logo

The Electrochemistry Domain Ontology is a domain of the Elementary Multiperspective Materials Ontology (EMMO), for describing electrochemical systems, materials, methods, and data. Its primary objective is to support the creation of FAIR, Linked Data within the field of electrochemistry. This ontology serves as a foundational resource for harmonizing electrochemical knowledge representation, enhancing data interoperability, and accelerating progress in electrochemical research and development.

Reference documentation is available here.

Quick Start

Here is some information to help you get started working with the ontology in python and creating you own instances of Linked Data. For more information, please see the Getting Started and Examples section of the documentation.

Protégé

Protege is a open-source graphical editor for exploring and editing ontologies. You can explore the pre-inferred ontology in a web-based instance (requires registering for a free account). Some suggested entry points for new users are:

You can also download a local copy to explore the ontology on your machine.

Python

There are two common ways to work with the ontology in python: loading the ontology as a graph using rdflib or exploring the content of the ontology using EMMOntoPy. Examples of both are provided below.

rdflib

In rdflib, you can import the ontology as a graph, e.g. to run SPARQL queries:

from rdflib import Graph

# Define the IRI of the ontology
echo = "https://w3id.org/emmo/domain/electrochemistry"

# Create an empty graph
g = Graph()

# Load the ontology from the IRI
g.parse(echo, format="ttl")

# Print the number of triples in the graph
print(f"Graph has {len(g)} triples.")

EMMOntoPy

In EMMOntoPy, you can choose to import the ontology directly from the web:

from ontopy import get_ontology

# Loading from web
echo = get_ontology('https://w3id.org/emmo/domain/electrochemistry').load()

Usage

This domain ontology supports the creation of Linked Data in any RDF-supported format. Below is an example using JSON-LD to desecribe a zinc foil electrode with some creator information and properties. Please see the documentation for more examples.

{
    "@context": "https://w3id.org/emmo/domain/electrochemistry/context",
    "@type": "Electrode",
    "schema:manufacturer": {
       "@type": "schema:ResearchOrganization",
       "@id": "https://www.wikidata.org/wiki/Q3041255",
       "schema:name": "SINTEF"
    },
    "schema:creator": {
       "@type": "schema:Person",
       "@id": "https://orcid.org/0000-0002-8758-6109",
       "schema:name": "Simon Clark"
    },
    "hasActiveMaterial": {
       "@type": ["Zinc", "Foil"]
    },
    "hasProperty": [
       {
             "@type": ["SpecificCapacity", "MeasuredProperty"],
             "hasNumericalPart": {
                "@type": "Real",
                "hasNumericalValue": 800
             },
             "hasMeasurementUnit": "emmo:MilliAmpereHourPerGram"
       },
       {
             "@type": ["Thickness", "ConventionalProperty"],
             "hasNumericalPart": {
                "@type": "Real",
                "hasNumericalValue": 250
             },
             "hasMeasurementUnit": "emmo:MicroMetre"
       },
       {
             "@type": ["Diameter", "MeasuredProperty"],
             "hasNumericalPart": {
                "@type": "Real",
                "hasNumericalValue": 2
             },
             "hasMeasurementUnit": "emmo:CentiMetre"
       },
       {
             "@type": ["Mass", "MeasuredProperty"],
             "hasNumericalPart": {
                "@type": "Real",
                "hasNumericalValue": 2.5
             },
             "hasMeasurementUnit": "emmo:Gram"
       }
    ]
}

This data can be read into an RDF graph and queried using SPARQL. For example, the following SPARQL query retrieves the value and unit for the diameter of the electrode:

SELECT ?diameterValue ?measurementUnit
WHERE {
  ?electrode a <{echo.Electrode.iri}> ;
             <{echo.hasProperty.iri}> ?property .

  ?property a <{echo.Diameter.iri}> ;
            <{echo.hasNumericalPart.iri}> ?numericalPart ;
            <{echo.hasMeasurementUnit.iri}> ?measurementUnit .

  ?numericalPart <{echo.hasNumericalValue.iri}> ?diameterValue .
}

and returns the result:

2 https://w3id.org/emmo#CentiMetre

Reference IRIs

The table below contains a quick cheat sheet of IRIs for accessing different files from the ontology The import structure is summarized in the following table:

IRI Description
https://w3id.org/emmo/domain/electrochemistry Base Asserted Ontology*
https://w3id.org/emmo/domain/electrochemistry/inferred Base Pre-Inferred Ontology*
https://w3id.org/emmo/domain/electrochemistry/latest Latest Asserted Ontology*
https://w3id.org/emmo/domain/electrochemistry/source Source of Asserted Ontology*
https://w3id.org/emmo/domain/electrochemistry/context Latest JSON-LD Context File
https://w3id.org/emmo/domain/electrochemistry/{VERSION} Version of Asserted Ontology*
https://w3id.org/emmo/domain/electrochemistry/{VERSION}/... ... follows same logic above

*IRI directs to human readable documentation if called from the web browser and to the source .ttl file if called from an application.

Acknowledgements

EU-Flag

This project has received support from European Union research and innovation programs, under grant agreement numbers: