-
Notifications
You must be signed in to change notification settings - Fork 11
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
Get FC import from CASTEP 25.1 working #364
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #364 +/- ##
=======================================
Coverage 96.03% 96.04%
=======================================
Files 31 31
Lines 4214 4219 +5
Branches 643 645 +2
=======================================
+ Hits 4047 4052 +5
Misses 95 95
Partials 72 72 ☔ View full report in Codecov by Sentry. |
16683cd
to
d0b6851
Compare
Note that in the new test reference data:
|
I deliberately pushed a failing commit with updated tests, to verify that the new tests cover a real problem. The actual fix is in the following commit. |
- CASTEP 25.1 adds extra fields to BORN and DIELECTRIC sections of castep_bin file; read (and discard) this information - It can also create a BORN section without corresponding DIELECTRIC (by Berry Phase calculation). That throws off some Euphonic logic which assumes you would only ever have BORN and DIELECTRIC data at the same time. - As FC behaviour isn't really defined when you only have one, let's discard it in that case.
254b47c
to
9a35420
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I got slightly carried away with whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible and simple. Concerns about changing the process generally when it should presumably only affect 25.1 files?
Forgot the changelog 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here I thought FC
stood for Forget the Changelog
.
Looks good!
Closes #294
I need to test a wider range of import/present/not-present cases to be sure this will always do the right thing.
The good news is that most cases seem to work without this update; the main issue is with Berry-phase Born charge calculations.