mpinterfaces.mat2d.stability package

Submodules

mpinterfaces.mat2d.stability.analysis module

mpinterfaces.mat2d.stability.analysis.get_competing_phases()[source]

Collect the species to which the material might decompose to.

Returns:A list of phases as tuples formatted as [(formula_1, Materials_Project_ID_1), (formula_2, Materials_Project_ID_2), ...]
mpinterfaces.mat2d.stability.analysis.get_hull_distance(competing_phase_directory='../competing_phases')[source]

Calculate the material’s distance to the thermodynamic hull, based on species in the Materials Project database.

Parameters:competing_phase_directory (str) – absolute or relative path to the location where your competing phases have been relaxed. The default expectation is that they are stored in a directory named ‘competing_phases’ at the same level as your material’s relaxation directory.
Returns:
distance (eV/atom) between the material and the
hull.
Return type:float
mpinterfaces.mat2d.stability.analysis.plot_hull_distances(hull_distances, fmt='pdf')[source]

Create a bar graph of the formation energies of several 2D materials.

Parameters:
  • hull_distances (dict) – follow the format: {reduced_formula: hull_distance (in eV/atom)}
  • fmt (str) – matplotlib format style. Check the matplotlib docs for options.

mpinterfaces.mat2d.stability.startup module

mpinterfaces.mat2d.stability.startup.relax(dim=2, submit=True, force_overwrite=False)[source]

Writes input files and (optionally) submits a self-consistent relaxation. Should be run before pretty much anything else, in order to get the right energy and structure of the material.

Parameters:
  • dim (int) – 2 for relaxing a 2D material, 3 for a 3D material.
  • submit (bool) – Whether or not to submit the job.
  • force_overwrite (bool) – Whether or not to overwrite files if an already converged vasprun.xml exists in the directory.

Module contents