xnn.common.models.dispersion.evaluate_on_graph#

xnn.common.models.dispersion.evaluate_on_graph(term, data)[source]#

Run a dispersion term’s evaluate on a (batched) AtomicGraph.

Fills in an all-zero cell / periodicity for molecular batches, reads data.total_charge when present (zeros otherwise) and adds "energy" (B,) to the keys the term returns.

Parameters:
Returns:

The term’s outputs plus "energy".

Return type:

dict of str to Tensor