irradiapy.lammps.cascadebase module
Base class for running LAMMPS simulations of collisional cascades.
- class irradiapy.lammps.cascadebase.CascadeBase(*, comm=<factory>, dir_parent, nsims, cmds_preamble, cmds_therma=None, atomic_symbols, cmds_cascade=None, cmds_rerun=None, seed=1, finalize=True, skip=<factory>, uttm_nxyz=None, uttm_extent=None)[source]
Bases:
ABCBase class for running LAMMPS simulations of collisional cascades. Not to be used directly.
Warning
In order to use child classes: - Do not use “write_data” or “write_restart”, these are created automatically. - Include in the “thermo” output: step, dt, time. - In the dump command, place only the file name, the path will be added automatically.
- Parameters:
comm (
Comm) – The MPI communicator.dir_parent (
Path) – The parent directory for the simulation.nsims (
int) – The number of simulations to run.cmds_preamble (
list[Command]) – The preamble commands to run before the simulation. These commands are run before any thermalisation, run, and rerun.cmds_therma (
list[Command] |None) – The commands to run for the thermalization step.cmds_cascade (
list[Command] |None) – The commands to run for the cascade step.cmds_rerun (
list[Command] |None) – The commands to run for the rerun step.atomic_symbols (
list[str]) – The atomic symbols of the atoms in the simulation in the same order as the atom types in LAMMPS.seed (
int) – The random seed for the simulation.finalize (
bool) – If True, after all simulations, the LAMMPS instance is finalized.skip (
str|list[int]) – A string of comma-separated integers and ranges to skip simulations. For example, “1, 2, 3-5, 7-9” will skip simulations 1, 2, 3, 4, 5, 7, 8, and 9.uttm_c (float (default=None)) – Only for UTTM calculations. The UTTM electron heat capacity in eV/K.
uttm_k (float (default=None)) – Only for UTTM calculations. The UTTM electron thermal conductivity in W/(m*K).
uttm_temperature (float (default=None)) – Only for UTTM calculations. The UTTM electron temperature in K.
uttm_nxyz (
tuple[int,int,int] |None) – Only for UTTM calculations. The number of grid voxels in the x, y, and z directions.uttm_extent (
tuple[float,float,float,float,float,float] |None) – Only for UTTM calculations. The extent of the grid in the x, y, and z directions.
- comm: Comm
- get_pkas_properties()[source]
Returns the properties of the PKAs from a set of LAMMPS log files.
- Yields:
dict[str, int | float | np.ndarray] – The PKA properties.