indexers module
Full Documentation for hippynn.graphs.nodes.indexers module.
Click here for a summary page.
Nodes for indexing information.
- class AtomDeIndexer(name, parents, module='auto', **kwargs)[source]
 Bases:
ExpandParents,AutoNoKw,SingleNodeNode for converting Atom->SysAtom
Note
This node has parent expansion, following these procedures.
If matching (Node), then apply expand0
If matching (Node, Node), then apply expand0
Asserts that the number of parents is 5
- auto_module_class
 alias of
AtomDeIndexer
- expand0(features, system_index, atom_index, n_mol, n_atom, **kwargs)[source]
 Used for creation from parents with signature (Node, Node)
- parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
 
- class AtomReIndexer(name, parents, module='auto', **kwargs)[source]
 Bases:
ExpandParents,AutoNoKw,SingleNodeNode for re-using index information to convert SysAtom->Atom.
Note
This node has parent expansion, following these procedures.
If matching (SingleNode), then apply expand0
If matching (SingleNode, PaddingIndexer), then apply expand1
Asserts that the number of parents is 2
- auto_module_class
 alias of
AtomReIndexer
- expand0(features, *, purpose, **kwargs)[source]
 Used for creation from parents with signature (SingleNode)
- expand1(features, pad_idx, **kwargs)[source]
 Used for creation from parents with signature (SingleNode, PaddingIndexer)
- parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
 
- class FilterBondsOneway(name, parents, module='auto', **kwargs)[source]
 Bases:
AutoNoKw,SingleNodeNode which filters the set of pairs to a one-way list.
- auto_module_class
 alias of
FilterBondsOneway
- input_names = ('input_bonds', 'pair_first', 'pair_second')
 
- class FuzzyHistogrammer(name, parents, length, vmin, vmax, module='auto', **kwargs)[source]
 Bases:
AutoKw,SingleNodeNode for transforming a scalar feature into a vectorized feature via the fuzzy/soft histogram method.
- Parameters:
 length – length of vectorized feature
- auto_module_class
 alias of
FuzzyHistogram
- auto_module_kwargs: Tuple[str] | Dict[str, str] | None = ('length', 'vmin', 'vmax')
 
- input_names = 'values'
 
- class OneHotEncoder(name, parents, species_set, module='auto', **kwargs)[source]
 Bases:
AutoKw,Encoder,MultiNodeNode for encoding species as one-hot vectors
- auto_module_class
 alias of
OneHotSpecies
- auto_module_kwargs: Tuple[str] | Dict[str, str] | None = ('species_set',)
 
- output_index_states = (<IdxType.SysAtom>, <IdxType.SysAtom>)
 
- output_names = ('encoding', 'nonblank')
 
- class PaddingIndexer(name, parents, *args, **kwargs)[source]
 Bases:
AtomIndexer,AutoNoKw,ExpandParents,MultiNode,_DeprecatedNamesMixinNode for building information to convert from SysAtom to Atom index state.
Note
This node has parent expansion, following these procedures.
If matching (Encoder), then apply expand0
Asserts that the number of parents is 2
- auto_module_class
 alias of
PaddingIndexer
- input_names = ('encoding', 'nonblank')
 
- output_index_states = (<IdxType.Atoms>, None, None, None, None, None, None)
 
- output_names = ('indexed_features', 'real_atoms', 'inv_real_atoms', 'system_index', 'atom_index', 'n_systems', 'n_atoms_max')
 
- parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
 
- class QuadUnpackNode(name, parents, module='auto', **kwargs)[source]
 Bases:
AutoNoKw,SingleNode- auto_module_class
 alias of
QuadUnpack
- class SpeciesIndexer(name, parents, *args, module='auto', species_set=None, **kwargs)[source]
 Bases:
AutoNoKw,SingleNode,ExpandParentsSeparate an atom-wise tensor into sub-tensors for each species.
Note
This node has parent expansion, following these procedures.
If matching (Node, Node), then apply expansion0
If matching (Node), then apply expansion1
Asserts that the number of parents is 2
Gets main_output of nodes: casts MultiNodes to their main output
Transforms the parents to have index states (<IdxType.Atoms>, <IdxType.Atoms>)
- auto_module_class
 alias of
SpeciesIndexer
- expansion0(node_to_index, hint_node, **kwargs)[source]
 For loss-graph quantities, we may need the information about /which/ species to use.
Used for creation from parents with signature (Node, Node)
- expansion1(node_to_index, species_set, **kwargs)[source]
 find onehot encoding.
Used for creation from parents with signature (Node)
- input_names = ('input_values', 'onehot_encoding')
 
- parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
 
- class SysMaxOfAtomsNode(name, parents, module='auto', **kwargs)[source]
 Bases:
ExpandParents,AutoNoKw,SingleNode- auto_module_class
 alias of
SysMaxOfAtoms
- expansion0(node, *, purpose, **kwargs)[source]
 Used for creation from parents with signature (Node)
- expansion1(node, pidxer, *, purpose, **kwargs)[source]
 Used for creation from parents with signature (Node, AtomIndexer)
- input_names = ('var', 'system_index', 'n_systems')
 
- parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
 
- acquire_encoding_padding(search_nodes, species_set, purpose=None)[source]
 Automatically finds/builds a one-hot encoder and padding indexer starting from
search_nodes.If the encoder and padder exist as relatives of the search nodes.
- Parameters:
 search_nodes – Node or nodes to start from.
species_set – Species set to use if an encoder needs to be created.
purpose – String for error information if the process fails. (optional)
- Returns:
 encoder, padding indexer