pymatgen.analysis.eos module

class Birch(volumes, energies)[source]

Bases: pymatgen.analysis.eos.EOSBase

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV
class BirchMurnaghan(volumes, energies)[source]

Bases: pymatgen.analysis.eos.EOSBase

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV
class DeltaFactor(volumes, energies)[source]

Bases: pymatgen.analysis.eos.PolynomialEOS

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV
fit(order=3)[source]

Overriden since this eos works with volume**(2/3) instead of volume.

class EOS(eos_name='murnaghan')[source]

Bases: object

Convenient wrapper. Retained in its original state to ensure backward compatibility.

Fit equation of state for bulk systems.

The following equations are supported:

murnaghan: PRB 28, 5480 (1983)

birch: Intermetallic compounds: Principles and Practice, Vol I:
    Principles. pages 195-210

birch_murnaghan: PRB 70, 224107

pourier_tarantola: PRB 70, 224107

vinet: PRB 70, 224107

deltafactor

numerical_eos: 10.1103/PhysRevB.90.174107.

Usage:

eos = EOS(eos_name='murnaghan')
eos_fit = eos.fit(volumes, energies)
eos_fit.plot()
MODELS = {'murnaghan': <class 'pymatgen.analysis.eos.Murnaghan'>, 'birch': <class 'pymatgen.analysis.eos.Birch'>, 'birch_murnaghan': <class 'pymatgen.analysis.eos.BirchMurnaghan'>, 'pourier_tarantola': <class 'pymatgen.analysis.eos.PourierTarantola'>, 'vinet': <class 'pymatgen.analysis.eos.Vinet'>, 'deltafactor': <class 'pymatgen.analysis.eos.DeltaFactor'>, 'numerical_eos': <class 'pymatgen.analysis.eos.NumericalEOS'>}
fit(volumes, energies)[source]

Fit energies as function of volumes.

Parameters:
  • volumes (list/np.array) –
  • energies (list/np.array) –
Returns:

EOSBase object

Return type:

EOSBase

class EOSBase(volumes, energies)[source]

Bases: object

Abstract class that must be subcalssed by all equation of state implementations.

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV
b0

Returns the bulk modulus. Note: the units for the bulk modulus: unit of energy/unit of volume^3.

b0_GPa

Returns the bulk modulus in GPa. Note: This assumes that the energy and volumes are in eV and Ang^3

respectively
b1

Returns the derivative of bulk modulus wrt pressure(dimensionless)

e0

Returns the min energy.

fit()[source]

Do the fitting. Does least square fitting. If you want to use custom fitting, must override this.

func(volume)[source]

The equation of state function with the paramters other than volume set to the ones obtained from fitting.

Parameters:volume (list/numpy.array) –
Returns:numpy.array
plot(width=8, height=None, plt=None, dpi=None, **kwargs)[source]

Plot the equation of state.

Parameters:
  • width (float) – Width of plot in inches. Defaults to 8in.
  • height (float) – Height of plot in inches. Defaults to width * golden ratio.
  • plt (matplotlib.pyplot) – If plt is supplied, changes will be made to an existing plot. Otherwise, a new plot will be created.
  • dpi
  • kwargs (dict) – additional args fed to pyplot.plot. supported keys: style, color, text, label
Returns:

Matplotlib plot object.

results

Returns a summary dict.

Returns:dict
v0

Returns the minimum or the reference volume in Ang^3.

exception EOSError[source]

Bases: Exception

class Murnaghan(volumes, energies)[source]

Bases: pymatgen.analysis.eos.EOSBase

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV
class NumericalEOS(volumes, energies)[source]

Bases: pymatgen.analysis.eos.PolynomialEOS

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV
fit(min_ndata_factor=3, max_poly_order_factor=5, min_poly_order=2)[source]

Fit the input data to the ‘numerical eos’, the equation of state employed in the quasiharmonic Debye model described in the paper: 10.1103/PhysRevB.90.174107.

credits: Cormac Toher

Parameters:
  • min_ndata_factor (int) –

    parameter that controls the minimum number of data points that will be used for fitting. minimum number of data points =

    total data points-2*min_ndata_factor
  • max_poly_order_factor (int) –

    parameter that limits the max order of the polynomial used for fitting. max_poly_order = number of data points used for fitting -

    max_poly_order_factor
  • min_poly_order (int) – minimum order of the polynomial to be considered for fitting.
class PolynomialEOS(volumes, energies)[source]

Bases: pymatgen.analysis.eos.EOSBase

Derives from EOSBase. Polynomial based equations of states must subclass this.

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV
fit(order)[source]

Do polynomial fitting and set the parameters. Uses numpy polyfit.

Parameters:order (int) – order of the fit polynomial
class PourierTarantola(volumes, energies)[source]

Bases: pymatgen.analysis.eos.EOSBase

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV
class Vinet(volumes, energies)[source]

Bases: pymatgen.analysis.eos.EOSBase

Parameters:
  • volumes (list/numpy.array) – volumes in Ang^3
  • energies (list/numpy.array) – energy in eV