Skip to content

Commit

Permalink
Elec dev (#231)
Browse files Browse the repository at this point in the history
* added more fields to electrode doc

* added elements field

* linting

* update

* more useful fields

* small fixes

* added nelements and formula_anonymous

* update
  • Loading branch information
jmmshn authored and tschaume committed Mar 26, 2021
1 parent fe1d253 commit 539a484
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions src/mp_api/electrodes/models.py
Expand Up @@ -82,6 +82,9 @@ class InsertionVoltageStep(VoltageStep):


class InsertionElectrodeDoc(InsertionVoltageStep):
"""
Insertion electrode
"""

battery_id: str = Field(None, description="The id for this battery document.")

Expand Down Expand Up @@ -122,24 +125,31 @@ class InsertionElectrodeDoc(InsertionVoltageStep):
None, description="The chemical compositions of the host framework",
)

material_ids: List[str] = Field(
None,
description="The ids of all structures that matched to the present host lattice, regardless of stability. "
"The stable entries can be found in the adjacent pairs.",
elements: List[Element] = Field(
None, description="The atomic species contained in this electrode (not including the working ion).",
)

elements: List[Element] = Field(
None, description="The atomic species contained in this electrode.",
nelements: int = Field(
None, description="The number of elements in the material (not including the working ion).",
)

chemsys: str = Field(
None, description="The chemical system this electrode belongs to (not including the working ion)"
)

formula_anonymous: str = Field(
None,
description="The chemical system this electrode belongs to. "
"Note: The conversion electrode can be calculated on this chemical system",
title="Anonymous Formula",
description="Anonymized representation of the formula (not including the working ion)",
)

electrode_object: InsertionElectrode = Field(
None, description="Returns InsertionElectrode object",
material_ids: List[str] = Field(
None, description="The ids of all structures that matched to the present host lattice, "
"regardless of stability. The stable entries can be found in the adjacent pairs.",
)

electrode_object: Dict = Field(
None, description="The pymatgen electrode object",
)

# Make sure that the datetime field is properly formatted
Expand Down

0 comments on commit 539a484

Please sign in to comment.