-- the operator is linear in Z, h(Z) = T - Z/r for a point nucleus, so h(0) - h(1) = 1/r G, F, Atom = CalculateAtomicBasisFunctions(10, {{"Nucleus", "Point"}}) -- Ne, Dirac-Fock indices, NF = CreateAtomicIndicesList(Atom.Labels, {{"Kappas", true}}) rinv = NewOperator("Dirac", NF, 0, indices, G, F) - NewOperator("Dirac", NF, 1, indices, G, F) M = OperatorToMatrix(rinv) for i, orb in ipairs(Atom.Orbitals) do local k = indices[i][1] + 1 print(string.format("%-6s <1/r> = %.10f RExpectation[-1] = %.10f bohr^-1", orb.Label, M[k][k], orb.RExpectation[-1])) end