landau.phases¶
- class landau.phases.AbstractLinePhase(name)[source]¶
Bases:
PhaseBase class for fixed concentration phases.
Required overloads are
AbstractLinePhase.line_concentration()andAbstractLinePhase.line_free_energy().- abstract property line_concentration¶
- class landau.phases.AsePhase(name, fixed_concentration, thermochem, pressure=None, atoms_per_formula=1)[source]¶
Bases:
AbstractLinePhasePhase wrapper for ASE’s ThermoChem classes.
Equality and hashing compare
thermochemby its pickled bytes so twoAsePhaseinstances built from equivalent inputs compare equal even though ASE’sThermoChemdefaults to identity-based equality.atoms_per_formuladivides the energy returned bythermochemso the result is per atom (landau’s convention). Use 2 for an ASEIdealGasThermobuilt around H₂ or O₂, 3 for CO₂, etc.; the default of 1 is correct when the ASE object already represents one atom or one per-atom formula unit (mostHarmonicThermosetups, monatomicIdealGasThermo).- atoms_per_formula: int = 1¶
- fixed_concentration: float¶
- property line_concentration¶
- pressure: float | None = None¶
- thermochem: ThermoChem¶
- class landau.phases.ConstantPointDefect(name, excess_energy, excess_entropy, excess_solutes)[source]¶
Bases:
AbstractPointDefectA point defect that adds a contribution to the free energy of a host lattice.
Excess energy and entropy are assumed to be
- excess_energy: float¶
- excess_entropy: float¶
- excess_solutes: float¶
- name: str¶
- class landau.phases.IdealSolution(name, phase1, phase2)[source]¶
Bases:
Phase- phase1: AbstractLinePhase¶
- phase2: AbstractLinePhase¶
- class landau.phases.InterpolatingPhase(name, phases, num_coeffs=None, add_entropy=False, num_samples=100, maximum_extrapolation=0)[source]¶
Bases:
PhaseA Version of RegularSolutionPhase that does not depend on terminals. FIXME: These two classes should be unified.
- add_entropy: bool = False¶
- check_concentration_interpolation(T=1000, samples=50, plot_excess=False)[source]¶
Plot free energies of an interpolating phase and its underlying line phases to visually assess fit quality.
- Parameters:
T (float) – at which temperature to check interpolation
samples (int) – number of sampling points for plot
plot_excess (bool) – if True, subtract free energy at concentration range endpoints for legibility
- maximum_extrapolation: float = 0¶
- num_coeffs: int = None¶
- num_samples: int = 100¶
- phases: Iterable[AbstractLinePhase]¶
- class landau.phases.LinePhase(name, fixed_concentration, line_energy, line_entropy=0)[source]¶
Bases:
AbstractLinePhaseSimple phase with a fixed concentration and temperature independent entropy.
- fixed_concentration: float¶
- property line_concentration¶
- line_energy: float¶
- line_entropy: float = 0¶
- class landau.phases.Phase(name)[source]¶
Bases:
ABCRepresents a phase in a binary phase diagram.
- name: str¶
- class landau.phases.PointDefectSublattice(name, sublattice, sublattice_fraction, defects)[source]¶
Bases:
objectGroups together PointDefect that live on the same sublattice within a host structure.
- defects: list[AbstractPointDefect]¶
- name: str¶
- sublattice: int¶
- sublattice_fraction: float¶
- class landau.phases.PointDefectedPhase(name, line_phase, sublattices)[source]¶
Bases:
PhasePhase that combines any host phase and any number of point defects in it.
- line_phase: AbstractLinePhase¶
Underlying phase object of the host lattice.
- sublattices: list[PointDefectSublattice]¶
Sublattices and their point defects.
- class landau.phases.RegularSolution(name, phases, num_coeffs=4, add_entropy=False)[source]¶
Bases:
PhaseA regular solution model phase that interpolates through a given set of line phases using Redlich-Kister polynomials.
- add_entropy: bool = False¶
If False, assume that the free energies of the line phases already include configurational mixing entropy. If True add ideal mixing entropy.
- check_concentration_interpolation(T=1000, samples=50, plot_excess=False)[source]¶
Plot free energies of an interpolating phase and its underlying line phases to visually assess fit quality.
- Parameters:
T (float) – at which temperature to check interpolation
samples (int) – number of sampling points for plot
plot_excess (bool) – if True, subtract free energy at concentration range endpoints for legibility
- num_coeffs: int = 4¶
Number of Redlich-Kister coefficients for the mixing “enthalpy”; restricted to number of phases - 2.
- phases: Iterable[AbstractLinePhase]¶
Line phases to interpolate, must include the terminals.
- class landau.phases.SlowInterpolatingPhase(name, phases, add_entropy=False, maximum_extrapolation=0, concentration_range=(0.0, 1.0), interpolator=None)[source]¶
Bases:
PhaseA slower version of RegularSolutionPhase that does not depend on terminals. FIXME: These two classes should be unified.
- add_entropy: bool = False¶
- check_concentration_interpolation(T=1000, samples=50, plot_excess=False)[source]¶
Plot free energies of an interpolating phase and its underlying line phases to visually assess fit quality.
- Parameters:
T (float) – at which temperature to check interpolation
samples (int) – number of sampling points for plot
plot_excess (bool) – if True, subtract free energy at concentration range endpoints for legibility
concentration_range (tuple of float) – min/max concentration range
- concentration_range: tuple[float, float] = (0.0, 1.0)¶
- interpolator: ConcentrationInterpolator | None = None¶
- maximum_extrapolation: float = 0¶
- phases: Iterable[AbstractLinePhase]¶
- class landau.phases.TemperatureDependentLinePhase(name, fixed_concentration, temperatures, free_energies, interpolator=SGTE(nparam=3))[source]¶
Bases:
AbstractLinePhase” Simple phase with a fixed concentration and temperature dependent free energy.
- fixed_concentration: float¶
The fixed concentration of the phase
- free_energies: Iterable[float]¶
Sampled free energy of the phase has been computed.
- interpolator: TemperatureInterpolator = SGTE(nparam=3)¶
How to interpolate to arbitrary temperatures from the samples.
- property line_concentration¶
- temperatures: Iterable[float]¶
Temperatures at which the free energy of the phase has been sampled.