dispatch module
Full Documentation for hippynn.layers.pairs.dispatch
module.
Click here for a summary page.
System-by-system pair finders
- class KDTreeNeighbors(dist_hard_max)[source]
Bases:
_DispatchNeighbors
Node for finding pairs under periodic boundary conditions using Scipy’s KD Tree algorithm. Cell must be orthorhombic.
- class KDTreePairsMemory(skin, dist_hard_max=None, hard_dist_cutoff=None)[source]
Bases:
PairMemory
Implementation of KDTreePairs with an added 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, mol_index, n_molecules, n_atoms_max)[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.