SMTG-Bham / sumo

Heavyweight plotting tools for ab initio calculations
https://smtg-bham.github.io/sumo/
MIT License
199 stars 79 forks source link

Overlay multiple phonon band structures #65

Closed ajjackson closed 5 years ago

ajjackson commented 5 years ago

I thought we already had an issue for this but don't see it.

This feature was previously discussed with @kinzani @meinhorn @warda-rahim @zccaayo
and is particularly relevant for calculations in the Quasi-harmonic approximation: accept multiple sets of phonon data and plot them in different colours on the same band structure.

This may be achieved using the existing Python API, without much issue for e.g. supercell size convergence. However, for QHA calcs there is an interesting artefact that emerges: slight differences in lattice parameters lead to slightly inequivalent reciprocal-space paths. The "absolutely correct" solution here is to refuse to plot different lattices on the same band structure as the axis becomes technically incorrect. The pragmatic "let's actually do science here" solution is to arbitrarily choose one of the structures and rescale the reciprocal lattice for the others so the features at high-symmetry points may be compared easily.

ajjackson commented 5 years ago

Curious as to whether @utf already encountered/solved this in a script and it just hasn't made it back into sumo yet.

utf commented 5 years ago

@ajjackson I had a script to do it but this was pre sumo supporting band structures.

The "best" solution, in terms of what users will expect, would be to rescale one of the lattices to match the other. I guess we need to check that both structures have the same space group.

ajjackson commented 5 years ago

Yup! And if the phonon band structure is read in directly (rather than generating it with Phonopy) then we should check that the paths are actually the same.

I would very much like to compare phonon band structures from Castep/DFPT and Vasp/Phonopy :smile:

meinhorn commented 5 years ago

Hey all - this is @meinhorn. Since I have absolutely no clue what y'all are talking about I'm guessing I'm not the guy you intended to include in this thread...

On Wed, Jul 17, 2019 at 10:43 AM Adam J. Jackson notifications@github.com wrote:

Yup! And if the phonon band structure is read in directly (rather than generating it with Phonopy) then we should check that the paths are actually the same.

I would very much like to compare phonon band structures from Castep/DFPT and Vasp/Phonopy 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SMTG-UCL/sumo/issues/65?email_source=notifications&email_token=AI6O7KAC7DSQN6ZYEXOOY23P744YPA5CNFSM4IDVI7Z2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2E2IFY#issuecomment-512336919, or mute the thread https://github.com/notifications/unsubscribe-auth/AI6O7KGA7QU67FMLGDJSOFTP744YPANCNFSM4IDVI7ZQ .

ajjackson commented 5 years ago

Apologies! It was @meinhorn1

ajjackson commented 5 years ago

Thinking about this some more, it really would be useful to compare phonon band structures from calculations with different supercells etc. - in which case the command syntax is going to get rather awkward. How about:

So the workflow lets you compare to a previous plot(s) while setting up a new one (e.g. getting the supercell details right). When you're happy with them you can run sumo-phonon-bandplot with just json files to get your final comparison. The other data-related arguments will always refer to a single dataset you are setting up right now. Plotting-related arguments don't end up in the JSON and refer to the plot file you are currently generating.

Needless to say, this would interoperate very well with people who get their phonon band structure from Pymatgen some other way (maybe from a Materials Project screening?)