irradiapy.lammps.utils module

Utilities for interacting with a LAMMPS instance.

exception irradiapy.lammps.utils.LAMMPSUnavailableError[source]

Bases: ImportError

Raised when the external LAMMPS Python module is unavailable.

irradiapy.lammps.utils.get_properties_from_group(lmp, group, properties)[source]

Return the requested properties of a group of atoms.

Parameters:
  • lmp (Any) – A LAMMPS instance.

  • group (str) – The name of the group.

  • properties (list[str]) – The properties to extract.

Returns:

The properties of the atoms in the group.

Return type:

dict[str, ndarray]

irradiapy.lammps.utils.load_lammps_class()[source]

Return the external lammps.lammps class.

The import is intentionally deferred until LAMMPS-backed functionality is called so that the rest of irradiapy remains usable without LAMMPS.

Return type:

type[Any]