dxtb.components.base.ClassicalABC#
- class dxtb.components.base.ClassicalABC[source]#
Bases:
ABCAbstract base class for calculation of classical contributions.
Methods
Store variables for energy calculation.
Obtain energy of the contribution.
- abstract get_cache(numbers, ihelp=None, **kwargs)[source]#
Store variables for energy calculation.
- Return type:
- Parameters:
numbers (Tensor) – Atomic numbers for all atoms in the system (shape:
(..., nat)).ihelp (IndexHelper) – Helper class for indexing.
- Returns:
Cache class for storage of variables.
- Return type:
Cache
- Parameters:
numbers (Tensor)
ihelp (IndexHelper | None)
kwargs (Any)
Note
The cache of a classical contribution does not require
positionsas it only becomes useful ifnumbersremain unchanged andpositionsvary, i.e., during geometry optimization.
- abstract get_energy(positions, cache, **kwargs)[source]#
Obtain energy of the contribution.
- Return type:
- Parameters:
positions (Tensor) – Cartesian coordinates of all atoms (shape:
(..., nat, 3)).cache (Cache) – Cache for the parameters.
- Returns:
Atomwise energy contributions.
- Return type:
Tensor
- Parameters:
positions (Tensor)
cache (ComponentCache)
kwargs (Any)