irradiapy package

Subpackages

Submodules

irradiapy.config module

Module for configuration variables.

irradiapy.config.DIR_SRIM = PosixPath('SRIM-2013')

TRIM.exe directory (parent folder)

Type:

pathlib.Path

irradiapy.config.ENCODING = 'utf-8'

Encoding for text files.

Type:

str

irradiapy.config.EXCLUDED_ITEMS = ['xs', 'ys', 'zs']

List of atom fields to exclude from output in LAMMPS files.

Type:

list[str]

irradiapy.config.FLOAT_FORMAT = '%g'

Format for floats in output files.

Type:

str

irradiapy.config.INT_FORMAT = '%d'

Format for integers in output files.

Type:

str

irradiapy.config.use_style(latex=False)[source]

Set the style for matplotlib plots.

It uses the colour universal design (CUD) palette for colour-blind friendly plots.

Parameters:

latex (bool, optional (default=False)) – If True, use LaTeX for text rendering in plots (slower). I might require other software to be installed on your system.

Return type:

None

irradiapy.damagedb module

This module contains the DamageDB class.

class irradiapy.damagedb.DamageDB(dir_mddb, compute_tdam, mat_pka, mat_target, dpa_mode, tdam_mode, energy_tolerance=0.1, seed=0)[source]

Bases: object

Class used to reconstruct the damage produced by a PKA from a database of MD debris.

dir_mddb

Directory of the MD debris database.

Type:

Path

compute_tdam

Whether to apply Lindhard’s formula to the recoil energy. It should be True for MD simulations without electronic stopping.

Type:

bool

mat_pka

PKA material.

Type:

materials.Material

mat_target

Target material.

Type:

materials.Material

dpa_mode

Mode for dpa calculation.

Type:

materials.Material.DpaMode

tdam_mode

Mode for PKA to damage energy calculation.

Type:

materials.Material.TdamMode

energy_tolerance

Tolerance for energy decomposition. For example, if this value if 0.1, the PKA energy is 194 keV and the database contains an energy of 200 keV, then 194 will be in the range 200 +/- 20 keV, therefore a cascade of 200 keV will be used, instead of decomposing 194 keV into, for example, 100x1 + 50x1 + 20x2 + 3x1 + 1xFP (Frenkel pairs). This fixes biases towards smaller clusters (lower energies) and helps reducing cascade overlapping. Set to 0.0 to disable this feature.

Type:

float (default=0.1)

seed

Random seed for random number generator.

Type:

int, optional (default=0)

compute_tdam: bool
dir_mddb: Path
dpa_mode: DpaMode
energy_tolerance: float = 0.1
get_pka_debris(pka_e, pka_pos, pka_dir)[source]

Get PKA debris from its energy position, and direction.

Parameters:
  • pka_e (float) – PKA energy.

  • pka_pos (npt.NDArray[np.float64]) – PKA position.

  • pka_dir (npt.NDArray[np.float64]) – PKA direction.

Return type:

ndarray[tuple[Any, ...], dtype[Any]]

Returns:

  • dtypes.Defect – Defects after the cascades.

mat_pka: Material
mat_target: Material
seed: int = 0
tdam_mode: TdamMode

irradiapy.dtypes module

Numpy structured array dtypes.

Module contents

irradiapy package