uf3.representation.distances.get_distance_matrix¶
- get_distance_matrix(geom: ase.atoms.Atoms, supercell: Optional[ase.atoms.Atoms] = None) numpy.ndarray[source]¶
Get distance matrix from geometry and, optionally, supercell including atoms from adjacent images.
- Parameters
geom (ase.Atoms) – unit cell of interest.
supercell (ase.Atoms) – ase.Atoms output of get_supercell used to account for atoms in periodic images.
- Returns
- square (n x n) if supercell
is not provided, rectangular (n x m) otherwise, where n and m are the number of atoms in the geometry and its supercell, respectively.
- Return type
distance_matrix (np.ndarray)