xnn.gnn.models.gemnet.GemNetPlanner#

class xnn.gnn.models.gemnet.GemNetPlanner(emb_cutoff, int_cutoff, quadruplets)[source]#

Bases: object

The index plan of a batch (index_plan()), built outside the model step for a captured training step (xnn.common.train.graphed).

A data-loader worker builds it on the CPU and pads it to fixed counts: the padding entries all refer to the first padding edge (an edge between padding atoms) and to the first padding entry of each list, so they form finite, inert geometry. The neighbor-slot widths kmax3 / kmax4 of the reference bilinear layers are maxima over single edges, not sums (maxima).

Parameters:
  • emb_cutoff (float) – The model’s embedding and interaction cutoffs.

  • int_cutoff (float) – The model’s embedding and interaction cutoffs.

  • quadruplets (bool) – Whether the model has quadruplet interactions.

maxima = ('kmax3', 'kmax4')#

The sizes that a batch takes as a maximum over its structures.

offsets = {'emb_ids': 'edges', 'int_ids': 'edges', 'intm_db': 'emb_edges', 'intm_q': 'int_edges', 'q_intm': 'intm', 'q_k': None, 'q_out': 'emb_edges', 'quad_q': 'int_edges', 'rev': 'emb_edges', 't_in': 'emb_edges', 't_k': None, 't_out': 'emb_edges'}#

The count each plan entry indexes (for batching the plans of single structures); None: a slot within its group.

sizes(plan)[source]#

The counts a padded batch fixes.

Parameters:

plan (Dict[str, Tensor])

Return type:

Dict[str, int]

pad(plan, sizes, dummy_edge)[source]#

plan filled up to sizes with entries of the padding edge dummy_edge.

Parameters:
Return type:

Dict[str, Tensor]