xnn.ffnn.models.amoeba_valence.ValenceTable#

class xnn.ffnn.models.amoeba_valence.ValenceTable(n_atoms, kinds, scalars, inplane, allinger, nmax, slots)[source]#

Bases: object

What the valence kernels read for the terms of a step plan: per kind, the count, the first row of every vector the kind uses in the plan’s stacked bonded vectors, the atom (or atoms) its energy goes to and its parameters, plus the float64 constants and the switches of the forms.

Parameters:
  • n_atoms (int) – Atoms of the batch.

  • kinds (dict) – Per kind ("bond", "angle", "strbnd", "urey", "opbend", "torsion") a tuple of its count, its first rows and its tensors, in the order of the kernel’s arguments.

  • scalars (Tensor) – The float64 constants, in the order of SCALARS.

  • inplane (bool) – Whether in-plane angles occur and whether the out-of-plane bends take Allinger’s angle.

  • allinger (bool) – Whether in-plane angles occur and whether the out-of-plane bends take Allinger’s angle.

  • nmax (int) – The largest torsion multiplicity and the number of a torsion’s harmonic slots.

  • slots (int) – The largest torsion multiplicity and the number of a torsion’s harmonic slots.

unit(like)[source]#

Unit weights of every row (8, N) in the dtype and on the device of like, kept.

Parameters:

like (Tensor)

Return type:

Tensor