pwtools.eos.ElkEOSFit

class pwtools.eos.ElkEOSFit(app='eos.x', natoms=1, name='foo', etype=1, npoints=300, **kwargs)[source]

Bases: ExternEOS

eos.x from the Elk [1] and Exciting [2] codes. [1] http://elk.sourceforge.net/ [2] http://exciting-code.org/

Note that the data produced by eos.x is divided by natoms and that energy is in Hartree. We remove the normalization and convert Ha -> eV.

self.{ev,bv,pv} all have the same shape[0] b/c we do not use finite differences for derivatives.

__init__(app='eos.x', natoms=1, name='foo', etype=1, npoints=300, **kwargs)[source]
Parameters:
  • natoms (int) – number of atoms in the unit cell, this is (I think) only used for normalization and can be set to 1 if not needed

  • name (str) – some dummy name for the input file

  • etype (int) – type of EOS to fit (see below)

  • npoints (int, optional) – number of E-V and P-V points of the fitted curves (nvplt in eos.x)

Notes

From the README: The equations of state currently implemented are:

  1. Universal EOS (Vinet P et al., J. Phys.: Condens. Matter 1, p1941 (1989))

  2. Murnaghan EOS (Murnaghan F D, Am. J. Math. 49, p235 (1937))

  3. Birch-Murnaghan 3rd-order EOS (Birch F, Phys. Rev. 71, p809 (1947))

  4. Birch-Murnaghan 4th-order EOS

  5. Natural strain 3rd-order EOS (Poirier J-P and Tarantola A, Phys. Earth Planet Int. 109, p1 (1998))

  6. Natural strain 4th-order EOS

  7. Cubic polynomial in (V-V0)

See also

EosFit

Methods

assert_attr(attr)

Raise AssertionError if self.<attr> is not set (is_set_attr() returns False.

assert_attr_lst(attr_lst)

assert_set_attr(attr)

Same as assert_attr(), but run try_set_attr() first.

assert_set_attr_lst(attr_lst)

calc_bv()

check_set_attr(attr)

Run try_set_attr() and return the result of is_set_attr(), i.e. True or False.

check_set_attr_lst(attr_lst)

dump(dump_filename[, mkdir])

Write object to binary file using pickle.

fit(*args, **kwargs)

Fit E-V data (self.energy, self.volume).

get_min([behave])

Calculate properites at energy minimum of E(V).

get_return_attr(attr_name)

Call try_set_attr() are return self.<attr_name> if set.

get_spl_bv()

get_spl_ev()

get_spl_pv()

init_attr_lst([attr_lst])

Set each self.<attr> in attr_lst to None.

is_set_attr(attr)

Check if self has the attribute self.<attr> and if it is _not_ None.

is_set_attr_lst(attr_lst)

load(dump_filename)

Load pickled object.

raw_return(attr_name)

Call try_set_attr(_<attr_name>_raw) and return it if set, else None.

raw_slice_get(attr_name, sl, axis)

Shortcut method:

set_all([attr_lst])

Call getter for each attr name in attr_lst.

set_attr_lst(attr_lst)

Set self.attr_lst and init each attr to None.

set_bv_method(bv_method)

Set self.bv_method, a.k.a.

try_set_attr(attr)

If self.<attr> does not exist or is None, then invoke an appropirately named getter as if this command would be executed.

try_set_attr_lst(attr_lst)