atlas.core.filtering package

Structure quality filters for database generation and MD processing.

Submodules

atlas.core.filtering.structure_filters module

Functions to filter structures based on various criteria.

atlas.core.filtering.structure_filters.apply_filter_duplicate_slabs(struct, tolerance: float, miller_index: tuple | list)

Detects duplicate slabs in a given structure.

Parameters:
  • atoms (ase.Atoms) – The slab structure.

  • miller_index (tuple, optional) – The miller index to identify layers along a direction, by default (0, 0, 1).

  • tolerance (float, optional) – The tolerance in angstroms for layer separation, by default 0.2.

Returns:

True if duplicate slabs are detected, False otherwise.

Return type:

bool

atlas.core.filtering.structure_filters.apply_filter_evaporation(struct, max_allowed_thickness: float) bool

Fast geometric check to see if a slab has artificially expanded or an atom has evaporated into the vacuum.

atlas.core.filtering.structure_filters.apply_filter_exploding_structures(dyn=None, struct=None, max_F: float = 25.0, max_V: float = 2.0, max_T: float = None, max_T_multiplier: float = 10, T_list: list[float] = None, remove_positive_E: bool = False) bool

Check if the given structure has an unrealistic structure (explosion).

atlas.core.filtering.structure_filters.apply_filter_exploding_structures_distances(dyn=None, struct=None, cutoffs_max_base: ndarray = None, cutoffs_min_base: ndarray = None, max_T: float = None, max_T_multiplier: float = 10, T_list: list[float] = None, remove_positive_E: bool = False) bool

Check if the given structure has an unrealistic structure (explosion).

atlas.core.filtering.structure_filters.apply_filter_layer_distance(struct: Atoms, max_layer_distance_ang: float) bool

Evaluates whether the layer distace is above max_layer_distance_ang.

Parameters:
  • struct (ase.Atoms) – structure to check.

  • max_layer_distance_ang (float) – Maximum distance between layers

Returns:

Returns True if the layer distace is above max_layer_distance_ang, False if otherwise.

Return type:

bool

atlas.core.filtering.structure_filters.apply_struct_filters_atl_db(structures, config_dict: dict)

Applies user-specified structure filters.

Parameters:
  • structures (list[ase_atoms] | InitialDatabase) – Database or list of structures to be filtered.

  • config_dict (dict) – Dictionary containing user-defined filter settings from TOML.

Returns:

Dictionary with filtered structure UUIDs and breakdown by phase, type, modification, and filter trigger. Keys: ‘filtered_uuids’, ‘by_phase’, ‘by_type’, ‘by_modification’, ‘by_filter’.

Return type:

dict

atlas.core.filtering.structure_filters.check_disconn_neighbors(conn_matr: array, coord_nums: array, min_coord: int = 3) bool

Check if there are disconnected atoms in the structure.

Uses the connectivity matrix and the coordination numbers to check if there are atoms with disconnected neighbors. This is done by checking if the coordination number of an atom is below a certain threshold and if any of its neighbors also have a coordination number below the threshold.

Parameters:
  • conn_matr (np.array) – Connectivity matrix as given by the ASE NeighborList.

  • coord_nums (np.array) – Array containing the coordination numbers of each atom.

  • min_coord (int, optional) – Threshold for the coordination number, by default 3.

Returns:

Whether there are disconnected atoms in the structure.

Return type:

bool

atlas.core.filtering.structure_filters.get_available_filters() dict

Dynamically gathers all module functions prefixed with apply_filter_.

Returns:

Dictionary mapping filter names to their function objects.

Return type:

dict

atlas.core.filtering.structure_filters.get_coord_nums(struct: Atoms, cov_rad_multiplier: float = 1.0) tuple

Get the connectivity matrix, check for disconnected atoms and get coord. numbers.

Parameters:

struct (Atoms) – Structure to check.

Returns:

Tuple containing the connectivity matrix, a boolean indicating if there are disconnected atoms and an array with the coordination numbers.

Return type:

tuple

atlas.core.filtering.structure_filters.get_max_layer_distance(struct: Atoms) float

Get the maximum distance between layers in a structure.

Module contents

Structure quality filters for database generation.