DefectConcentrations#
- class DefectConcentrations(concentrations)[source]#
Bases:
objectClass 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
Filter concentrations based on different criteria.
Get total concentration of every element (summed also across different species)
Select concentrations based on different criteria.
Attributes
Dictionary with element (or element vacancy) as keys and total element concentration as values.
List of element (or vacancies) symbols.
List of names of all defect species
Get concentrations of only stable charge states.
conc})
- 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
- 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’