def test_psi1(self): rf = r_f(6) orb0 = SphericalOrbital(0, rf) orb1 = SphericalOrbital(1, rf) r = np.linspace(0, 6, 333 * 3).reshape(-1, 3) p0 = orb0.psi(r) p1 = orb1.psi(r) assert not np.allclose(p0, p1) orb0 = SphericalOrbital(1, rf) assert orb0.equal(orb1, radial=True, psi=True) for m in range(orb0.l, orb0.l + 1): p0 = orb0.psi(r, -1) p1 = orb1.psi(r, -1) assert np.allclose(p0, p1) p0 = orb0.psi(r, -1) p1 = orb1.psi(r, 1) assert not np.allclose(p0, p1)
def test_same1(self): rf = r_f(6) o0 = SphericalOrbital(0, rf) o1 = Orbital(5.0) assert o0.equal(o1) assert not o0.equal(Orbital(3.))