networks module

Full Documentation for hippynn.graphs.nodes.networks module. Click here for a summary page.

Nodes for networks.

class DefaultNetworkExpansion(name, parents, *args, **kwargs)[source]

Bases: ExpandParents

expansion0(species, *other_parents, species_set, purpose, **kwargs)[source]

Finds or sets up a default one-hot encoder if species are passed as first argument.

Returns:

(encoder,padding_indexer,*other_parents)

Used for creation from parents with signature (SpeciesNode, PositionsNode, CellNode)

Used for creation from parents with signature (SpeciesNode, PositionsNode)

expansion1(pidxer, pairfinder, **kwargs)[source]

Get indexed features from the atom indexer.

Returns:

(indexed_features, pair_finder)

Used for creation from parents with signature (AtomIndexer, PairIndexer)

parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
parent_expansion_kwargs: Tuple[str] | Dict[str, str] | None = {'dist_hard_max': 'dist_hard_max', 'periodic': 'periodic', 'species_set': 'possible_species'}
class HipHopnn(name, parents, periodic=False, **kwargs)[source]

Bases: HipnnVec

Node for HIP-HOP_NN neural network.

Note

This node has parent expansion, following these procedures.

  1. If matching (SpeciesNode, PositionsNode, CellNode), then apply expansion0

  2. If matching (SpeciesNode, PositionsNode), then apply expansion0

  3. If matching (Encoder, AtomIndexer, PositionsNode, CellNode), then apply expansion1

  4. If matching (Encoder, AtomIndexer, PositionsNode), then apply expansion1

  5. If matching (AtomIndexer, PairIndexer), then apply expansion1

  6. If matching (Node, PairIndexer), then apply expansion2

  7. Asserts that the number of parents is 5

  8. Gets main_output of nodes: casts MultiNodes to their main output

  9. Transforms the parents to have index states (<IdxType.Atoms>, None, None, None, None)

auto_module_class

alias of HipHopNNModule

parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
class Hipnn(name, parents, periodic=False, **kwargs)[source]

Bases: AutoKw, DefaultNetworkExpansion, Network, SingleNode, _FeatureNodesMixin

Node for HIP-NN neural networks

Note

This node has parent expansion, following these procedures.

  1. If matching (SpeciesNode, PositionsNode, CellNode), then apply expansion0

  2. If matching (SpeciesNode, PositionsNode), then apply expansion0

  3. If matching (Encoder, AtomIndexer, PositionsNode, CellNode), then apply expansion1

  4. If matching (Encoder, AtomIndexer, PositionsNode), then apply expansion1

  5. If matching (AtomIndexer, PairIndexer), then apply expansion1

  6. If matching (Node, PairIndexer), then apply expansion2

  7. Asserts that the number of parents is 4

  8. Gets main_output of nodes: casts MultiNodes to their main output

  9. Transforms the parents to have index states (<IdxType.Atoms>, None, None, None)

auto_module_class

alias of Hipnn

expansion2(features, pairfinder, **kwargs)[source]

Used for creation from parents with signature (Node, PairIndexer)

index_state: IdxType | None = 'Unlabeled'
input_names = ('input_features', 'pair_first', 'pair_second', 'pair_dist')
parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
class HipnnQuad(name, parents, periodic=False, **kwargs)[source]

Bases: HipnnVec

Node for HIP-NN-TS neural network, l=2

Note

This node has parent expansion, following these procedures.

  1. If matching (SpeciesNode, PositionsNode, CellNode), then apply expansion0

  2. If matching (SpeciesNode, PositionsNode), then apply expansion0

  3. If matching (Encoder, AtomIndexer, PositionsNode, CellNode), then apply expansion1

  4. If matching (Encoder, AtomIndexer, PositionsNode), then apply expansion1

  5. If matching (AtomIndexer, PairIndexer), then apply expansion1

  6. If matching (Node, PairIndexer), then apply expansion2

  7. Asserts that the number of parents is 5

  8. Gets main_output of nodes: casts MultiNodes to their main output

  9. Transforms the parents to have index states (<IdxType.Atoms>, None, None, None, None)

auto_module_class

alias of HipnnQuad

parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
class HipnnVec(name, parents, periodic=False, **kwargs)[source]

Bases: AutoKw, DefaultNetworkExpansion, Network, SingleNode, _FeatureNodesMixin

Node for HIP-NN-TS neural network, l=2

Note

This node has parent expansion, following these procedures.

  1. If matching (SpeciesNode, PositionsNode, CellNode), then apply expansion0

  2. If matching (SpeciesNode, PositionsNode), then apply expansion0

  3. If matching (Encoder, AtomIndexer, PositionsNode, CellNode), then apply expansion1

  4. If matching (Encoder, AtomIndexer, PositionsNode), then apply expansion1

  5. If matching (AtomIndexer, PairIndexer), then apply expansion1

  6. If matching (Node, PairIndexer), then apply expansion2

  7. Asserts that the number of parents is 5

  8. Gets main_output of nodes: casts MultiNodes to their main output

  9. Transforms the parents to have index states (<IdxType.Atoms>, None, None, None, None)

auto_module_class

alias of HipnnVec

expansion2(features, pairfinder, **kwargs)[source]

Used for creation from parents with signature (Node, PairIndexer)

index_state: IdxType | None = 'Unlabeled'
input_names = ('input_features', 'pair_first', 'pair_second', 'pair_dist', 'pair_coord')
parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>