virial_atom_loop
#
- mbgdml.stress.virial_atom_loop(R, F)[source]#
Sums the outer tensor products for all atoms:
\[\sum_i \mathbf{r}_{i} \otimes \mathbf{F}_{i}.\]- Parameters:
R (
numpy.ndarray
, ndim:2
) – Cartesian coordinates of all atoms to loop over.F (
numpy.ndarray
, ndim:2
) – Forces to use for outer tensor product.
- Returns:
(shape:
(3, 3)
) - Virial contribution.- Return type: