From 9bf28856d9d4c3a5642b55f233b8f57fd57a485e Mon Sep 17 00:00:00 2001 From: Logan Ward Date: Fri, 8 Dec 2023 08:22:57 -0500 Subject: [PATCH] Fix calculation for required computations --- jitterbug/thinkers/exact.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jitterbug/thinkers/exact.py b/jitterbug/thinkers/exact.py index 21f7077..767350c 100644 --- a/jitterbug/thinkers/exact.py +++ b/jitterbug/thinkers/exact.py @@ -178,7 +178,7 @@ def compute_hessian(self) -> np.ndarray: n_atoms = len(self.atoms) if not np.isfinite(self.single_perturb).all(): raise ValueError(f'Missing {np.isnan(self.single_perturb).sum()} single perturbations') - expected_double = self.double_perturb.size - (4 * n_atoms ** 2) + expected_double = (n_atoms * 3) * (n_atoms * 3 - 1) * 4 if not np.isfinite(self.double_perturb).sum() == expected_double: raise ValueError(f'Missing {expected_double - np.isfinite(self.double_perturb).sum()} double perturbations')