coulomb module

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

Node for charge equilibration model.

class ChEQNode(name, parents, lower_bound=0.0, units={'energy': 'eV', 'length': 'Angstrom'}, module='auto', **kwargs)[source]

Bases: ExpandParents, AutoKw, MultiNode

auto_module_class

alias of ChEQ

expand0(network, **kwargs)[source]

Used for creation from parents with signature (Network)

expand1(network1, network2, **kwargs)[source]

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

expand2(U, chi, **kwargs)[source]

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

warn_if_pbc_detected(*parents, **kwargs)[source]

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

input_names = ('species', 'coordinates', 'U', 'chi')
main_output = 'charge'
output_index_states = (<IdxType.SysAtom>, <IdxType.Systems>, <IdxType.Systems>, <IdxType.SysAtom>, <IdxType.SysAtom>)
output_names = ('charge', 'coul_energy', 'dipole', 'out_U', 'out_chi')
parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
class ChargePairSetup(name, parents, *args, **kwargs)[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, Node, SpeciesNode)

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

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

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

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

parent_expander: ParentExpander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
parent_expansion_kwargs: Tuple[str] | Dict[str, str] | None = ('_pe_cutoff_distance',)
class CoulombEnergyNode(name, parents, energy_conversion_factor, module='auto', **kwargs)[source]

Bases: AutoKw, ChargePairSetup, Energies, MultiNode, _DeprecatedNamesMixin

Besides the normal ‘name’ and ‘parents’ arguments, this node requires an energy_conversion parameter. This corresponds to coulomb’s constant k in the equation E = kqq/r.

Note

This node has parent expansion, following these procedures.

  1. If matching (Charges), then apply expansion0

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

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

  4. If matching (Charges, SpeciesNode), then apply expansion1

  5. If matching (Charges, Node, SpeciesNode), then apply expansion2

  6. If matching (Charges, PositionsNode, AtomIndexer), then apply expansion3

  7. If matching (Charges, PairIndexer, AtomIndexer), then apply expansion4

  8. Asserts that the number of parents is 6

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

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

auto_module_class

alias of CoulombEnergy

auto_module_kwargs: Tuple[str] | Dict[str, str] | None = ('energy_conversion_factor',)
input_names = ('charges', 'pair_dist', 'pair_first', 'pair_second', 'system_index', 'n_systems')
main_output_name = 'system_energies'
output_index_states = (<IdxType.Systems>, <IdxType.Atoms>, <IdxType.Atoms>)
output_names = ('system_energies', 'atom_energies', 'atom_voltages')
parent_expander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>
class ScreenedCoulombEnergyNode(name, parents, energy_conversion_factor, cutoff_distance, screening=None, module='auto', **kwargs)[source]

Bases: AutoKw, ChargePairSetup, Energies, MultiNode, _DeprecatedNamesMixin

Besides the normal ‘name’ and ‘parents’ arguments, this node requires an energy_conversion parameter. This corresponds to coulomb’s constant k in the equation E = kqq/r.

Note

This node has parent expansion, following these procedures.

  1. If matching (Charges), then apply expansion0

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

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

  4. If matching (Charges, SpeciesNode), then apply expansion1

  5. If matching (Charges, Node, SpeciesNode), then apply expansion2

  6. If matching (Charges, PositionsNode, AtomIndexer), then apply expansion3

  7. If matching (Charges, PairIndexer, AtomIndexer), then apply expansion4

  8. Asserts that the number of parents is 6

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

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

auto_module_class

alias of ScreenedCoulombEnergy

auto_module_kwargs: Tuple[str] | Dict[str, str] | None = {'energy_conversion_factor': 'energy_conversion_factor', 'radius': 'cutoff_distance', 'screening': 'screening'}
input_names = ('charges', 'pair_dist', 'pair_first', 'pair_second', 'system_index', 'n_systems')
main_output_name = 'system_energies'
output_index_states = (<IdxType.Systems>, <IdxType.Atoms>, <IdxType.Atoms>)
output_names = ('system_energies', 'atom_energies', 'atom_voltages')
parent_expander = <hippynn.graphs.nodes.base.definition_helpers.ParentExpander object>