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

Forthcoming (release 25.1) changes to CASTEP checkpoint format require Euphonic update #294

Open
krefson opened this issue Mar 26, 2024 · 2 comments

Comments

@krefson
Copy link

krefson commented Mar 26, 2024

I am planning a small change in the CASTEP binary checkpoint file format for the next release (25.1) in the handling of the force constant matrix, and I wanted to ensure that this will not generate problems with Euphonic's CASTEP binary reader.

The change will be do do with the dipole-dipole model Coulomb tail subtraction of the force constant matrix. Currently the stored FCM may or may-not be Coulomb-subtracted depending on wither DFPT or FD/Supercell methods were used. Euphonic has some logic to figure this out, but I haven't completely understood this. I propose to add a new flag to the checkpoint format to explicitly indicate whether this is the case, so a minor change to Euphonic will be needed to read this (*). This will also require a checkpoint version test (>=25.1?read new flag:retain old logic).

The reason for this is that I have implemented reading in of externally computed Born effective charges for calculating the dipole tail, LO/TO splitting correction etc, as requested, so the logic of Coulomb subtraction will be more complicated if used.

(*) As the flag is a Fortran logical some twiddling will be required to reliably convert to a 0/1 boolean - Fortran logicals are a compiler-dependent representation.

@ajjackson
Copy link
Collaborator

Hi Keith,

I can take a look at this. I'm not familiar with the current logic to figure it out, but probably should be. I can't promise an exact timescale, but I guess we would like to have it by 2025?

I expect this feature will be very useful for combining force constants with a dipole correction from another (i.e. DFPT-supported!) level of theory.

Within Euphonic the ambiguity is avoided by a simple rule: if the Born charges and dielectric tensor are included, they have been subtracted from the ForceConstants they are attached to.

(Arguably the convention used by Phonopy, Espresso and others of "they have never been subtracted, this only happens on-the-fly" is simpler still, but Euphonic was built on CASTEP-friendly foundations!)

@ajjackson
Copy link
Collaborator

@krefson It seems worth revisiting this now we are in Q4 2024! Do we have some reasonably stable sample files to work with?

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