Skip to content
Snippets Groups Projects
Commit 33e96205 authored by Michele Nottoli's avatar Michele Nottoli
Browse files

Now allowing to guess coefficients.

parent b5cbeecb
Branches
Tags
1 merge request!5Guess for coefficients instead of density
......@@ -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."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment