deepmd.dpmodel.model.transform_output#

Functions#

fit_output_to_model_output(→ dict[str, numpy.ndarray])

Transform the output of the fitting network to

get_leading_dims(vv, vdef)

Get the dimensions of nf x nloc.

communicate_extended_output(→ dict[str, numpy.ndarray])

Transform the output of the model network defined on

Module Contents#

deepmd.dpmodel.model.transform_output.fit_output_to_model_output(fit_ret: dict[str, numpy.ndarray], fit_output_def: deepmd.dpmodel.output_def.FittingOutputDef, coord_ext: numpy.ndarray, do_atomic_virial: bool = False) dict[str, numpy.ndarray][source]#

Transform the output of the fitting network to the model output.

deepmd.dpmodel.model.transform_output.get_leading_dims(vv: numpy.ndarray, vdef: deepmd.dpmodel.output_def.OutputVariableDef)[source]#

Get the dimensions of nf x nloc.

Parameters:
vvnp.ndarray

The input array from which to compute the leading dimensions.

vdefOutputVariableDef

The output variable definition containing the shape to exclude from vv.

Returns:
list

A list of leading dimensions of vv, excluding the last len(vdef.shape) dimensions.

deepmd.dpmodel.model.transform_output.communicate_extended_output(model_ret: dict[str, numpy.ndarray], model_output_def: deepmd.dpmodel.output_def.ModelOutputDef, mapping: numpy.ndarray, do_atomic_virial: bool = False) dict[str, numpy.ndarray][source]#

Transform the output of the model network defined on local and ghost (extended) atoms to local atoms.