torchani.sae#

Simple module that calculates a “1-body atomic potential”

You can use torchani.sae.SelfEnergy to add a values to all atoms according to their atomic numbers (typically these values will be ground state atomic energies, or GSAEs.

Classes

SelfEnergy

Adds constant atomic energies that depend only on the atom types

class torchani.sae.SelfEnergy(symbols, self_energies)[source]#

Adds constant atomic energies that depend only on the atom types

Parameters:
  • symbols (Sequence[str]) – A tuple or list of strings that are valid chemical symbols. (case sensitive).

  • self_energies (Tensor) – Ordered sequence of floats corresponding to the self energy of each element. Energies must be be in order: self_energies[i] corresponds to element symbols[i].

classmethod with_gsaes(symbols, functional, basis_set)[source]#

Instantiate SelfEnergy with ground state atomic energies

forward(elem_idxs, atomic=False)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.