networks module

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

Nodes for networks.

class DefaultNetworkExpansion[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)

class Hipnn(name, parents, periodic=False, module='auto', module_kwargs=None)[source]

Bases: DefaultNetworkExpansion, AutoKw, 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 (_BaseNode, 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)

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

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

class HipnnQuad(name, parents, periodic=False, module='auto', module_kwargs=None)[source]

Bases: HipnnVec

Node for HIP-NN-TS neural networks, 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 (_BaseNode, 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)

class HipnnVec(name, parents, periodic=False, module='auto', module_kwargs=None)[source]

Bases: DefaultNetworkExpansion, AutoKw, Network, SingleNode, _FeatureNodesMixin

Node for HIP-NN-TS neural networks, l=1

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 (_BaseNode, 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)

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

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