SingleDipoleTarget
- model openff.nagl.training.loss.SingleDipoleTarget[source]
A target that is evaluated on the dipole of a molecule.
- field charge_label: str [Required]
- field conformation_column: str [Required]
- evaluate_target(molecules: DGLMolecule | DGLMoleculeBatch, labels: Dict[str, Tensor], predictions: Dict[str, Tensor], readout_modules: Dict[str, ReadoutModule]) Tensor [source]
Evaluate the target property for a molecule or batch of molecules. This does not need to account for the denominator and weight, which will be factored in
evaluate
.- Parameters:
molecules (
DGLMolecule
orDGLMoleculeBatch
) – The molecule(s) to evaluate the target for.labels (
Dict[str
,torch.Tensor]
) – The labels for the molecule(s). If molecules is a batch, the values of these will be contiguous arrays, which should be split for molecular-based errorspredictions (
Dict[str
,torch.Tensor]
) – The predictions for the molecule(s). If molecules is a batch, the values of these will be contiguous arrays, which should be split for molecular-based errors
- Returns:
torch.Tensor
– The loss for the molecule(s).