Coverage for ase/_4/optimize/method.py: 100.00%
3 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-11-27 15:21 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-11-27 15:21 +0000
1from abc import ABC, abstractmethod
3import numpy as np
6class OptimizerMethod(ABC):
7 @abstractmethod
8 def compute_step(self, gradient: np.ndarray) -> np.ndarray: ...
10 @abstractmethod
11 def update(
12 self,
13 pos: np.ndarray,
14 gradient: np.ndarray,
15 pos0: np.ndarray,
16 gradient0: np.ndarray,
17 ) -> None: ...
19 @abstractmethod
20 def datafy(self): ...
22 @abstractmethod
23 def undatafy(self, *args, **kwargs): ...