-
-
Notifications
You must be signed in to change notification settings - Fork 60
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 the basis when reading from XV #778
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #778 +/- ##
=======================================
Coverage 87.32% 87.32%
=======================================
Files 396 396
Lines 50579 50575 -4
=======================================
- Hits 44168 44166 -2
+ Misses 6411 6409 -2 ☔ View full report in Codecov by Sentry. |
Minimal example of how it failed: From fdf:
From XV:
|
I can confirm this issue. For one of my systems I find:
The first case has the correct atoms (and input coordinates), the latter wrong atoms (but correct, relaxed coordinates). |
Actually the fix here isn't fully correct either. It seems that using So something like:
Will lead to reversed species if you read from So either:
I think the second one makes more sense, but I don't know if other files that use |
Hmm getting the basis by Z won't work either if you have multiple atoms with the same Z, as in Thomas' example 😅 So the only option is that |
nice catches. Indeed these things should be resolved. Let me have a look |
Ok, now everything should work fine. You might want to change the name of the argument that I introduced on |
I'll probably revert that one, it should be handled differently, the whole idea of using species indices like that would be wrong... Ideally this issues should be resolved with some generic methods that resolves merges of geometries, atoms, orbitals, in a very strict manner, see e.g. #775. |
Thanks for discovering this! Could you both try out the #779 branch? It should solve this problem (and more!). Also added some more tests. |
Closed via #779 |
When reading the geometry from an XV file using
fdf.read_geometry(output=True)
, the basis was not correctly set. It was completely broken, I don't know why I (or anyone) hadn't noticed until now 😅