SMTG-Bham / sumo

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

Issue with DFPT phonon band structure #148

Closed kcbhamu closed 2 years ago

kcbhamu commented 3 years ago

Dear Developers, To plot the phonon band structure sumo required a FORCE_SETS file. But when we use DFPT approache, it gives us FORCE_CONSTANTS file instead of FORCE_SETS and in such a situation sumo-phonon-bandplot is not working. Do you have any advice for the same? Thanks

ajjackson commented 3 years ago

FORCE_CONSTANTS should work.

From the tutorial page https://smtg-ucl.github.io/sumo/sumo-phonon-bandplot.html

Supported Inputs sumo-phonon-bandplot will automatically look for a FORCE_SETS file in the current directory, however, other input types are supported. The input can be specified using the --filename option. The supported inputs are:

FORCE_SETS: If --dim not specified, POSCAR and SPOSCAR files should also be in the current directory.

FORCE_CONSTANTS: In this case, a corresponding POSCAR and SPOSCAR are not required.

band.yaml: phonopy-type band structure yaml file. Please note that when using this mode, the high-symmetry path cannot be altered.

ajjackson commented 3 years ago

Hi @kcbhamu , did you manage to get this working with FORCE_CONSTANTS?

kcbhamu commented 2 years ago

Hii Dear Jackson, sorry for the late response. With phonopy DFPT it worked but unfortunately, I could not run it with QE DFPT (pw.x and ph.x) as it does not give FOCE_SETS of FORCE_CONSTANTS.

ajjackson commented 2 years ago

Right, I'm afraid we don't have a native QE interface at this point. I'm not a QE user: what do the band structure outputs look like for ph.x?

kcbhamu commented 2 years ago

Maybe I could not get your point. However, I am trying to answer. It generates the dynamical matrix files for each q-point. here is workflow (taken from [https://www.quantum-espresso.org/Doc/ph_user_guide.pdf]:

  1. pw.x
  2. ph.x: Calculates phonon frequencies and displacement patterns, dielectric tensors, effective charges (uses data produced by pw.x).
  3. q2r.x: calculates Interatomic Force Constants (IFC) in real space from dynamical matrices produced by ph.x on a regular q-grid
  4. matdyn.x: produces phonon frequencies at a generic wave vector using the IFC file calculated by q2r.x.

Files produced by step 3 and 4 (along with input files used) are attached here. We used the file matdyn.freq.gp for phonon plot. Frequencies in this file are in cm^-1. If you give me your email ID, I can share complete directory of my calculations. sumo.tar.gz

Links for some tutorials: https://www.afs.enea.it/buonocor/graphane-with-phonon.html

ajjackson commented 2 years ago

At the moment the sumo-phonon-bandplot workflow is quite VASP-oriented. So while there does seem to be a way to get FORCE_CONSTANTS from q2r.x outputs, there would be other changes needed to handle the structure file etc. And as we don't really support QE at all at the moment this would make more sense as part of a larger project which we currently lack resources for.

Looking at the outputs of matdyn, it would be fairly easy to write a script that plots these in a Sumo-ish-looking way and I could show you how to do that... except that these data files don't have any information about the high-symmetry points. Is there some file that identifies where the labels are supposed to go? It looks like matdyn.freq.gp does handle the transformation to a Cartesian x-axis, but contains no information about special points.

kcbhamu commented 2 years ago

To get the high symmetry points, we run one more script (plotband.x < plotb.in > plotb.out ) for which the input file looks like: Dispersion.freq -100 600 GXRZG-Minus.dat dispersion.ps -3.8067 0.01 -3.8067

The resultant output is as below: Input file > Reading 18 bands at 501 k-points Range: -0.0012 476.0189eV Emin, Emax > high-symmetry point: 0.0000 0.0000 0.0000 x coordinate 0.0000 high-symmetry point: 0.5000 0.0000 0.0000 x coordinate 0.5000 high-symmetry point: 0.5000 0.0000 0.1978 x coordinate 0.6978 high-symmetry point: 0.0000 0.0000 0.1978 x coordinate 1.1978 high-symmetry point: 0.0000 0.0000 0.0000 x coordinate 1.3956 output file (gnuplot/xmgr) > bands in gnuplot/xmgr format written to file GXRZG-Minus.dat
output file (ps) > Efermi > deltaE, reference E (for tics) bands in PostScript format written to file dispersion.ps

I have my own script which gives a fairly nice phonon but it would be good if it can be implemented in the SUMO-plotter.

the

ajjackson commented 2 years ago

It all seems a bit complicated and different from the rest of the Sumo workflow.

My preferred approach if we were to implement QE support for phonons would be to ignore band structure files and generate a plot from force-constants data. It would make sense to do that as part of a much wider program of phonon interoperability, which I have some interest in but is moving slowly.

For now I recommend that if you would like a plot that is consistent with other Sumo outputs, consider using Matplotlib for your script, with the style sheets under sumo/plotting.

Thanks for the information about phonon plotting with QE; it's an interesting code and I hope that over time it will be easier to manage this sort of thing. (Possibly by involving ASE and/or Euphonic...)

kcbhamu commented 2 years ago

Thanks.

On Sat, Jan 1, 2022, 2:32 AM Adam J. Jackson @.***> wrote:

It all seems a bit complicated and different from the rest of the Sumo workflow.

My preferred approach if we were to implement QE support for phonons would be to ignore band structure files and generate a plot from force-constants data. It would make sense to do that as part of a much wider program of phonon interoperability, which I have some interest in but is moving slowly.

For now I recommend that if you would like a plot that is consistent with other Sumo outputs, consider using Matplotlib for your script, with the style sheets under sumo/plotting.

Thanks for the information about phonon plotting with QE; it's an interesting code and I hope that over time it will be easier to manage this sort of thing. (Possibly by involving ASE and/or Euphonic...)

— Reply to this email directly, view it on GitHub https://github.com/SMTG-UCL/sumo/issues/148#issuecomment-1003423892, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZPLTZQSJFXHL4KI5OPSQDUTXSKBANCNFSM5C4XKSOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

ajjackson commented 2 years ago

Closing for now, people are welcome to comment further or raise a new Issue for further discussion of how QE support might work.