uf3.representation.distances.mask_matrix_by_pair_interaction¶
- mask_matrix_by_pair_interaction(pair: Union[List, Tuple], geo_composition: numpy.ndarray, sup_composition: Optional[numpy.ndarray] = None) numpy.ndarray[source]¶
- Generates boolean mask for the distance matrix based on composition
vectors i.e. from ase.Atoms.get_atomic_numbers()
- e.g. identifying A-B interactions:
supercell
- geometry A | - X - - X X
B | X - X X - -
- Parameters
pair (tuple) – pair interaction of interest e.g. (A-B)
geo_composition (list, np.ndarray) – list of elements for each atom in geometry.
sup_composition (list, np.ndarray) – optional list of elements for each atom in supercell.
- Returns
- Boolean mask of dimension (n x m)
corresponding to pair interactions of the specified type, where n and m are the number of atoms in the geometry and its supercell, respectively.
- Return type
comp_mask (np.ndarray)