castep-docs / castep-docs

13 stars 22 forks source link

Dispersion.pl behaving weirdly for phonons #131

Open RamunasSavanevskis opened 3 months ago

RamunasSavanevskis commented 3 months ago

When doing a fine phonon bandstructure calculation (specifying the path and then doing continuations with increasingly small PHONON_FINE_KPOINT_PATH_SPACING), there is a slightly weird behaviour with dispersion.pl - it starts to not be able to recognise the high-symmetry points specified before.

Doing a run on NaH with the fine path specified as

PHONON_KPOINT_MP_GRID 4 4 4

phonon_kpoint_mp_offset 0.125 0.125 0.125

%block phonon_fine_kpoint_path

0.0 0.0 0.0 ! Gamma

0.5 0.5 0.0 ! X (along Delta)

1.0 1.0 1.0 ! Gamma (Sigma )

0.5 0.5 0.5 ! L (Delta)

0.5 0.75 0.25 ! W (Q)

0.5 0.5 0.0 ! X (Z)

%endblock phonon_fine_kpoint_path PHONON_FINE_KPOINT_PATH_SPACING : 0.005

KPOINTS_MP_GRID 4 4 4

leads to this graph

path_spacing_dispersion

It is missing the label for both X and gamma point - with less fine spacing, it was able to find them just fine. The same happened whether I had "-symmetry fcc" or not - without it, it also missed out the numbers, though they're specified.

I understand it's expected that the shape of the bandstructure doesn't change, since the default spacing is good enough with interpolation, but I don't understand why it'd start not labelling the high-symmetry points on the x-axis.

I'm not sure if this is how it is supposed to be, or if I messed something up, but I'll put this here just in case

RamunasSavanevskis commented 3 months ago

Also, setting a coarse spacing seems to completely mess it up image This was the same but phonon_fine_kpoint_path_spacing : 0.3 In the tutorial PR https://github.com/castep-docs/castep-docs/pull/130 I was able to demonstrate an example where it's visibly coarser but still useful, but this only works for a very narrow range of path_spacings - it either gets a "perfect" shape or completely breaks outside that range.

The image I linked still has 24 q-points - I'm not sure if that's not enough to be able to get a non-broken bandstructure or if it's not being rendered properly.

My main issue with how it behaves when fine or coarse is the relevance of the phonon tutorial in terms of the bandstructure - at least with NaH, it seems that touching path_spacing doesn't really do anything useful.