interactions module

Full Documentation for hippynn.layers.hiplayers.interactions module. Click here for a summary page.

class HOPInteractionLayer(*args, n_max, l_max, group_norm, group_norm_eps, **kwargs)[source]

Bases: InteractLayer

forward(in_features, pair_first, pair_second, dist_pairs, tensor_rhats)[source]

Pytorch Enforced Forward function

Parameters:
  • in_features

  • pair_first

  • pair_second

  • dist_pairs

Returns:

Interaction output features

class InteractLayer(nf_in, nf_out, n_dist, mind_soft, maxd_soft, hard_cutoff, sensitivity_module)[source]

Bases: Module

Hipnn’s interaction layer

forward(in_features, pair_first, pair_second, dist_pairs)[source]

Pytorch Enforced Forward function

Parameters:
  • in_features

  • pair_first

  • pair_second

  • dist_pairs

Returns:

Interaction output features

regularization_params()[source]
class InteractLayerQuad(nf_in, nf_out, n_dist, mind_soft, maxd_soft, hard_cutoff, sensitivity_module, cusp_reg)[source]

Bases: InteractLayerVec

forward(in_features, pair_first, pair_second, dist_pairs, coord_pairs)[source]

Pytorch Enforced Forward function

Parameters:
  • in_features

  • pair_first

  • pair_second

  • dist_pairs

Returns:

Interaction output features

class InteractLayerVec(nf_in, nf_out, n_dist, mind_soft, maxd_soft, hard_cutoff, sensitivity_module, cusp_reg)[source]

Bases: InteractLayer

static compatibility_hook(self, incompatible_keys)[source]
forward(in_features, pair_first, pair_second, dist_pairs, coord_pairs)[source]

Pytorch Enforced Forward function

Parameters:
  • in_features

  • pair_first

  • pair_second

  • dist_pairs

Returns:

Interaction output features

get_extra_state()[source]

Return any extra state to include in the module’s state_dict.

Implement this and a corresponding set_extra_state() for your module if you need to store extra state. This function is called when building the module’s state_dict().

Note that extra state should be picklable to ensure working serialization of the state_dict. We only provide backwards compatibility guarantees for serializing Tensors; other objects may break backwards compatibility if their serialized pickled form changes.

Returns:

object: Any extra state to store in the module’s state_dict

set_extra_state(state)[source]

Set extra state contained in the loaded state_dict.

This function is called from load_state_dict() to handle any extra state found within the state_dict. Implement this function and a corresponding get_extra_state() for your module if you need to store extra state within its state_dict.

Args:

state (dict): Extra state from the state_dict