Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ryd_numerov/angular/angular_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def calc_reduced_overlap(self, other: AngularKetBase) -> float:
ov: float = 0
for coeff, jj_ket in fj.to_state("JJ"):
ov += coeff * ls.calc_reduced_overlap(jj_ket)
return ov
return float(ov)

raise NotImplementedError(f"This method is not yet implemented for {self!r} and {other!r}.")

Expand Down
2 changes: 1 addition & 1 deletion src/ryd_numerov/angular/angular_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def to(self, coupling_scheme: CouplingScheme) -> AngularState[Any]:
else:
kets.append(scheme_ket)
coefficients.append(coeff * scheme_coeff)
return AngularState(coefficients, kets)
return AngularState(coefficients, kets, warn_if_not_normalized=abs(self.norm - 1) < 1e-10)

def calc_exp_qn(self, q: AngularMomentumQuantumNumbers) -> float:
"""Calculate the expectation value of a quantum number q.
Expand Down
5 changes: 5 additions & 0 deletions src/ryd_numerov/radial/wavefunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ def sanity_check(self, z_stop: float, run_backward: bool) -> bool: # noqa: C901
elif n <= 16:
tol = 2e-3

species = self.radial_state.species
if species.number_valence_electrons == 2:
# For divalent atoms the inner boundary is less well behaved ...
tol = 2e-2

if inner_weight_scaled_to_whole_grid > tol:
warning_msgs.append(
f"The wavefunction is not close to zero at the inner boundary"
Expand Down