DefectComplex#

class DefectComplex(defects, bulk_structure=None, charge=None, multiplicity=None, bulk_volume=None, label=None)[source]#

Bases: MSONable

Class to describe defect complexes

Parameters:
  • defects (list) – List of Defect objects.

  • bulk_structure (Structure) – Pymatgen Structure of the bulk material.

  • charge (int or float) – Charge of the defect.

  • multiplicity (int) – Multiplicity of the defect.

Methods

as_dict

A JSON serializable dict representation of an object.

from_dict

Reconstruct an MSONable object from a dict.

from_string

Get DefectComplex object from string.

generate_defect_structure

Generate a structure containing the defect starting from a bulk structure.

get_multiplicity

load

Load an instance from a JSON file written by save().

save

Serialize the instance to JSON on disk, pickling fields if needed.

set_charge

Sets the charge of the defect.

set_label

Sets the label of the defect

set_multiplicity

Sets the charge of the defect.

to_json

Returns a json string representation of the MSONable object.

unsafe_hash

Return a hash of the current object.

validate_monty_v1

Pydantic validator with correct signature for pydantic v1.x.

validate_monty_v2

Pydantic validator with correct signature for pydantic v2.x.

Attributes

REDIRECT

bulk_structure

Structure without defects.

bulk_volume

Volume of bulk cell in A°^3.

charge

Charge of the defect.

defect_composition

Composition of defect structure.

defect_names

List of names of the single defects.

defect_structure

Structure containing the defect.

defects

List of single defects consituting the complex.

delta_atoms

Dictionary with Element as keys and particle difference between defect structure and bulk structure as values.

label

Defect label.

multiplicity

Multiplicity of a defect site within the structure

name

Name of the defect.

site_concentration_in_cm3

Site concentration (multiplicity/volume) expressed in cm^-3.

sites

Site objects of single defects.

symbol

Latex formatted name of the defect.

symbol_with_charge

Name in latex format with charge written as a number.

symbol_with_charge_kv

Name in latex format with charge written with kroger and vink notation.

type

Defect type.

property bulk_structure#

Structure without defects.

property bulk_volume#

Volume of bulk cell in A°^3.

property charge#

Charge of the defect.

property defect_composition#

Composition of defect structure.

property defect_names#

List of names of the single defects.

property defect_structure#

Structure containing the defect.

property defects#

List of single defects consituting the complex.

property delta_atoms#

Dictionary with Element as keys and particle difference between defect structure and bulk structure as values.

static from_string(string, **kwargs)[source]#

Get DefectComplex object from string.

generate_defect_structure(bulk_structure=None)[source]#

Generate a structure containing the defect starting from a bulk structure. If not provided self.bulk_structure is used.

get_multiplicity()[source]#
property label#

Defect label.

property multiplicity#

Multiplicity of a defect site within the structure

property name#

Name of the defect. Behaves like a string with additional attributes.

set_charge(new_charge)[source]#

Sets the charge of the defect.

set_label(new_label)[source]#

Sets the label of the defect

set_multiplicity(new_multiplicity)[source]#

Sets the charge of the defect.

property site_concentration_in_cm3#

Site concentration (multiplicity/volume) expressed in cm^-3.

property sites#

Site objects of single defects.

property symbol#

Latex formatted name of the defect.

property symbol_with_charge#

Name in latex format with charge written as a number.

property symbol_with_charge_kv#

Name in latex format with charge written with kroger and vink notation.

property type#

Defect type.