Skip to content
Snippets Groups Projects

Guess for coefficients instead of density

Merged Michele Nottoli requested to merge coefficients into main
2 files
+ 40
2
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 7
2
@@ -94,7 +94,12 @@ class Extrapolator:
self.overlaps.push(overlap)
def guess(self, coords: np.ndarray, overlap = None) -> np.ndarray:
"""Get a new electronic density to be used as a guess."""
"""Get a new electronic density matrix to be used as a guess."""
c_guess = self.guess_coefficients(coords, overlap)
return c_guess @ c_guess.T
def guess_coefficients(self, coords: np.ndarray, overlap = None) -> np.ndarray:
"""Get a new coefficient matrix to be used as a guess."""
if self.options["allow_partially_filled"]:
n = min(self.options["nsteps"], self.descriptors.count)
@@ -125,7 +130,7 @@ class Extrapolator:
c_guess = self._grassmann_exp(gamma)
c_guess = inverse_sqrt_overlap @ c_guess
return c_guess @ c_guess.T
return c_guess
def _get_tangent(self) -> np.ndarray:
"""Get the tangent point."""
Loading