gpytorchwrapper.src.utils.permutational_invariance
Functions
|
|
|
|
|
|
|
|
|
- gpytorchwrapper.src.utils.permutational_invariance.generate_ard_expansion(distance_idx: list[list[int]], idx_inv_atoms: list[list[int]]) list [source]
- gpytorchwrapper.src.utils.permutational_invariance.generate_dist_permutations(distance_idx: list[list[int]], idx_inv_atoms: list[list[int]]) Tensor [source]
- gpytorchwrapper.src.utils.permutational_invariance.generate_interatomic_distance_indices(num_atoms: int) list[list[int]] [source]
- gpytorchwrapper.src.utils.permutational_invariance.generate_permutations(idx_equiv_atoms: list[list[int]]) Tensor [source]
- Parameters:
idx_equiv_atoms (list[list[int]]) – List containing lists of indices for equivalent atoms
- Returns:
Tensor of all possible permutations
- Return type:
torch.Tensor
Example
For the reaction between N2 and H3+, the nitrogen atoms have indices 0 and 1, while the hydrogen atoms have indices 2, 3, and 4.
The idx_equiv_atoms list should look like [[0,1],[2,3,4]] or [[1,2]].
- gpytorchwrapper.src.utils.permutational_invariance.generate_unique_distances(num_atoms: int, idx_equiv_atoms: list[list[int]]) int [source]
- Parameters:
num_atoms (int) – The total number of atoms in the system
idx_equiv_atoms (list[list[int]]) – List of lists representing the groups of permutationally invariant atoms
- Returns:
num_unique_dist – The number of unique distances in the system taking into account permutational invariance
- Return type:
int
Examples
The H2O system contains two permutationally invariant hydrogen atoms H1 and H2. The energy is invariant to the permutation of the distances O-H1 and O-H2. Therefore there are 2 unique distances in the system: O-H and H-H.
- The general formula is,
unique distances = n(n-1)/2 + k,
where n is the number of atom groups and k is the number of groups containing more than a single atom.