uf3.representation.distances.derivatives_by_interaction¶
- derivatives_by_interaction(geom: ase.atoms.Atoms, pair_tuples: List[Tuple[str]], r_cut: float, r_min_map: Dict[Tuple[str], float], r_max_map: Dict[Tuple[str], float], supercell: Optional[ase.atoms.Atoms] = None) Tuple[Dict, Dict][source]¶
Identify pair distances within a supercell and derivatives for evaluating forces, 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) – unit cell ase.Atoms.
pair_tuples (list) – list of pair interactions. e.g. [(A-A), (A-B), (A-C), (B-B), …)]
r_cut (float) – cutoff radius (angstroms).
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.
- Returns
- flattened np.ndarray of pair distances across supercell
within range.
- drij_dR: np.ndarray of shape (n_atoms, 3, n_distances)
and the second dimension corresponds to x, y, and z directions. Used to evaluate forces.
- Return type
distances