indexers module
Full Documentation for hippynn.layers.indexers module.
Click here for a summary page.
Layers for encoding, decoding, index states, besides pairs
- class AtomDeIndexer(*args, **kwargs)[source]
Bases:
Module- forward(features, mol_index, atom_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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class AtomReIndexer(*args, **kwargs)[source]
Bases:
Module- forward(molatom_thing, 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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class CellScaleInducer(*args, **kwargs)[source]
Bases:
Module- forward(coordinates, cell)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class FilterBondsOneway(*args, **kwargs)[source]
Bases:
Module- forward(bonds, 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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class FuzzyHistogram(length, vmin, vmax)[source]
Bases:
ModuleTransforms a scalar feature into a vectorized feature via the fuzzy/soft histogram method.
- Parameters:
length – length of vectorized feature
:returns FuzzyHistogram
- forward(values)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class MolSummer(*args, **kwargs)[source]
Bases:
ModuleMolecule Summer
- Description:
This sums (flatatom) things into (mol) things. It actually works similarly to the interaction layer
- forward(features, mol_index, 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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class OneHotSpecies(species_set)[source]
Bases:
ModuleEncodes species as one-hot map using species_set :param species_set iterable of species types. Typically this will be the Z-value of the elemeent. Note: 0 denotes a ‘blank atom’ used only for padding purposes
:returns OneHotSpecies
- class PaddingIndexer(*args, **kwargs)[source]
Bases:
ModuleHipnn’s indexer
- Description:
This indexer allows us to go from rectangular (mol,atom) representations To (flatatom) representations and a corresponding molecule index for those atoms. The ‘real_index’ allows us to take _values_ from a flattened rectangular representation (mol*atom) And select only the real ones. The ‘inv_real_index’, when indexed, converts a (mol*atom) index set into a (flatatom) index set
- class QuadPack[source]
Bases:
ModuleConverts quadrupoles flattened form to packed triangular, assumes symmmetric. Packed form: (molecule) XX, YY, ZZ, XY, XZ, YZ Index 0, 4, 8, 1, 2, 5 Unpacked form: (molecule) XX, XY, XZ, YX, YY, YZ , ZX, ZY, ZZ Index 00 01 02, 10, 11, 12, 20, 21, 22
- forward(quadrupoles)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class QuadUnpack[source]
Bases:
ModuleConverts quadrupoles from packed triangular form to flattened molecule form. Packed form: (molecule) XX, YY, ZZ, XY, XZ, YZ Index 0, 1, 2, 3, 4, 5 Unpacked form: (molecule) XX, XY, XZ, YX, YY, YZ , ZX, ZY, ZZ Index 0, 3, 4, 3, 1, 5, 4, 5, 2
- forward(packed_quadrupoles)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class SysMaxOfAtoms(*args, **kwargs)[source]
Bases:
ModuleTake maximum over atom dimension.
- forward(features, mol_index, 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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.