open module

Full Documentation for hippynn.layers.pairs.open module. Click here for a summary page.

class OpenPairIndexer(hard_dist_cutoff)[source]

Bases: _PairIndexer

forward(coordinates, nonblank, real_atoms, inv_real_atoms)[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.

class PairMemory(skin, dist_hard_max=None, hard_dist_cutoff=None)[source]

Bases: Module

Stores current pair indices and reuses them to compute the pair distances if no particle has moved more than skin/2 since last pair calculation. Otherwise uses the _pair_indexer_class to recompute the pairs.

Increasing the value of ‘skin’ will increase the number of pair distances computed at each step, but decrease the number of times new pairs must be computed. Skin should be set to zero while training for fastest results.

forward(**kwargs)[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.

initialize_buffers()[source]
recalculation_needed(coordinates, cells)[source]
reset_reuse_percentage()[source]
set_skin(skin)[source]
property reuse_percentage

Returns None if there are no model calls on record.

property skin