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, 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

seed

Random seed for random number generator.

Type:

int, optional (default=0)

compute_tdam: bool
dir_mddb: Path
dpa_mode: DpaMode
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