xnn.krnn.featurizers.inverse_distance.InverseDistances#
- class xnn.krnn.featurizers.inverse_distance.InverseDistances(n_atoms)[source]#
Bases:
ModuleInverse interatomic distances
1 / |r_a - r_b|of all pairsa > b.The pairs are ordered row by row through the strictly lower triangle of the distance matrix:
(1, 0), (2, 0), (2, 1), (3, 0), .... In a periodic cell every pair takes its minimum image.- Parameters:
n_atoms (int) – Number of atoms of the molecule.
- differences(pos, cell=None)[source]#
(B, D, 3)vectorsr_a - r_bof every pair (minimum images in a cell).
- forward(pos, cell=None)[source]#
(B, D)descriptors of(B, N, 3)positions (and(B, 3, 3)cells, rows as vectors).
- pair_gradients(pos, cell=None)[source]#
(B, D, 3)derivativesu = d (1 / r_ab) / d r_a(the derivative byr_bis-u).They are the only nonzero blocks of the Jacobian: row
dof it isu_don atoma_dand-u_don atomb_d.