charges module

Full Documentation for hippynn.layers.physics.charges module. Click here for a summary page.

class Dipole[source]

Bases: Module

forward(charges: Tensor, positions: Tensor, system_index: Tensor, n_systems: int)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class Quadrupole(**kwargs)[source]

Bases: Module

Computes quadrupoles as a flattened (n_systems,9) array. NOTE: Uses normalization sum_a q_a (r_a,i*r_a,j - 1/3 delta_ij r_a^2)

forward(charges, positions, system_index, n_systems)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.