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

Fix interall interactions #127

Merged
merged 5 commits into from
Jun 10, 2022
Merged

Fix interall interactions #127

merged 5 commits into from
Jun 10, 2022

Conversation

k-yoshimi
Copy link
Contributor

When i1 sigma1 i2 sigma2 i3 sigma3 i4 sigma4 val_re val_im is defined and
i4 sigma4 i3 sigma3 i2 sigma2 i1 sigma1 val_re -val_im
and
i2 sigma2 i1 sigma1 i4 sigma4 i3 sigma3 val_re -val_im
exists at the same time in InterAll.def, a branching error will occur.

  • Fix CheckInterAllHermite function in readdef.c as follows:
  1. Add a check condition

Before

if (icntincorrect != 0) {
  return (-1);
}

After

if (icntincorrect != 0 || NInterAllOffDiagonal != 2*icntHermite) {
  return (-1);
}
  1. Remove a check condition for spin and spingc

Before

if (iCalcModel == Kondo || iCalcModel == KondoGC || iCalcModel == Spin || iCalcModel == SpinGC) {

After

if (iCalcModel == Kondo || iCalcModel == KondoGC) {
  • Add the following description for InterAll.def in the manual
For the off-diagonal component, be sure to provide a pair of i1 sigma1 i2 sigma2 i3 sigma3 i4 sigma4 and i4 sigma4 i3 sigma3 i2 sigma2 i1 sigma1.

@tmisawa
Copy link
Contributor

tmisawa commented Apr 14, 2022

@k-yoshimi
Since Hermite pair should be given in
(I,J,K,L) and (L,K,J,I),
the second criterion is redundant.
It is better to delete the following part

else if (isite1 == itmpsite2 && isite2 == itmpsite1 && isite3 == itmpsite4 &&
isite4 == itmpsite3)

And, if pair (I,J,K,L) , (L,K,J,I) does not exist,
it is better to exit with an error message

@tmisawa
Copy link
Contributor

tmisawa commented Apr 14, 2022

In the previous comment, I did not consider the standard notation used in the spin systems.

For example, In spin systems, exchange interactions are described as
S^{+}_{A}S^{-}_{B}+S^{-}_{A}S^{+}_{B}.
In this description,
the Hermite pair is given by
(I,J,K,L) and (J,I,L,K).

This kind of expression is frequently used in the study of the spin systems,
it is better to regard the pair [(I,J,K,L), (J,I,L,K)] as the Hermiter pair.

@k-yoshimi
Copy link
Contributor Author

@tmisawa
Thank you for your comment. My latest commit fixes the problem. Please check it and if theres's no problem, merge it to the develop branch.

@tmisawa
Copy link
Contributor

tmisawa commented Jun 10, 2022

minimum.zip
For a memo, I uploaded the minimum input files for this bug.
Note that the true GS energy is -0.25 but it is -0.50 in the old version.

@tmisawa tmisawa merged commit 7c1afc3 into develop Jun 10, 2022
@k-yoshimi k-yoshimi deleted the fix_interall branch June 14, 2022 06:04
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

Successfully merging this pull request may close these issues.

2 participants