uf3.representation.distances.distances_by_interaction¶
- distances_by_interaction(geom: ase.atoms.Atoms, pair_tuples: List[Tuple[str]], r_min_map: Dict[Tuple[str], float], r_max_map: Dict[Tuple[str], float], supercell: Optional[ase.atoms.Atoms] = None, atomic: bool = False) Dict[Tuple[str], numpy.ndarray][source]¶
Identify pair distances within an entry (or between an entry and its supercell), subject to lower and upper bounds given by r_min_map and r_max_map, per pair interaction e.g. A-A, A-B, B-B, etc.
- Parameters
geom (ase.Atoms) – configuration of interest.
pair_tuples (list) – list of pair interactions e.g. [(A-A), (A-B), (A-C), (B-B), …)]
r_min_map (dict) – map of minimum pair distance per interaction e.g. {(A-A): 2.0, (A-B): 3.0, (B-B): 4.0}
r_max_map (dict) – map of maximum pair distance per interaction
supercell (ase.Atoms) – ase.Atoms output of get_supercell used to account for atoms in periodic images.
atomic (bool) – whether to split array into lists of vectors corresponding to each atom’s atomic environment.
- Returns
- for each interaction key (A-A, A-B, …),
flattened np.ndarray of pair distances within range or list of flattened np.ndarray if atomic is True.
- Return type
distances_map (dict)