Concatenating band structure plots using py4vasp

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
hatedark1
Newbie
Newbie
Posts: 24
Joined: Fri Mar 24, 2023 1:19 pm

Concatenating band structure plots using py4vasp

#1 Post by hatedark1 » Mon Nov 06, 2023 6:39 pm

Dear fellows,

I would like to know if there is a way to concatenate the band structure plot of two different high symmetry paths of the same material using py4vasp. More details follow.

Due to time constraints, I performed an HSE06 band structure calculation of a material in the high symmetry path K-Gamma-M-K and later in the high symmetry path K-H-A-L-H. I would like to know if there is a way to

1) combine the output files and use py4vasp to plot the whole path
OR
2) to tell py4vasp to gather the information from the two output files and plot them in the same graph.

Or should I just rerun the calculation with the whole path?

Best regards,
Lira.

henrique_miranda
Global Moderator
Global Moderator
Posts: 497
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: Concatenating band structure plots using py4vasp

#2 Post by henrique_miranda » Tue Nov 07, 2023 8:14 am

Currently, there is no function in py4vasp that you call to concatenate the two dispersions in the same graph.
That being said you can easily extract the data from the 'vaspout.h5' files in two separate folders and write a few lines of Python to make the plot of the concatenated dispersion yourself.

Code: Select all

import py4vasp
calc1 = py4vasp.Calculation.from_path('path1/')
calc2 = py4vasp.Calculation.from_path('path2/')
dict1 = calc1.band.to_dict()
dict2 = calc2.band.to_dict()
dict1 and dict2 should contain the following keys with all the required information:

Code: Select all

dict_keys(['kpoint_distances', 'kpoint_labels', 'fermi_energy', 'bands', 'occupations', 'projections'])

Post Reply