Half cells & three-electrode cells#

How to describe the non-full-cell configurations: one electrode under test against a counter. Neither is a separate record type — both are a cell flavored by cell_configuration (half_cell or three_electrode_cell), with electrodes named by role. The one structural difference: in a half cell the counter electrode IS the potential reference (one electrode, two roles); a three-electrode cell separates them with a dedicated reference_electrode.

  • Not record types: a cell with cell_configuration set to half_cell or three_electrode_cell.

  • Electrodes are named by role - working_electrode / counter_electrode / reference_electrode (or their *_spec_id siblings) - never by polarity.

  • The one structural difference: a half cell’s counter also carries the reference role (one electrode, two classes); a three-electrode cell states a dedicated reference_electrode.

  • Reference the working electrode’s spec; describe the interchangeable counter (and a reference ring or wire) inline - a metal foil is a monolithic material, never a coating.

Define one#

A coin half cell for electrode characterization#

from battinfo import CellSpec

spec = CellSpec(
    id="https://w3id.org/battinfo/spec/t4wz-ff8s-6vp6-af48",
    manufacturer="Example Lab",
    model="HC-GR-01",
    format="coin",
    chemistry="Li-ion",
    # The half-cell flavor: electrodes are named by ROLE, not polarity.
    cell_configuration="half_cell",
    # The design under test, referenced by its electrode-spec IRI.
    working_electrode_spec_id="https://w3id.org/battinfo/spec/kxwy-5f5f-f682-hhch",
    # The counter is described inline: lithium foil the lab treats as
    # interchangeable earns a description, not a tracked record. In a
    # two-electrode half cell it is also the potential reference. A foil
    # is a monolithic electrode - `material`, never a coating.
    counter_electrode={"material": {"name": "Lithium metal"}},
    source={"type": "lab", "retrieved_at": 1750000000},
)
record = spec.to_record()
{
  "schema_version": "0.2.0",
  "cell_spec": {
    "id": "https://w3id.org/battinfo/spec/t4wz-ff8s-6vp6-af48",
    "short_id": "t4wzff",
    "identifier": "cell-spec:t4wz-ff8s-6vp6-af48",
    "name": "Example Lab HC-GR-01",
    "model": "HC-GR-01",
    "manufacturer": {
      "type": "Organization",
      "name": "Example Lab"
    },
    "cell_format": "coin",
    "chemistry": "Li-ion",
    "cell_configuration": "half_cell"
  },
  "properties": {},
  "provenance": {
    "source_type": "lab",
    "retrieved_at": 1750000000,
    "battinfo_version": "0.7.0"
  },
  "working_electrode_spec_id": "https://w3id.org/battinfo/spec/kxwy-5f5f-f682-hhch",
  "counter_electrode": {
    "material": {
      "name": "Lithium metal",
      "property": {}
    },
    "property": {}
  }
}

Emitted by record_to_jsonld, hosted-context mode.

{
  "@context": "https://w3id.org/battinfo/context/records/v1.json",
  "@type": [
    "BatteryCellSpecification",
    "schema:ProductModel",
    "schema:CreativeWork"
  ],
  "@id": "https://w3id.org/battinfo/spec/t4wz-ff8s-6vp6-af48",
  "schema:identifier": "t4wz-ff8s-6vp6-af48",
  "schema:name": "Example Lab HC-GR-01",
  "schema:model": "HC-GR-01",
  "schema:manufacturer": {
    "@type": "schema:Organization",
    "schema:name": "Example Lab"
  },
  "schema:url": "https://www.battery-genome.org/registry/spec/t4wz-ff8s-6vp6-af48",
  "isDescriptionFor": {
    "@type": [
      "BatteryCell",
      "CoinCell",
      "BatteryHalfCell",
      "HalfCellDevice",
      "LithiumIonBattery"
    ],
    "@id": "https://w3id.org/battinfo/spec/t4wz-ff8s-6vp6-af48#described",
    "skos:prefLabel": "Example Lab HC-GR-01",
    "hasCounterElectrode": {
      "hasActiveMaterial": {
        "@type": [
          "Lithium",
          "ActiveMaterial"
        ],
        "schema:name": "Lithium metal"
      },
      "@type": [
        "CounterElectrode",
        "ReferenceElectrode"
      ]
    },
    "hasWorkingElectrode": {
      "@id": "https://w3id.org/battinfo/spec/kxwy-5f5f-f682-hhch#described"
    }
  },
  "schema:schemaVersion": "0.2.0",
  "dcterms:source": {
    "@type": "prov:Entity",
    "dcterms:type": "lab",
    "prov:generatedAtTime": "2025-06-15T15:06:40+00:00"
  }
}

What to notice:

  • The described device types as HalfCellDevice (never ElectrochemicalHalfCell).

  • The working electrode emits under hasWorkingElectrode as a reference to its spec; the counter node types as BOTH CounterElectrode and ReferenceElectrode.

A three-electrode cell#

from battinfo import CellSpec

spec = CellSpec(
    id="https://w3id.org/battinfo/spec/q7mf-3wtk-8npv-2hcx",
    manufacturer="Example Lab",
    model="3E-GR-01",
    format="pouch",
    chemistry="Li-ion",
    cell_configuration="three_electrode_cell",
    working_electrode_spec_id="https://w3id.org/battinfo/spec/kxwy-5f5f-f682-hhch",
    counter_electrode={"material": {"name": "Lithium metal"}},
    # The separated third electrode: unlike a half cell, the counter is
    # only a counter, and the reference is its own (tiny) electrode - a
    # lithium ring or wire, monolithic like the foil counter.
    reference_electrode={"material": {"name": "Lithium metal"}},
    source={"type": "lab", "retrieved_at": 1750000000},
)
record = spec.to_record()
{
  "schema_version": "0.2.0",
  "cell_spec": {
    "id": "https://w3id.org/battinfo/spec/7d9k-2m4p-8t3x-6nq5",
    "short_id": "7d9k2m",
    "identifier": "cell-spec:7d9k-2m4p-8t3x-6nq5",
    "name": "Example Lab 3E-GR-01",
    "model": "3E-GR-01",
    "manufacturer": {
      "type": "Organization",
      "name": "Example Lab"
    },
    "cell_format": "pouch",
    "chemistry": "Li-ion",
    "cell_configuration": "three_electrode_cell",
    "reference_electrode": {
      "material": {
        "name": "Lithium metal",
        "property": {}
      },
      "property": {}
    }
  },
  "properties": {},
  "provenance": {
    "source_type": "lab",
    "retrieved_at": 1750000000,
    "battinfo_version": "0.7.0"
  },
  "working_electrode_spec_id": "https://w3id.org/battinfo/spec/kxwy-5f5f-f682-hhch",
  "counter_electrode": {
    "material": {
      "name": "Lithium metal",
      "property": {}
    },
    "property": {}
  }
}

Emitted by record_to_jsonld, hosted-context mode.

{
  "@context": "https://w3id.org/battinfo/context/records/v1.json",
  "@type": [
    "BatteryCellSpecification",
    "schema:ProductModel",
    "schema:CreativeWork"
  ],
  "@id": "https://w3id.org/battinfo/spec/7d9k-2m4p-8t3x-6nq5",
  "schema:identifier": "7d9k-2m4p-8t3x-6nq5",
  "schema:name": "Example Lab 3E-GR-01",
  "schema:model": "3E-GR-01",
  "schema:manufacturer": {
    "@type": "schema:Organization",
    "schema:name": "Example Lab"
  },
  "schema:url": "https://www.battery-genome.org/registry/spec/7d9k-2m4p-8t3x-6nq5",
  "isDescriptionFor": {
    "@type": [
      "BatteryCell",
      "PouchCell",
      "ThreeElectrodeCellDevice",
      "LithiumIonBattery"
    ],
    "@id": "https://w3id.org/battinfo/spec/7d9k-2m4p-8t3x-6nq5#described",
    "skos:prefLabel": "Example Lab 3E-GR-01",
    "hasCounterElectrode": {
      "hasActiveMaterial": {
        "@type": [
          "Lithium",
          "ActiveMaterial"
        ],
        "schema:name": "Lithium metal"
      },
      "@type": "CounterElectrode"
    },
    "hasReferenceElectrode": {
      "hasActiveMaterial": {
        "@type": [
          "Lithium",
          "ActiveMaterial"
        ],
        "schema:name": "Lithium metal"
      },
      "@type": "ReferenceElectrode"
    },
    "hasWorkingElectrode": {
      "@id": "https://w3id.org/battinfo/spec/kxwy-5f5f-f682-hhch#described"
    }
  },
  "schema:schemaVersion": "0.2.0",
  "dcterms:source": {
    "@type": "prov:Entity",
    "dcterms:type": "lab",
    "prov:generatedAtTime": "2025-06-15T15:06:40+00:00"
  }
}

What to notice:

  • The described device types as ThreeElectrodeCellDevice; the counter is ONLY a counter here.

  • The dedicated reference emits under hasReferenceElectrode typed ReferenceElectrode — a lithium ring or wire is a monolithic material, like the foil counter.

Common examples#

A selection of real, validated records from the packaged examples corpus — each one click away, included from its single source under examples/. The full, living library is the registry: browse it there.

Graphite || Li coin half cell (cell-spec)

The record ships in the installed wheel — load it as a starting point:

import json
from importlib import resources

record = json.loads(
    resources.files("battinfo")
    .joinpath("data/examples/cell-spec/cell-spec-g7hd-4wkq-2mtx-9npf.json")
    .read_text(encoding="utf-8")
)
{
  "schema_version": "0.2.0",
  "cell_spec": {
    "id": "https://w3id.org/battinfo/spec/g7hd-4wkq-2mtx-9npf",
    "short_id": "g7hd4w",
    "identifier": "cell-spec:g7hd-4wkq-2mtx-9npf",
    "name": "Graphite || Li coin half cell",
    "model": "HC-GR-02",
    "manufacturer": {
      "type": "Organization",
      "name": "Example Lab"
    },
    "cell_format": "coin",
    "chemistry": "Li-ion",
    "cell_configuration": "half_cell"
  },
  "properties": {},
  "provenance": {
    "source_type": "lab",
    "retrieved_at": 1750000000,
    "battinfo_version": "0.7.0"
  },
  "working_electrode_spec_id": "https://w3id.org/battinfo/spec/d7qr-n581-74c3-7g7r",
  "counter_electrode": {
    "material": {
      "name": "Lithium metal",
      "property": {}
    },
    "property": {}
  }
}

Emitted by record_to_jsonld, hosted-context mode.

{
  "@context": "https://w3id.org/battinfo/context/records/v1.json",
  "@type": [
    "BatteryCellSpecification",
    "schema:ProductModel",
    "schema:CreativeWork"
  ],
  "@id": "https://w3id.org/battinfo/spec/g7hd-4wkq-2mtx-9npf",
  "schema:identifier": "g7hd-4wkq-2mtx-9npf",
  "schema:name": "Graphite || Li coin half cell",
  "schema:model": "HC-GR-02",
  "schema:manufacturer": {
    "@type": "schema:Organization",
    "schema:name": "Example Lab"
  },
  "schema:url": "https://www.battery-genome.org/registry/spec/g7hd-4wkq-2mtx-9npf",
  "isDescriptionFor": {
    "@type": [
      "BatteryCell",
      "CoinCell",
      "BatteryHalfCell",
      "HalfCellDevice",
      "LithiumIonBattery"
    ],
    "@id": "https://w3id.org/battinfo/spec/g7hd-4wkq-2mtx-9npf#described",
    "skos:prefLabel": "Graphite || Li coin half cell",
    "hasCounterElectrode": {
      "hasActiveMaterial": {
        "@type": [
          "Lithium",
          "ActiveMaterial"
        ],
        "schema:name": "Lithium metal"
      },
      "@type": [
        "CounterElectrode",
        "ReferenceElectrode"
      ]
    },
    "hasWorkingElectrode": {
      "@id": "https://w3id.org/battinfo/spec/d7qr-n581-74c3-7g7r#described"
    }
  },
  "schema:schemaVersion": "0.2.0",
  "dcterms:source": {
    "@type": "prov:Entity",
    "dcterms:type": "lab",
    "prov:generatedAtTime": "2025-06-15T15:06:40+00:00"
  }
}
NMC811 || Li coin half cell (cell-spec)

The record ships in the installed wheel — load it as a starting point:

import json
from importlib import resources

record = json.loads(
    resources.files("battinfo")
    .joinpath("data/examples/cell-spec/cell-spec-n8mw-5tkx-3qvd-7hfp.json")
    .read_text(encoding="utf-8")
)
{
  "schema_version": "0.2.0",
  "cell_spec": {
    "id": "https://w3id.org/battinfo/spec/n8mw-5tkx-3qvd-7hfp",
    "short_id": "n8mw5t",
    "identifier": "cell-spec:n8mw-5tkx-3qvd-7hfp",
    "name": "NMC811 || Li coin half cell",
    "model": "HC-NMC-01",
    "manufacturer": {
      "type": "Organization",
      "name": "Example Lab"
    },
    "cell_format": "coin",
    "chemistry": "Li-ion",
    "cell_configuration": "half_cell"
  },
  "properties": {},
  "provenance": {
    "source_type": "lab",
    "retrieved_at": 1750000000,
    "battinfo_version": "0.7.0"
  },
  "working_electrode_spec_id": "https://w3id.org/battinfo/spec/qfjh-7xyr-ga1k-tjez",
  "counter_electrode": {
    "material": {
      "name": "Lithium metal",
      "property": {}
    },
    "property": {}
  }
}

Emitted by record_to_jsonld, hosted-context mode.

{
  "@context": "https://w3id.org/battinfo/context/records/v1.json",
  "@type": [
    "BatteryCellSpecification",
    "schema:ProductModel",
    "schema:CreativeWork"
  ],
  "@id": "https://w3id.org/battinfo/spec/n8mw-5tkx-3qvd-7hfp",
  "schema:identifier": "n8mw-5tkx-3qvd-7hfp",
  "schema:name": "NMC811 || Li coin half cell",
  "schema:model": "HC-NMC-01",
  "schema:manufacturer": {
    "@type": "schema:Organization",
    "schema:name": "Example Lab"
  },
  "schema:url": "https://www.battery-genome.org/registry/spec/n8mw-5tkx-3qvd-7hfp",
  "isDescriptionFor": {
    "@type": [
      "BatteryCell",
      "CoinCell",
      "BatteryHalfCell",
      "HalfCellDevice",
      "LithiumIonBattery"
    ],
    "@id": "https://w3id.org/battinfo/spec/n8mw-5tkx-3qvd-7hfp#described",
    "skos:prefLabel": "NMC811 || Li coin half cell",
    "hasCounterElectrode": {
      "hasActiveMaterial": {
        "@type": [
          "Lithium",
          "ActiveMaterial"
        ],
        "schema:name": "Lithium metal"
      },
      "@type": [
        "CounterElectrode",
        "ReferenceElectrode"
      ]
    },
    "hasWorkingElectrode": {
      "@id": "https://w3id.org/battinfo/spec/qfjh-7xyr-ga1k-tjez#described"
    }
  },
  "schema:schemaVersion": "0.2.0",
  "dcterms:source": {
    "@type": "prov:Entity",
    "dcterms:type": "lab",
    "prov:generatedAtTime": "2025-06-15T15:06:40+00:00"
  }
}
Hard carbon || Na coin half cell (cell-spec)

The record ships in the installed wheel — load it as a starting point:

import json
from importlib import resources

record = json.loads(
    resources.files("battinfo")
    .joinpath("data/examples/cell-spec/cell-spec-s4kt-8njw-6xpd-2mvh.json")
    .read_text(encoding="utf-8")
)
{
  "schema_version": "0.2.0",
  "cell_spec": {
    "id": "https://w3id.org/battinfo/spec/s4kt-8njw-6xpd-2mvh",
    "short_id": "s4kt8n",
    "identifier": "cell-spec:s4kt-8njw-6xpd-2mvh",
    "name": "Hard carbon || Na coin half cell",
    "model": "HC-HC-01",
    "manufacturer": {
      "type": "Organization",
      "name": "Example Lab"
    },
    "cell_format": "coin",
    "chemistry": "Na-ion",
    "cell_configuration": "half_cell"
  },
  "properties": {},
  "provenance": {
    "source_type": "lab",
    "retrieved_at": 1750000000,
    "battinfo_version": "0.7.0"
  },
  "working_electrode": {
    "coating": {
      "component": {
        "active_material": [
          {
            "name": "Hard carbon",
            "property": {}
          }
        ]
      },
      "property": {}
    },
    "property": {}
  },
  "counter_electrode": {
    "material": {
      "name": "Sodium metal",
      "property": {}
    },
    "property": {}
  }
}

Emitted by record_to_jsonld, hosted-context mode.

{
  "@context": "https://w3id.org/battinfo/context/records/v1.json",
  "@type": [
    "BatteryCellSpecification",
    "schema:ProductModel",
    "schema:CreativeWork"
  ],
  "@id": "https://w3id.org/battinfo/spec/s4kt-8njw-6xpd-2mvh",
  "schema:identifier": "s4kt-8njw-6xpd-2mvh",
  "schema:name": "Hard carbon || Na coin half cell",
  "schema:model": "HC-HC-01",
  "schema:manufacturer": {
    "@type": "schema:Organization",
    "schema:name": "Example Lab"
  },
  "schema:url": "https://www.battery-genome.org/registry/spec/s4kt-8njw-6xpd-2mvh",
  "isDescriptionFor": {
    "@type": [
      "BatteryCell",
      "CoinCell",
      "BatteryHalfCell",
      "HalfCellDevice",
      "SodiumIonBattery"
    ],
    "@id": "https://w3id.org/battinfo/spec/s4kt-8njw-6xpd-2mvh#described",
    "skos:prefLabel": "Hard carbon || Na coin half cell",
    "hasWorkingElectrode": {
      "hasCoating": {
        "@type": "ElectrodeCoating",
        "hasActiveMaterial": {
          "@type": [
            "HardCarbon",
            "ActiveMaterial"
          ],
          "schema:name": "Hard carbon"
        }
      },
      "@type": "WorkingElectrode"
    },
    "hasCounterElectrode": {
      "hasActiveMaterial": {
        "@type": [
          "Sodium",
          "ActiveMaterial"
        ],
        "schema:name": "Sodium metal"
      },
      "@type": [
        "CounterElectrode",
        "ReferenceElectrode"
      ]
    }
  },
  "schema:schemaVersion": "0.2.0",
  "dcterms:source": {
    "@type": "prov:Entity",
    "dcterms:type": "lab",
    "prov:generatedAtTime": "2025-06-15T15:06:40+00:00"
  }
}
Si-Gr three-electrode pouch cell (cell-spec)

The record ships in the installed wheel — load it as a starting point:

import json
from importlib import resources

record = json.loads(
    resources.files("battinfo")
    .joinpath("data/examples/cell-spec/cell-spec-w3fq-9rkm-4tpx-8nhd.json")
    .read_text(encoding="utf-8")
)
{
  "schema_version": "0.2.0",
  "cell_spec": {
    "id": "https://w3id.org/battinfo/spec/w3fq-9rkm-4tpx-8nhd",
    "short_id": "w3fq9r",
    "identifier": "cell-spec:w3fq-9rkm-4tpx-8nhd",
    "name": "Si-Gr three-electrode pouch cell",
    "model": "3E-SIGR-01",
    "manufacturer": {
      "type": "Organization",
      "name": "Example Lab"
    },
    "cell_format": "pouch",
    "chemistry": "Li-ion",
    "cell_configuration": "three_electrode_cell",
    "reference_electrode": {
      "material": {
        "name": "Lithium metal",
        "property": {}
      },
      "property": {}
    }
  },
  "properties": {},
  "provenance": {
    "source_type": "lab",
    "retrieved_at": 1750000000,
    "battinfo_version": "0.7.0"
  },
  "working_electrode_spec_id": "https://w3id.org/battinfo/spec/qw3j-we77-zzj1-ya55",
  "counter_electrode": {
    "material": {
      "name": "Lithium metal",
      "property": {}
    },
    "property": {}
  }
}

Emitted by record_to_jsonld, hosted-context mode.

{
  "@context": "https://w3id.org/battinfo/context/records/v1.json",
  "@type": [
    "BatteryCellSpecification",
    "schema:ProductModel",
    "schema:CreativeWork"
  ],
  "@id": "https://w3id.org/battinfo/spec/w3fq-9rkm-4tpx-8nhd",
  "schema:identifier": "w3fq-9rkm-4tpx-8nhd",
  "schema:name": "Si-Gr three-electrode pouch cell",
  "schema:model": "3E-SIGR-01",
  "schema:manufacturer": {
    "@type": "schema:Organization",
    "schema:name": "Example Lab"
  },
  "schema:url": "https://www.battery-genome.org/registry/spec/w3fq-9rkm-4tpx-8nhd",
  "isDescriptionFor": {
    "@type": [
      "BatteryCell",
      "PouchCell",
      "ThreeElectrodeCellDevice",
      "LithiumIonBattery"
    ],
    "@id": "https://w3id.org/battinfo/spec/w3fq-9rkm-4tpx-8nhd#described",
    "skos:prefLabel": "Si-Gr three-electrode pouch cell",
    "hasCounterElectrode": {
      "hasActiveMaterial": {
        "@type": [
          "Lithium",
          "ActiveMaterial"
        ],
        "schema:name": "Lithium metal"
      },
      "@type": "CounterElectrode"
    },
    "hasReferenceElectrode": {
      "hasActiveMaterial": {
        "@type": [
          "Lithium",
          "ActiveMaterial"
        ],
        "schema:name": "Lithium metal"
      },
      "@type": "ReferenceElectrode"
    },
    "hasWorkingElectrode": {
      "@id": "https://w3id.org/battinfo/spec/qw3j-we77-zzj1-ya55#described"
    }
  },
  "schema:schemaVersion": "0.2.0",
  "dcterms:source": {
    "@type": "prov:Entity",
    "dcterms:type": "lab",
    "prov:generatedAtTime": "2025-06-15T15:06:40+00:00"
  }
}

Fields#

Half cells and three-electrode cells are cell records — the field reference lives on Cells, and cell_configuration, the role holders (working_electrode / counter_electrode / reference_electrode), and their *_spec_id siblings appear in the cell-spec table there.

Design notes#

The reasoning behind the model

Why role, not polarity. In the working-electrode voltage convention (vs Li/Li+ for a lithium counter) a graphite working electrode charges toward 1 V — the polarity labels of a full cell would mislead, so a half cell has no sides to name. The role-based holders are the ruling, not a convenience.

What is usually stated. The working electrode as a reference to its electrode spec — the design under test; the counter described inline on its holder, because a lithium foil the lab treats as interchangeable earns a description, not an individually tracked record. A lithium counter is pure metal foil, not a coated electrode: state it as material ({"material": {"name": "Lithium metal"}}), never as a coating — there is no collector-plus-layer structure to describe.

Half cell vs three-electrode cell: one difference. In a half cell the counter electrode is the potential reference — one physical electrode carrying two roles, which is why the counter node types as both CounterElectrode and ReferenceElectrode and why nothing goes in reference_electrode. Passing current through your reference polarizes it, so when that matters the three-electrode cell separates the roles: the counter is only a counter, and a dedicated reference_electrode (a lithium ring or wire near the working electrode — a monolithic material, or a reference_electrode_spec_id) carries the reference alone. Everything else — holders, schema, creators — is identical between the two configurations. Both facts are the cell’s physical arrangement; the “vs what” of a measured voltage is stated where the number lives, as the quantity’s voltage_reference datum.

Emission. A half cell’s described device types as HalfCellDevice (the counter dual-typed as above); a three-electrode cell’s types as ThreeElectrodeCellDevice, with the dedicated reference under hasReferenceElectrode typed ReferenceElectrode (a legacy string shorthand like "NHE" still emits as a labeled ReferenceElectrode node). The working electrode emits under hasWorkingElectrode; a monolithic electrode’s material emits as its hasActiveMaterial, class-typed (Lithium) through the material map.