MullikenBandStructure¶
-
class
aimstools.bandstructures.mulliken_bandstructure.MullikenBandStructure(outputfile, soc=False)[source]¶ Bases:
aimstools.bandstructures.base.BandStructureBaseClassMulliken-projected band structure object.
A mulliken-projected band structure shows the momentum-resolved Mulliken contribution of each atom to the energy.
Variables: spectrum – MullikenSpectrum.-
plot_all_angular_momenta(max_l='f', axes=None, colors=[], show_colorbar=True, **kwargs)[source]¶ Utility function to show contributions of angular momenta (e.g., “s”, “p”, “d” orbitals).
Parameters: max_l (str, optional) – Maximum angular momentum to show. Defaults to “f”.
-
plot_all_species(axes=None, l='tot', colors=[], show_legend=True, **kwargs)[source]¶ Utility function to all show species contributions.
Parameters: l (str, optional) – Angular momentum. Defaults to “tot”.
-
plot_contributions(axes: matplotlib.axes.Axes = None, contributions: list = [], colors: list = [], labels: list = [], **kwargs)[source]¶ Main function to handle plotting of Mulliken spectra. Supports all keywords of
plot().Contributions should be a list of identifiers that can be interpreted by
MullikenSpectrum. They are converted to a list ofMullikenContribution.- The following combinations of contribution formats are accepted:
- integers containing atom indices (e.g., [0,1,2,3])
- species symbols (e.g., [“Mo”, “S”])
- symbol groups (e.g., [“MoS”, “CH”])
- tuples specifying an identifier and an angular momentum (e.g., [(“all”, “s”)])
- tuples containing a tuple of atom indices and an angular momentum (e.g., [((0,1,2), “tot”)])
Example
>>> from aimstools.bandstructures import MullikenBandStructure as MBS >>> bs = MBS("path/to/dir") >>> bs.plot_contributions(contributions=["F", "CH"], labels=["foo", "bar"], colors=["green", "blue"], mode="scatter")
Parameters: - contributions (list, optional) – List of contribution identifiers. Defaults to [].
- colors (list, optional) – List of colors. Defaults to [].
- labels (list, optional) – List of labels. Defaults to [].
- mode (str, optional) – Plotting mode, can be “lines”, “scatter”, “majority” or “gradient”. Defaults to “lines”.
- capstyle (str, optional) – Matplotlib linecollection capstyle. Defaults to “round”.
- interpolate (bool, optional) – Interpolate bands and contributions for smoother appearance. Defaults to False.
- interpolation_step (float, optional) – Interpolation step for interpolate. Defaults to 0.01.
- scale_width (bool, optional) – Scale point or line widths by contribution. Defaults to True.
- scale_width_factor (float, optional) – Factor to scale line widths by contribution. Defaults to 2.
- show_legend (bool, optional) – Show legend for labels and colors. Defaults to True.
- legend_linewidth (float, optional) – Legend handle linewidth. Defaults to 1.5.
- legend_frameon (bool, optional) – Show legend frame. Defaults to True.
- legend_fancybox (bool, optional) – Enable bevelled box. Defaults to True.
- legend_borderpad (float, optional) – Pad for legend bordrs. Defaults to 0.4.
- legend_loc (string, optional) – Legend location. Defaults to “upper right”.
- legend_handlelength (float) – Legend handlelength, defaults to 0.4.
- show_colorbar (bool, optional) – Show colorbar. Defaults to False.
Returns: axes – Axes object.
-
plot_difference_contribution(con1, con2, axes=None, colors=['blue', 'red'], show_colorbar=True, **kwargs)[source]¶ Utility function to show difference of two contributions with a color gradient.
-
plot_majority_contribution(contributions=[], axes=None, colors=[], labels=[], show_colorbar=True, **kwargs)[source]¶ Utility function to show majority contributions of given list of contributions.
A majority-projection only shows the largest contribution to each k-point and band.
-
set_spectrum(bandpath=None, reference=None)[source]¶ Sets
MullikenSpectrumfor a given bandpath.Bandpath should be ASE-formatted string, e.g., “GMKG,A”, where the “,” denotes jumps.
-
spectrum¶
-
-
class
aimstools.bandstructures.mulliken_bandstructure.MullikenContribution(symbol, contribution, l)[source]¶ Bases:
objectContainer class to hold mulliken-projected atomic contributions to the band structure.
MullikenContribution supports addition and substraction.
Variables: contribution (ndarray) – (natoms, nkpoints, nspins, nstates, 5) array with the last five axes being the angular momenta (tot, s, p, d, f). -
con¶ Short-hand for self.contribution
-
l¶ Angular momentum.
-
symbol¶ Formatted symbol of the contribution.
-
-
class
aimstools.bandstructures.mulliken_bandstructure.MullikenSpectrum(atoms: ase.atoms.Atoms = None, kpoints: numpy.ndarray = None, kpoint_axis: numpy.ndarray = None, eigenvalues: numpy.ndarray = None, occupations: numpy.ndarray = None, contributions: numpy.ndarray = None, label_coords: list = None, kpoint_labels: list = None, jumps: list = None, fermi_level: float = None, reference: str = None, shift: float = None, bandpath: str = None)[source]¶ Bases:
aimstools.bandstructures.utilities.BandSpectrumContainer class for eigenvalue spectrum and mulliken contributions.
Variables: contributions (MullikenContribution) – MullikenContribution.-
contributions¶
-
get_atom_contribution(index, l='tot')[source]¶ Returns
MullikenContributionof given atom index.Parameters: - index (int) – Index of atom.
- l (optional) – Angular momentum. Defaults to “tot”.
-
get_group_contribution(symbols, l='tot')[source]¶ Returns sum of
MullikenContributionof given list of species.
-
get_species_contribution(symbol, l='tot')[source]¶ Returns
MullikenContributionof given species symbol.Parameters: - symbol (str) – Species symbol, e.g., “C”.
- l (optional) – Angular momentum. Defaults to “tot”.
-