matmethods.tools package

Submodules

matmethods.tools.analysis module

matmethods.tools.analysis.A_vib(T, debye, natoms, integrator)

Vibrational free energy. Eq(4) in doi.org/10.1016/j.comphy.2003.12.001

Args:
T (float): temperature in K debye (float): debye temperature in K natoms (int): number of atoms integrator: function from scipy.integrate
Returns:
float: vibrational free energy
matmethods.tools.analysis.debye_integral(y, integrator)

Debye integral. Eq(5) in doi.org/10.1016/j.comphy.2003.12.001

Args:
y (float) integrator: function from scipy.integrate
Returns:
float
matmethods.tools.analysis.debye_temperature_gibbs(volume, mass, natoms, B, poisson=0.25)

Calculates the debye temperature. Eq(6) in doi.org/10.1016/j.comphy.2003.12.001 Thanks to Joey.

Args:
volume (float) mass (float): total mass natoms (int): number of atoms B (float): bulk modulus poisson (float): poisson ratio
Returns:
debye temperature (in SI units)
matmethods.tools.analysis.get_debye_model_gibbs(energies, volumes, structure, t_min, t_step, t_max, eos, pressure=0)

Compute QHA gibbs free energy using the debye model. See the paper: http://doi.org/10.1016/j.comphy.2003.12.001

Args:

energies (list): volumes (list): structure (Structure): t_min (float): min temperature t_step (float): temperature step t_max (float): max temperature eos (str): equation of state used for fitting the energies and the volumes.

options supported by pymatgen: “quadratic”, “murnaghan”, “birch”, “birch_murnaghan”, “pourier_tarantola”, “vinet”, “deltafactor”

pressure (float): in GPa, optional.

Returns:
(numpy.ndarray, numpy.ndarray): Gibbs free energy , Temperature Note: The data points for which the equation of state fitting fails are skipped.
matmethods.tools.analysis.get_phonopy_gibbs(energies, volumes, force_constants, structure, t_min, t_step, t_max, mesh, eos, pressure=0)

Compute QHA gibbs free energy using the phonopy interface.

Args:

energies (list): volumes (list): force_constants (list): structure (Structure): t_min (float): min temperature t_step (float): temperature step t_max (float): max temperature mesh (list/tuple): reciprocal space density eos (str): equation of state used for fitting the energies and the volumes.

options supported by phonopy: vinet, murnaghan, birch_murnaghan

pressure (float): in GPa, optional.

Returns:
(numpy.ndarray, numpy.ndarray): Gibbs free energy, Temperature
matmethods.tools.analysis.get_phonopy_qha(energies, volumes, force_constants, structure, t_min, t_step, t_max, mesh, eos, pressure=0)

Return phonopy QHA interface.

Args:

energies (list): volumes (list): force_constants (list): structure (Structure): t_min (float): min temperature t_step (float): temperature step t_max (float): max temperature mesh (list/tuple): reciprocal space density eos (str): equation of state used for fitting the energies and the volumes.

options supported by phonopy: vinet, murnaghan, birch_murnaghan

pressure (float): in GPa, optional.

Returns:
PhonopyQHA
matmethods.tools.analysis.get_phonopy_thermal_expansion(energies, volumes, force_constants, structure, t_min, t_step, t_max, mesh, eos, pressure=0)

Compute QHA thermal expansion coefficient using the phonopy interface.

Args:

energies (list): volumes (list): force_constants (list): structure (Structure): t_min (float): min temperature t_step (float): temperature step t_max (float): max temperature mesh (list/tuple): reciprocal space density eos (str): equation of state used for fitting the energies and the volumes.

options supported by phonopy: vinet, murnaghan, birch_murnaghan

pressure (float): in GPa, optional.

Returns:
(numpy.ndarray, numpy.ndarray): thermal expansion coefficient, Temperature
matmethods.tools.analysis.gibbs_minimizer(energies, volumes, mass, natoms, temperature=298.0, pressure=0, poisson=0.25, eos=u'murnaghan')

Fit the input energies and volumes to the equation of state to obtain the bulk modulus which is subsequently used to obtain the debye temperature. The debye temperature is then used to compute the vibrational free energy and the gibbs free energy as a function of volume, temperature and pressure. A second fit is preformed to get the functional form of gibbs free energy:(G, V, T, P). Finally G(V, P, T) is minimized with respect to V and the optimum value of G evaluated at V_opt, G_opt(V_opt, T, P), is returned.

Args:
energies (list): list of energies volumes (list): list of volumes mass (float): total mass natoms (int): number of atoms temperature (float): temperature in K pressure (float): pressure in GPa poisson (float): poisson ratio eos (str): name of the equation of state supported by pymatgen. See pymatgen.analysis.eos.py
Returns:
float: gibbs free energy at the given temperature and pressure minimized wrt volume.

Module contents