Closed sajidurehman closed 2 years ago
I think all you need to do is to use the compute_pdos
function:
from castepxbin.compute_pdos
pdos_data = compute_pdos(pdos_bin, eigenvalues, kpoints_weights, bins)
It will give a raw non-broaden PDOS - e.g. number of (projected) electrons in each energy bin. You have to work out how to read eigenvalues and kpoints from the bands files and the number of bins to put the eigenvalues.
Actually, this package is meant to be a low-level interface. It is probably more useful to use sumo for plotting and get processed data. The default branch uses these packages to read the pdos and generate plots.
However, OptaDOS should always work for PDOS plotting, the only advantage of this package is it has lm
projections. If you are getting errors, it is likely your bands and pdos_bin are not compatible if they are from different calculations. Can use just run CASTEP executables using the standard file interface? I don't use MS so I don't know how it works.
I am afraid a bit of programming is not avoidable. Consider this a good investment for your PhD ;)
Thank you for prompt reply. I have also used the sumo for band structure and pdos calculation but unfortunately sumo can't calculate the projected band structure. May be there is a way to use the castepxbin to calculate the projected band structure. But I am not familiar with it. If there is any way please share with me. Thank you in advance.
One of the interesting thing is we use sumo for MS output files. But again problem for me is the projected band structure calculation.
I just explored that MS can generate the .pdos_bin for band structure calculation but still i am getting the same error. Now get more confuse because all data comes from same calculation. I will be very thankful to you if you can see MS calculated files. Si CASTEP Energy.zip
Again looking forward to your kind response
Thank you for prompt reply. I have also used the sumo for band structure and pdos calculation but unfortunately sumo can't calculate the projected band structure. May be there is a way to use the castepxbin to calculate the projected band structure. But I am not familiar with it. If there is any way please share with me. Thank you in advance.
One of the interesting thing is we use sumo for MS output files. But again problem for me is the projected band structure calculation.
I just explored that MS can generate the .pdos_bin for band structure calculation but still i am getting the same error. Now get more confuse because all data comes from same calculation. I will be very thankful to you if you can see MS calculated files. Si CASTEP Energy.zip
Again looking forward to your kind response
Excuse me, I would like to know how to let Materials Studio generate the pdos_bin
file. So far I have only seen pdos_weight
, and I don’t know it it is the same as pdos_bin
yet
Hi dear. you can generate it by selecting the pdos option and you can find it in the same folder where you calculate the DOS calculations. I hope this information will help you.
Sorry I forgot to reply to your request @sajidurehman. Hope that you have sorted it out. All you need is the pdos_calculate_weights
tag in the param
file input to CASTEP. I don't have access to Materials Studio so I am not able to help with any queries regardding that.
Thank you for your kind reply @zhubonan. Yes I somehow sorted it out.
Great, then I will close the issue now.
Hi Bonan Zhu, First of all Happy New and stay blessed. I am a PhD student and using CASTEP interface in Materials Studio for my research. I want to study the projected band structure of heterostructures but unfortunately there is no such option in Materials Studio. Although, I can calculate the pdos by using OptaDOS of Materials Studio files ( .bands, .cell and .pdos_bin). In a similar way, I tried to use the .band and .cell (from spectral band structure calculation) and .pdos_bin (from pdos calculation because CASTEP interface in Materials Studio doesn't generate the .pdos_bin in spectral band structure calculation). But i got the following error. Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
May be there is some error while reading the .pdos_bin file. Then, I come to know with castepxbin we can read the .pdos_bin file. I am not much familiar with coding. So, i don't know how to use castepxbin to read the .pdos_bin file. Could you please help me in this regards? Thank you in advance. Looking forward to your kind response.
Best Wishes Sajid