pymatgen.apps.battery.conversion_battery module¶
This module contains the classes to build a ConversionElectrode.
-
class
ConversionElectrode
(voltage_pairs: Tuple[pymatgen.apps.battery.battery_abc.AbstractVoltagePair], working_ion_entry: pymatgen.entries.computed_entries.ComputedEntry, _framework_formula: str, _initial_comp_formula: str)[source]¶ Bases:
pymatgen.apps.battery.battery_abc.AbstractElectrode
Class representing a ConversionElectrode, since it is dataclass this object can be constructed for the attributes. However, it is usually easier to construct a ConversionElectrode using one of the classmethods constructors provided.
- Attribute:
voltage_pairs: The voltage pairs making up the Conversion Electrode. working_ion_entry: A single ComputedEntry or PDEntry
representing the element that carries charge across the battery, e.g. Li.
- _initial_comp_formula: Starting composition for ConversionElectrode represented
as a string/formula.
-
as_dict_summary
(**kwargs)¶
-
classmethod
from_composition_and_entries
(comp, entries_in_chemsys, working_ion_symbol='Li', allow_unstable=False)[source]¶ Convenience constructor to make a ConversionElectrode from a composition and all entries in a chemical system.
- Parameters
comp – Starting composition for ConversionElectrode, e.g., Composition(“FeF3”)
entries_in_chemsys – Sequence containing all entries in a chemical system. E.g., all Li-Fe-F containing entries.
working_ion_symbol – Element symbol of working ion. Defaults to Li.
allow_unstable – If True, allow any composition to be used as the starting point of a conversion voltage curve, this is useful for comparing with insertion electrodes
-
classmethod
from_composition_and_pd
(comp, pd, working_ion_symbol='Li', allow_unstable=False)[source]¶ Convenience constructor to make a ConversionElectrode from a composition and a phase diagram.
- Parameters
comp – Starting composition for ConversionElectrode, e.g., Composition(“FeF3”)
pd – A PhaseDiagram of the relevant system (e.g., Li-Fe-F)
working_ion_symbol – Element symbol of working ion. Defaults to Li.
allow_unstable – Allow compositions that are unstable
-
get_sub_electrodes
(adjacent_only=True)[source]¶ If this electrode contains multiple voltage steps, then it is possible to use only a subset of the voltage steps to define other electrodes. For example, an LiTiO2 electrode might contain three subelectrodes: [LiTiO2 –> TiO2, LiTiO2 –> Li0.5TiO2, Li0.5TiO2 –> TiO2] This method can be used to return all the subelectrodes with some options
- Parameters
adjacent_only – Only return electrodes from compounds that are adjacent on the convex hull, i.e. no electrodes returned will have multiple voltage steps if this is set true
- Returns
A list of ConversionElectrode objects
-
get_summary_dict
(print_subelectrodes=True) → Dict[source]¶ Generate a summary dict. Populates the summary dict with the basic information from the parent method then populates more information. Since the parent method calls self.get_summary_dict(print_subelectrodes=True) for the subelectrodes. The current methode will be called from within super().get_summary_dict.
- Parameters
print_subelectrodes – Also print data on all the possible subelectrodes.
- Returns
A summary of this electrode”s properties in dict format.
-
property
initial_comp
¶ The pymatgen Composition representation of the initial composition
-
is_super_electrode
(conversion_electrode)[source]¶ Checks if a particular conversion electrode is a sub electrode of the current electrode. Starting from a more lithiated state may result in a subelectrode that is essentially on the same path. For example, a ConversionElectrode formed by starting from an FePO4 composition would be a super_electrode of a ConversionElectrode formed from an LiFePO4 composition.
-
class
ConversionVoltagePair
(voltage: float, mAh: float, mass_charge: float, mass_discharge: float, vol_charge: float, vol_discharge: float, frac_charge: float, frac_discharge: float, working_ion_entry: pymatgen.entries.computed_entries.ComputedEntry, _framework_formula: str, rxn: pymatgen.analysis.reaction_calculator.BalancedReaction, entries_charge: Iterable[pymatgen.entries.computed_entries.ComputedEntry], entries_discharge: Iterable[pymatgen.entries.computed_entries.ComputedEntry])[source]¶ Bases:
pymatgen.apps.battery.battery_abc.AbstractVoltagePair
A VoltagePair representing a Conversion Reaction with a defined voltage. Typically not initialized directly but rather used by ConversionElectrode. .. attribute:: rxn
BalancedReaction for the step
- type
BalancedReaction
-
voltage
¶ Voltage for the step
- Type
float
-
mAh
¶ Capacity of the step
- Type
float
-
vol_charge
¶ Volume of charged state
- Type
float
-
vol_discharge
¶ Volume of discharged state
- Type
float
-
mass_charge
¶ Mass of charged state
- Type
float
-
mass_discharge
¶ Mass of discharged state
- Type
float
-
frac_charge
¶ Fraction of working ion in the charged state
- Type
float
-
frac_discharge
¶ Fraction of working ion in the discharged state
- Type
float
-
entries_charge
¶ Entries in the charged state
- Type
-
entries_discharge
¶ Entries in discharged state
- Type
-
working_ion_entry
¶ Entry of the working ion.
- Type
-
entries_charge
: Iterable[pymatgen.entries.computed_entries.ComputedEntry]¶
-
entries_discharge
: Iterable[pymatgen.entries.computed_entries.ComputedEntry]¶
-
classmethod
from_steps
(step1, step2, normalization_els, framework_formula=None)[source]¶ Creates a ConversionVoltagePair from two steps in the element profile from a PD analysis.
- Parameters
step1 – Starting step
step2 – Ending step
normalization_els – Elements to normalize the reaction by. To ensure correct capacities.