physics module

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

Nodes for physics transformations

class AtomToMolSummer(name, parents, module='auto', **kwargs)[source]

Bases: ExpandParents, AutoNoKw, SingleNode

expansion0(features, **kwargs)[source]

Used for creation from parents with signature (_BaseNode)

expansion1(features, pdxer, **kwargs)[source]

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

class BondToMolSummmer(name, parents, module='auto', **kwargs)[source]

Bases: ExpandParents, AutoNoKw, SingleNode

expansion0(features, *, purpose, **kwargs)[source]

Used for creation from parents with signature (_BaseNode)

expansion1(features, pdxer, pair_idxer, **kwargs)[source]

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

expansion2(features, mol_index, n_molecules, **kwargs)[source]

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

class ChargeMomentNode(name, parents, module='auto', **kwargs)[source]

Bases: ExpandParents, AutoNoKw, SingleNode

expansion0(charges, *, purpose, **kwargs)[source]

Used for creation from parents with signature (_BaseNode)

expansion1(charges, positions, *, purpose, **kwargs)[source]

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

expansion2(charges, positions, pdxer, **kwargs)[source]

Used for creation from parents with signature (Charges, PositionsNode, AtomIndexer)

class ChargePairSetup[source]

Bases: ExpandParents

expansion0(charges, *, purpose, **kwargs)[source]

Used for creation from parents with signature (Charges)

expansion1(charges, species, *, purpose, **kwargs)[source]

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

expansion2(charges, pos_or_pair, species, *, purpose, **kwargs)[source]

Used for creation from parents with signature (Charges, _BaseNode, SpeciesNode)

expansion3(charges, positions, pidxer, *, cutoff_distance, **kwargs)[source]

Used for creation from parents with signature (Charges, PositionsNode, PaddingIndexer)

expansion4(charges, pairfinder, pidxer, *, cutoff_distance, **kwargs)[source]

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

class CombineEnergyNode(name, parents, module='auto', module_kwargs=None, **kwargs)[source]

Bases: Energies, AutoKw, ExpandParents, MultiNode

Combines Local atom energies from different Energy Nodes.

Note

This node has parent expansion, following these procedures.

  1. If matching (_BaseNode, Energies), then apply expansion0

  2. If matching (Energies, _BaseNode), then apply expansion0

  3. If matching (_BaseNode, _BaseNode), then apply expansion1

  4. If matching (_BaseNode, _BaseNode, PaddingIndexer), then apply expansion2

  5. Asserts that the number of parents is 4

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

expansion0(energy_1, energy_2, **kwargs)[source]

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

expansion1(energy_1, energy_2, **kwargs)[source]

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

expansion2(energy_1, energy_2, pdindexer, **kwargs)[source]

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

class CoulombEnergyNode(name, parents, energy_conversion, module='auto')[source]

Bases: ChargePairSetup, Energies, AutoKw, MultiNode

class DipoleNode(name, parents, module='auto', **kwargs)[source]

Bases: ChargeMomentNode

Compute the dipole of point charges.

Note

This node has parent expansion, following these procedures.

  1. If matching (_BaseNode), then apply expansion0

  2. If matching (Charges, PositionsNode), then apply expansion1

  3. If matching (Charges, PositionsNode, AtomIndexer), then apply expansion2

  4. Asserts that the number of parents is 4

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

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

class GradientNode(name, parents, sign, module='auto', **kwargs)[source]

Bases: AutoKw, SingleNode

Compute the gradient of a quantity.

class MultiGradientNode(name: str, molecular_energies_parent: _BaseNode, generalized_coordinates_parents: tuple[_BaseNode], signs: tuple[int], module='auto', **kwargs)[source]

Bases: AutoKw, MultiNode

Compute the gradient of a quantity.

class PerAtom(name, parents, module='auto', **kwargs)[source]

Bases: ExpandParents, AutoNoKw, SingleNode

expansion0(features, *, purpose, **kwargs)[source]

Used for creation from parents with signature (_BaseNode)

expansion1(features, species, **kwargs)[source]

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

class QuadrupoleNode(name, parents, module='auto', **kwargs)[source]

Bases: ChargeMomentNode

Compute the traceless quadrupole of point charges.

Note

This node has parent expansion, following these procedures.

  1. If matching (_BaseNode), then apply expansion0

  2. If matching (Charges, PositionsNode), then apply expansion1

  3. If matching (Charges, PositionsNode, AtomIndexer), then apply expansion2

  4. Asserts that the number of parents is 4

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

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

class ScreenedCoulombEnergyNode(name, parents, energy_conversion, cutoff_distance, screening=None, module='auto')[source]

Bases: ChargePairSetup, Energies, AutoKw, MultiNode

class StressForceNode(name, parents, module='auto', **kwargs)[source]

Bases: AutoNoKw, MultiNode

class VecMag(name, parents, module='auto', _helper=None, **kwargs)[source]

Bases: ExpandParents, AutoNoKw, SingleNode

expansion2(vector, helper, *, purpose, **kwargs)[source]

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