periodic module

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

class PeriodicPairIndexer(hard_dist_cutoff)[source]

Bases: _PairIndexer

Finds pairs in general periodic conditions.

forward(coordinates, nonblank, real_atoms, inv_real_atoms, cells)[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 PeriodicPairIndexerMemory(skin, dist_hard_max=None, hard_dist_cutoff=None)[source]

Bases: PairMemory

Implementation of PeriodicPairIndexer with additional memory component.

Stores current pair indices in memory 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(coordinates, nonblank, real_atoms, inv_real_atoms, cells)[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 StaticImagePeriodicPairIndexer(*args, n_images=1, **kwargs)[source]

Bases: _PairIndexer

Finds Pairs within a given number of images

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

filter_pairs(cutoff, distflat, *addn_features)[source]