hipnn module
Full Documentation for hippynn.networks.hipnn
module.
Click here for a summary page.
Implementation of HIPNN.
- class Hipnn(n_features, n_sensitivities, dist_soft_min, dist_soft_max, dist_hard_max, n_atom_layers, n_interaction_layers=None, possible_species=None, n_input_features=None, sensitivity_type='inverse', resnet=True, activation=<class 'torch.nn.modules.activation.Softplus'>, cusp_reg=None)[source]
Bases:
Module
Hipnn Main Module
- forward(features, pair_first, pair_second, pair_dist)[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.
- property interaction_layers
- property sensitivity_layers
- class HipnnVec(*args, cusp_reg=1e-06, **kwargs)[source]
Bases:
Hipnn
HIP-NN-TS with l=1
- forward(features, pair_first, pair_second, pair_dist, pair_coord)[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.
- compute_hipnn_e0(encoder, Z_Data, en_data, peratom=False, fit_dtype=torch.float64)[source]
- Parameters:
encoder – encoder of species to features (one-hot representation, probably)
Z_Data – species data
en_data – energy data
peratom – whether energy is per-atom or total
- Returns:
energy per species as shape (n_features_encoded, 1)