xnn.common.train.reactions#
Reaction-energy loss: errors of energy differences between structures.
A reaction energy is dE_r = sum_s nu_rs E_s over the species s with signed stoichiometric coefficients
nu_rs. ReactionSet holds the species, the coefficients, the reference reaction energies and two
per-reaction factors: a scale that multiplies the error (scale = 56.84 / <|dE|> of each set gives the
weighting of WTMAD-2) and a weight of the mean. reaction_energy_loss() is the weighted mean of the
squared (or Huber) scaled errors. ReactionSet.batches() draws mini-batches of reactions with the species
they need, and Trainer adds the term to its loss (optim.reaction_weight).
Functions
|
Reaction energies |
|
The weighted mean of the squared errors of reaction energies. |
Classes
|
Reactions over a list of species structures. |