Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing tests for correctness? #16

Open
HugoStrand opened this issue Nov 27, 2024 · 1 comment
Open

Missing tests for correctness? #16

HugoStrand opened this issue Nov 27, 2024 · 1 comment

Comments

@HugoStrand
Copy link
Member

HugoStrand commented Nov 27, 2024

Dear TRIQS/ctseg authors,

I have looked over the test suite and among all the tests only two_orbitals.py seems to be an actual test for correctness (for the non-interacting case). The other tests seems to be regression tests comparing with previous results obtained from the solver itself. (There is some ctint results used for inputs in spin_spin.py).

Would it be possible to test against exact reference data? e.g. using finite ED models that can be reduced to an effective retarded impurity problem?

Best regards,
Hugo

(Part of openjournals/joss-reviews#7425)

@nkavokine
Copy link
Collaborator

Dear Hugo, this is indeed a pertinent question. While most of the automatic tests are non-regression tests, two of them allow for comparison with (nearly) exact reference data.

  • dimer.py solves a problem of two impurity sites coupled to two bath sites, for which an ED reference is supplied in dimer_pyed.ref.h5.
  • spin_spin.py solves a single orbital problem with dynamical density-density and spin-spin interactions. The same problem was solved with a very long CTINT run, whose output (found in ctint.ref.h5) can be used as a reference for CTSEG. Since the two solvers carry out very different expansions, the agreement of their results is a strong indication for the correctness of both solvers.

In addition, two_orbitals.py tests for internal consistency of the solver (the result should not depend on the block structure chosen for the Green's function).

I have now added a section "Automatic tests" to the documentation (https://triqs.github.io/ctseg/latest/algorithm_implementation/implementation_notes.html#automatic-tests), so that the function of the different tests is clear to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants