indexing module

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

Layers for pair finding

class ExternalNeighbors(hard_dist_cutoff)[source]

Bases: _PairIndexer

module for ASE-like neighbors list fed into the graph

forward(coordinates, real_atoms, shifts, cell, pair_first, pair_second)[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 MolPairSummer(*args, **kwargs)[source]

Bases: Module

forward(pairfeatures, mol_index, n_molecules, pair_first)[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 PaddedNeighModule(*args, **kwargs)[source]

Bases: Module

forward(pair_first, pair_second, pair_coord, atom_array)[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 PairCacher(n_images=1)[source]

Bases: Module

forward(pair_first, pair_second, cell_offsets, offset_index, real_atoms, 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.

set_images(n_images)[source]
class PairDeIndexer(*args, **kwargs)[source]

Bases: Module

forward(features, molecule_index, atom_index, n_molecules, n_atoms_max, pair_first, pair_second)[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 PairReIndexer(*args, **kwargs)[source]

Bases: Module

forward(molatomatom_thing, molecule_index, atom_index, pair_first, pair_second)[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 PairUncacher(n_images=1)[source]

Bases: Module

forward(sparse, coordinates, cell, real_atoms, inv_real_atoms, n_atoms_max, n_molecules)[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.

set_images(n_images)[source]
padded_neighlist(pair_first, pair_second, pair_coord, atom_array)[source]

Convert from index list pair_first, pair_second to index list of jlist where jlist has shape (n_atoms, n_neigh_max). jlists consists of index of atom neighbors for each atom i, and is padded with values of -1.