xnn.hybnn.models.byteff_export.ByteFFPolCellExport#

class xnn.hybnn.models.byteff_export.ByteFFPolCellExport(model)[source]#

Bases: Module

node_features_energy_charges of a bound ByteFF-Pol model with a cutoff: the per-atom energies (eV) of one periodic cell of the bound system, its charges, and no features. The neighbor list of the caller (within the cutoff) gives the pairs; the mesh follows the model’s rule for the cell of every call (or its fixed pme_grid).

Parameters:

model (ByteFFPol) – A bound model with a cutoff (all_pairs: false).

Raises:

ValueError – If the model is not bound, or takes every pair.

node_features_energy_charges(atomic_numbers, edge_index, edge_vec, pos, cell, pbc, total_charge, spin_multiplicity)[source]#

The features (N, 0), the per-atom energies (N,) in eV and the charges (N,) of one cell of the bound system, from the neighbor pairs edge_index with their vectors edge_vec.

Raises:

RuntimeError – If the atoms are not those of the bound system in its order, or the cell is not periodic along all three axes or narrower than twice the cutoff.

Parameters:
Return type:

Tuple[Tensor, Tensor, Tensor]