Skip to content

Commit

Permalink
Fix calculation for required computations
Browse files Browse the repository at this point in the history
  • Loading branch information
WardLT committed Dec 8, 2023
1 parent 1e87301 commit 9bf2885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jitterbug/thinkers/exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 9bf2885

Please sign in to comment.