targets module

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

Layers for target prediction such as Energy and Charge

class HBondSymmetric(feature_sizes, n_dist, dist_soft_min, dist_soft_max, dist_hard_max, positive=False, symmetric=False, antisymmetric=False, sensitivity_type=<class 'hippynn.layers.hiplayers.InverseSensitivityModule'>, n_target=1, all_pairs=True)[source]

Bases: Module

forward(all_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.

class HCharge(feature_sizes, first_is_interacting=False, n_target=1)[source]

Bases: Module

Predict an atom-level scalar such as charge from local features.

forward(all_features)[source]
Parameters:

tensors (all_features a list of feature)

Returns:

charges, predicted charges summed at each layer, and charge hierarchcality

class HEnergy(feature_sizes, first_is_interacting=False, n_target=1)[source]

Bases: Module

Predict a system-level scalar such as energy from a sum over local components.

forward(all_features, mol_index, n_molecules)[source]

Pytorch Enforced Forward function

Param:

all_features a list of feature tensors:

Param:

mol_index the molecular index for atoms in the batch

Param:

total number of molecules in the batch

Returns:

Total Energy

class LocalChargeEnergy(feature_sizes, first_is_interacting=False)[source]

Bases: Module

forward(charges, all_features, mol_index, n_molecules)[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.