irradiapy.analysis.defectsidentifier module
This module provides a class to find and analyze defects in crystalline structures.
- class irradiapy.analysis.defectsidentifier.DefectsIdentifier(lattice, a0, debug=False, _DefectsIdentifier__sub_count=2)[source]
Bases:
objectClass to identify defects in crystalline structures.
This class provides methods to identify point defects (vacancies and interstitials) in a body-centered cubic (bcc) lattice based on atomic positions from simulation data. It supports optional rescaling and recentering of defect positions, and can align the system with a specified primary knock-on atom (PKA) direction.
- Parameters:
- identify(data_atoms, a1=None, pos_pka=None, theta_pka=None, phi_pka=None, transform=False)[source]
Identify defects in the crystalline structure based on atomic positions.
- Parameters:
data_atoms (
dict[str,Any]) – Dictionary containing simulation data as given by the LAMMPSReader and similar readers. Must include keys: ‘atoms’, ‘boundary’, ‘xlo’, ‘xhi’, ‘ylo’, ‘yhi’, ‘zlo’, ‘zhi’, ‘timestep’.a1 (
float|None) – Final lattice parameter. If provided, defect positions are rescaled to this value (independently of the transform value).pos_pka (
GenericAlias[double] |None) – Position vector of the PKA. If provided with theta_pka and phi_pka, defects are recentered and aligned.theta_pka (
float|None) – Polar angle (in radians) for the PKA direction.phi_pka (
float|None) – Azimuthal angle (in radians) for the PKA direction.transform (
bool) – If True, defects are recentered and aligned with the PKA direction (if provided). If True but no PKA parameters are provided, defects are recentered based on their average position. Note that the box boundaries are not modified for visualization purposes, only the atomic positions are transformed.
- Returns:
data_defects – Dictionary containing the defects found in the structure. Keys are the same as in data_atoms, but the ‘atoms’ key contains only defects.
- Return type: