xnn.ffnn.models.amoeba_kernels.pairs_param_grad#

xnn.ffnn.models.amoeba_kernels.pairs_param_grad(i_, k_, r_vec, scales, keep, keep_d, per, q, d, Q, params, scalars, polar, expol, switch_modes, g_node, g_field_d=None, g_field_p=None, g_du=None, g_expol=None, count=None, mixed=False, select=None, tangents=None)[source]#

The gradient (N, NP) of sum(g_node * e_node) + sum(g_field_d * field_d) + ... (the outputs of pairs_forward()) with respect to the per-atom parameter table, from the generated adjoint of the forward kernel (amoeba_tangents); the inputs are those of pairs_backward(). With tangents (of the pair vectors and multipoles) it returns the gradient and its derivative along them (the parameter part of a force loss’s gradient).

Parameters: