xnn.common.models.dispersion.evaluate_on_graph#
- xnn.common.models.dispersion.evaluate_on_graph(term, data)[source]#
Run a dispersion term’s
evaluateon a (batched)AtomicGraph.Fills in an all-zero cell / periodicity for molecular batches, reads
data.total_chargewhen present (zeros otherwise) and adds"energy"(B,)to the keys the term returns.- Parameters:
term (torch.nn.Module) –
DFTD3orDFTD4.data (AtomicGraph) – The batched graph (built with the term’s cutoff).
- Returns:
The term’s outputs plus
"energy".- Return type:
dict of str to Tensor