DefectConcentrations#

class DefectConcentrations(concentrations)[source]#

Bases: object

Class to store sets of defect concentrations (output of concentration calculations with DefectsAnalysis). List of SingleDefConc objects. Subscriptable like a list.

Parameters:

concentrations ((list)) – List of SingleDefConc objects.

Methods

append

as_dict

copy

filter_concentrations

Filter concentrations based on different criteria.

from_dict

get_element_total

Get total concentration of every element (summed also across different species)

select_concentrations

Select concentrations based on different criteria.

Attributes

elemental

Dictionary with element (or element vacancy) as keys and total element concentration as values.

elements

List of element (or vacancies) symbols.

names

List of names of all defect species

stable

Get concentrations of only stable charge states.

total

conc})

append(item)[source]#
as_dict()[source]#
copy()[source]#
property elemental#

Dictionary with element (or element vacancy) as keys and total element concentration as values.

property elements#

List of element (or vacancies) symbols.

filter_concentrations(inplace=False, mode='and', exclude=False, names=None, charges=None, indexes=None, function=None, **kwargs)[source]#

Filter concentrations based on different criteria.

Parameters:
  • inplace (bool) – If True update the current object, otherwise returns a new DefectConcentrations object. The default is False.

  • mode (str) – Selection mode. available are ‘and’,’or’. The default is ‘and’.

  • exclude (bool) – Exclude the entries matching the criteria. The default is False.

  • names (list) – Names of the defect.

  • charges (list) – Charges of the defect.

  • indexes (list) – Indexes of defect in the concentrations list.

  • function (function) – Specific funtion for more complex criteria. The function must take a SingleDefConc object as argument and return a bool.

  • **kwargs (dict) – Criteria for selection. They need to be attributes of SingleDefConc.

Returns:

output_concs – Filtered DefectConcentrations object.

Return type:

list

classmethod from_dict(d)[source]#
get_element_total(element, vacancy=False)[source]#

Get total concentration of every element (summed also across different species)

Parameters:
  • element (str) – Target element.

  • vacancy (bool) – Weather the target element is a vacancy. The default is False.

Returns:

eltot – Total concentration of target element.

Return type:

float

property names#

List of names of all defect species

select_concentrations(concentrations=None, mode='and', exclude=False, names=None, charges=None, indexes=None, function=None, **kwargs)[source]#

Select concentrations based on different criteria.

Parameters:
  • concentrations (list) – List of SingleDefConc to select from. If None self.concentrations is used. The default is None.

  • mode (str) – Selection mode. available are ‘and’,’or’. The default is ‘and’.

  • exclude (bool) – Exclude the entries matching the criteria. The default is False.

  • names (list) – Names of the defect.

  • charges (list) – Charges of the defect.

  • indexes (list) – Indexes of defect in the concentrations list.

  • function (function) – Specific funtion for more complex criteria. The function must take a SingleDefConc object as argument and return a bool.

  • **kwargs (dict) – Criteria for selection. They need to be attributes of SingleDefConc.

Returns:

output_concs – List of SingleDefConc objects.

Return type:

list

property stable#

Get concentrations of only stable charge states. List of SingleDefConc objects.

property total#

conc})

Type:

Get total concentrations for every defect specie. Format is a dict ({‘name’