pairs module
Full Documentation for hippynn.graphs.nodes.pairs
module.
Click here for a summary page.
Nodes for finding and manipulating pairs and distances.
- class DynamicPeriodicPairs(name, parents, dist_hard_max, module='auto', module_kwargs=None, **kwargs)[source]
Bases:
_DispatchNeighbors
Node for finding pairs in arbitrary periodic boundary conditions. Note: This will often be slower than PeriodicPairIndexer, but more general. If the speed is a concern, consider precomputing pairs with experiment.assembly.precompute_pairs
Note
This node has parent expansion, following these procedures.
If matching (PositionsNode, SpeciesNode, CellNode), then apply expand0
If matching (PositionsNode, Encoder, PaddingIndexer, CellNode), then apply expand1
Asserts that the number of parents is 8
Gets main_output of nodes: casts MultiNodes to their main output
Transforms the parents to have index states (<IdxType.MolAtom>, None, None, None, None, None, None, None)
- class ExternalNeighborIndexer(name, parents, hard_dist_cutoff, module='auto', **kwargs)[source]
Bases:
ExpandParents
,PairIndexer
,AutoKw
,MultiNode
- class KDTreePairs(name, parents, dist_hard_max, module='auto', module_kwargs=None, **kwargs)[source]
Bases:
_DispatchNeighbors
Node for finding pairs under periodic boundary conditions using Scipy’s KD Tree algorithm. Cell must be orthorhombic.
Note
This node has parent expansion, following these procedures.
If matching (PositionsNode, SpeciesNode, CellNode), then apply expand0
If matching (PositionsNode, Encoder, PaddingIndexer, CellNode), then apply expand1
Asserts that the number of parents is 8
Gets main_output of nodes: casts MultiNodes to their main output
Transforms the parents to have index states (<IdxType.MolAtom>, None, None, None, None, None, None, None)
- class KDTreePairsMemory(name, parents, dist_hard_max, skin, module='auto', module_kwargs=None, **kwargs)[source]
Bases:
_DispatchNeighbors
,Memory
Implementation of KDTreePairs with an added memory component.
Stores current pair indices in memory and reuses them to compute the pair distances if no particle has moved more than skin/2 since last pair calculation. Otherwise uses the _pair_indexer_class to recompute the pairs.
Increasing the value of ‘skin’ will increase the number of pair distances computed at each step, but decrease the number of times new pairs must be computed. Skin should be set to zero while training for fastest results.
Note
This node has parent expansion, following these procedures.
If matching (PositionsNode, SpeciesNode, CellNode), then apply expand0
If matching (PositionsNode, Encoder, PaddingIndexer, CellNode), then apply expand1
Asserts that the number of parents is 8
Gets main_output of nodes: casts MultiNodes to their main output
Transforms the parents to have index states (<IdxType.MolAtom>, None, None, None, None, None, None, None)
- class MinDistNode(name, parents, module='auto', **kwargs)[source]
Bases:
ExpandParents
,AutoNoKw
,MultiNode
- class NumpyDynamicPairs(name, parents, dist_hard_max, module='auto', module_kwargs=None, **kwargs)[source]
Bases:
_DispatchNeighbors
- class OpenPairIndexer(name, parents, dist_hard_max, module='auto', **kwargs)[source]
Bases:
ExpandParents
,PairIndexer
,MultiNode
- class PaddedNeighborNode(name, parents, module='auto', **kwargs)[source]
Bases:
ExpandParents
,AutoNoKw
,MultiNode
- class PairCacher(name, parents, module='auto', module_kwargs=None, **kwargs)[source]
Bases:
ExpandParents
,AutoKw
,PairCache
,SingleNode
- class PairDeIndexer(name, parents, module='auto', **kwargs)[source]
Bases:
ExpandParents
,AutoNoKw
,SingleNode
For converting from IdxType.Pairs to IdxType.MolAtomAtom (Padded form)
Note
This node has parent expansion, following these procedures.
If matching (_BaseNode), then apply expand0
If matching (_BaseNode, PaddingIndexer, PairIndexer), then apply expand1
- class PairFilter(name, parents, dist_hard_max, module='auto', **kwargs)[source]
Bases:
AutoKw
,PairIndexer
,ExpandParents
,MultiNode
- class PairReIndexer(name, parents, module='auto', **kwargs)[source]
Bases:
ExpandParents
,AutoNoKw
,SingleNode
For re-using index information to convert from IdxType.MolAtomAtom -> IdxType.Pairs
Note
This node has parent expansion, following these procedures.
If matching (_BaseNode), then apply expand0
If matching (_BaseNode, PaddingIndexer, PairIndexer), then apply expand1
Asserts that the number of parents is 5
Gets main_output of nodes: casts MultiNodes to their main output
- class PairUncacher(name, parents, dist_hard_max, module='auto', **kwargs)[source]
Bases:
ExpandParents
,AutoNoKw
,PairIndexer
,MultiNode
- class PeriodicPairIndexer(name, parents, dist_hard_max, module='auto', module_kwargs=None, **kwargs)[source]
Bases:
ExpandParents
,AutoKw
,PeriodicPairOutputs
,PairIndexer
,MultiNode
- class PeriodicPairIndexerMemory(name, parents, dist_hard_max, skin, module='auto', module_kwargs=None, **kwargs)[source]
Bases:
PeriodicPairIndexer
,Memory
Implementation of PeriodicPairIndexer with additional memory component.
Stores current pair indices in memory and reuses them to compute the pair distances if no particle has moved more than skin/2 since last pair calculation. Otherwise uses the _pair_indexer_class to recompute the pairs.
Increasing the value of ‘skin’ will increase the number of pair distances computed at each step, but decrease the number of times new pairs must be computed. Skin should be set to zero while training for fastest results.
Note
This node has parent expansion, following these procedures.
If matching (PositionsNode, SpeciesNode, CellNode), then apply expand0
If matching (PositionsNode, Encoder, PaddingIndexer, CellNode), then apply expand1
Asserts that the number of parents is 5
Gets main_output of nodes: casts MultiNodes to their main output
- class RDFBins(name, parents, module='auto', bins=None, module_kwargs=None, **kwargs)[source]
Bases:
ExpandParents
,AutoKw
,SingleNode
- expand0(pos, spec, cell, *, purpose, dist_hard_max=None, **kwargs)[source]
Build a default Periodic Pair indexer.
Used for creation from parents with signature (PositionsNode, SpeciesNode, CellNode)
- expand1(pos, spec, *, purpose, dist_hard_max=None, **kwargs)[source]
Builds an open pair indexer.
Used for creation from parents with signature (PositionsNode, SpeciesNode)