dxtb.components.repulsion.new_repulsion#
- dxtb.components.repulsion.new_repulsion(unique, par, cutoff=None, with_analytical_gradient=False, device=None, dtype=None)[source]#
Create new instance of Repulsion class.
- Return type:
- Parameters:
unique (Tensor) – Unique elements in the system (shape:
(nunique,)).par (Param | ParamModule) – Representation of an extended tight-binding model.
cutoff (float) – Real space cutoff for repulsion interactions (default: 25.0).
with_analytical_gradient (bool, optional) – Whether to instantiate a repulsion class that implements a custom backward function with an analytical nuclear gradient, i.e., the first derivative w.r.t. positions is computed with an analytical formula instead of the AD engine. Defaults to
False.
- Returns:
Instance of the Repulsion class or
Noneif no repulsion is used.- Return type:
Repulsion | None
- Raises:
ValueError – If parametrization does not contain a halogen bond correction.
- Parameters: