hiplayers module
Full Documentation for hippynn.layers.hiplayers
module.
Click here for a summary page.
Layers for HIP-NN
- class CosCutoff(hard_max_dist)[source]
Bases:
Module
- forward(dist_tensor)[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 GaussianSensitivityModule(n_dist, min_dist_soft, max_dist_soft, hard_max_dist, cutoff_type=<class 'hippynn.layers.hiplayers.CosCutoff'>)[source]
Bases:
SensitivityModule
- forward(distflat, warn_low_distances=None)[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 InteractLayer(nf_in, nf_out, n_dist, mind_soft, maxd_soft, hard_cutoff, sensitivity_module, cusp_reg=None)[source]
Bases:
Module
Hipnn’s interaction layer
- class InteractLayerQuad(nf_in, nf_out, n_dist, mind_soft, maxd_soft, hard_cutoff, sensitivity_module, cusp_reg)[source]
Bases:
InteractLayerVec
- class InteractLayerVec(nf_in, nf_out, n_dist, mind_soft, maxd_soft, hard_cutoff, sensitivity_module, cusp_reg)[source]
Bases:
InteractLayer
- 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 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 correspondingget_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
- class InverseSensitivityModule(n_dist, min_dist_soft, max_dist_soft, hard_max_dist, cutoff_type=<class 'hippynn.layers.hiplayers.CosCutoff'>)[source]
Bases:
SensitivityModule
- forward(distflat, warn_low_distances=None)[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 SensitivityBottleneck(n_dist, min_soft_dist, max_dist_soft, hard_max_dist, n_dist_bare, cutoff_type=<class 'hippynn.layers.hiplayers.CosCutoff'>, base_sense=<class 'hippynn.layers.hiplayers.InverseSensitivityModule'>)[source]
Bases:
Module
- forward(distflat)[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.