derivatives module
Full Documentation for hippynn.layers.physics.derivatives module.
Click here for a summary page.
Layers for physical operations
- class CellScaleInducer(*args, **kwargs)[source]
Bases:
Module- forward(coordinates, cell)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class Gradient(sign)[source]
Bases:
Module- forward(molecular_energies, positions)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class HVP(*args: Any, **kwargs: Any)[source]
Bases:
Module- forward(force, coordinates, vector, padding_mask)[source]
source: (B, N_max, 3) force tensor coordinates: (B, N_max, 3), requires_grad=True vector: (B, N_max, 3), perturbation direction padding_mask: (B, N_max, 3), HVP padding mask with 3N non-zero elements Returns: (B, N_max, 3), Hessian-vector product
- class Hessian[source]
Bases:
Module
- class MultiGradient(signs)[source]
Bases:
Module- forward(molecular_energies: Tensor, *generalized_coordinates: 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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class StressForce(*args, **kwargs)[source]
Bases:
Module- forward(energy, strain, coordinates, cell)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.