decomp_to_total
#
- mbgdml.mbe.decomp_to_total(E_nbody, F_nbody, entity_ids, entity_combs, use_ray=False, n_workers=1, ray_address='auto')[source]#
Sum decomposed \(n\)-body energies and forces for total \(n\)-body contribution.
This is a wrapper around
mbgdml.mbe.mbe_contrib()
.- Parameters:
E_nbody (
numpy.ndarray
, ndim:1
) – All \(n\)-body energies.numpy.nan
values are allowed for structures that were beyond the descriptor cutoff.F_nbody (
numpy.ndarray
, ndim:3
) – All \(n\)-body energies.numpy.nan
values are allowed for structures that were beyond the descriptor cutoff.entity_ids (
numpy.ndarray
, ndim:1
) – Integers specifying which atoms belong to which entities for the supersystem (not the \(n\)-body structure).entity_combs (
numpy.ndarray
, ndim:2
) – Structure indices and Entity IDs of all structures in increasing order of \(n\). Column 0 is the structure index and the remaining columns are entity IDs.use_ray (
bool
, default:False
) – Use ray to parallelize computations.n_workers (
int
, default:1
) – Total number of workers available for ray. This is ignored ifuse_ray
isFalse
.ray_address (
str
, default:"auto"
) – Ray cluster address to connect to.
- Returns:
:obj:`numpy.ndarray`, ndim – Total \(n\)-body energies.
- Return type:
1