mcu icon indicating copy to clipboard operation
mcu copied to clipboard

How to plot optical transition probability from WAVEDER file obtained during optical run in VASP?

Open Haysun opened this issue 5 years ago • 13 comments

Dear Quang Pham, I installed the "NumPy, matplotlib, spglib, scipy" libraries in the Anaconda environment. When I run the mcu / mcu / vasp / utils.py program to process WAVEDER files, Pycharm prompts an error: " from ..utils.misc import check_exist; ImportError: attempted relative import with no known parent package ", I do n’t know where the error occurred, thank you for your help.

Haysun avatar May 30 '20 07:05 Haysun

error

Haysun avatar May 30 '20 07:05 Haysun

Did you add mcu to the Python path? for example: export PYTHONPATH=$HOME/mcu:$PYTHONPATH

with $HOME/mcu in the parent folder ($HOME/mcu/mcu is the source code) Sorry for the late response. Thing was a bit chaotic here in the last few days in Minneapolis.

hungpham2017 avatar Jun 03 '20 18:06 hungpham2017

@hungpham2017 ,Thank you very much for your reply. I have added mcu to my Python path, but I still get an error when running the program. Is it because I did not have a WAVDERF file? In addition, I am looking forward to your upcoming new version of MCU with many new functions as well as a pip and conda install.

Haysun avatar Jun 05 '20 07:06 Haysun

Just now I realized that you actually ran the program on Window. I have only tested MCU on Linux. So the latest version in the dev branch. The reason why I have not merged it to the master branch because I have not had time to document it. A new documentation and the code need to be released at the same time. My plan is to get all of these done by the end of June. For now, I will keep this issue open and labeled it as an enhancement request.

hungpham2017 avatar Jun 05 '20 15:06 hungpham2017

1591520478

Haysun avatar Jun 07 '20 09:06 Haysun

It looks like it is not the way you should call the function. But sure, please email me with your data. And If possible what you would like to do if the CDER obtained from the WAVEDER file. The reason why I ask this question is that I can imagine you will perform some post-analysis using CDER tensor. So it would be easier to just do all the calculations in a Python script that I am happy to assist to write it for your purpose. This would be included in the future function (post analysis of WAVEDER) if you dont mind. For now, I will be closing this issue.

hungpham2017 avatar Jun 08 '20 19:06 hungpham2017

@hungpham2017 ,Dear hungpham,I called the read_WAVEDER(file='WAVEDER') function in the program, but the result did not appear cder, I do not know what went wrong, I hope to get your help, thank you very much. 微信图片_20200615232111

Haysun avatar Jun 15 '20 15:06 Haysun

This looks correct to me. I did not put a print function to print out cder because I assumed you would do computation directly by modifying my python script. If you would like to have further assistance, can you tell me what you are planning to compute with the cder tensor. I can help modify it.

hungpham2017 avatar Jun 29 '20 17:06 hungpham2017

never mind, you actually said it in the title. I will send you a modified script with the plotting optical transition probability if you still need it. Please give me a few days, I am kinda distracted by my other projects.

hungpham2017 avatar Jun 29 '20 17:06 hungpham2017

@hungpham2017 ,Dear hungpham,Thank you very much for your kind help. I really need your script to get the optical transition probability, which will greatly help me understand the knowledge of physical optics. I look forward to receiving your modified script. But it doesn't matter when you have free time.

Haysun avatar Jul 02 '20 08:07 Haysun

@hungpham2017. Good day. Thank you so much for your mcu script. please, i need assistance on how to plot optical transition.

ibituns avatar Sep 21 '22 00:09 ibituns

never mind, you actually said it in the title. I will send you a modified script with the plotting optical transition probability if you still need it. Please give me a few days, I am kinda distracted by my other projects.

Sir, am also in need of this.

ibituns avatar Sep 21 '22 00:09 ibituns