Cusp correction only works if atoms of same type are consecutive
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 403
- Forks
- 154
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 90
Description
**Describe the bug**
Cusp correction (in the CASINO way, for all-electron calculations, with a GTO basis set) only works if atoms of same type are consecutive. For instance, if I give the input of a molecule in the following way:
H -0.923961000000000 1.231956000000000 -1.684781230000000
C 0.000000000000000 0.667176000000000 -1.684781230000000
C 0.000000000000000 -0.667176000000000 -1.684781230000000
H 0.923961000000000 1.231956000000000 -1.684781230000000
H 0.923961000000000 -1.231956000000000 -1.684781230000000
H -0.923961000000000 -1.231956000000000 -1.684781230000000
The cusp correction gives totally wrong energies, while if I input the molecule in the following way:
C 0.000000000000000 0.667176000000000 -1.684781230000000
C 0.000000000000000 -0.667176000000000 -1.684781230000000
H -0.923961000000000 1.231956000000000 -1.684781230000000
H 0.923961000000000 1.231956000000000 -1.684781230000000
H 0.923961000000000 -1.231956000000000 -1.684781230000000
H -0.923961000000000 -1.231956000000000 -1.684781230000000
the cusp correction works properly.
**To Reproduce**
Steps to reproduce the behavior:
1. release version or git commit hash being built: observed in the last 3.17.1 version, as well 3.14 and 3.15.
2. cmake command
3. full program/test invocation command
5. additional steps
**Expected behavior**
A clear and concise description of what you expected to happen.
I expect the cusp correction should work independently on the order of atoms, or the code should stop with an error message when the atom order is not consistent with the cusp correction.
**System:**
- system name: both on my laptop (mac os x) and on Archer2 cluster
- modules loaded [e.g. output of `module list`]
- other systems where this is reproducible [e.g. "my laptop", "none"]
**Additional context**
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the cusp-correction behavior with the two atom orderings described in the issue, using the reported 3.17.1, 3.14, or 3.15 versions if available. The issue names no source file, test, or complete invocation; done means cusp correction is order-independent or rejects inconsistent atom ordering with a clear error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100