kumagai-group / pydefect

Python library for point-defect calculations in non-metallic solids based on first-principle calculations with the VASP code.
https://kumagai-group.github.io/pydefect/
MIT License
46 stars 18 forks source link

KeyError: 'MgAl2O4' #8

Closed Arindamsannyal closed 1 year ago

Arindamsannyal commented 1 year ago

Dear Sir

I am trying to calculate defect formation energy by following the tutorial on pydefect on MgAl2O4 system as provided in the following link

https://kumagai-group.github.io/pydefect/tutorial.html#

In Step 4 of the Calculation of competing phases, after the VASP calculation, I was able to generate the standard_energies.yaml and relative_energies.yaml files. However, when I tried the 'pydefect cv -t MgAl2O4' command to generate the chemical potential diagram, it gives a key error as 'KeyError: 'MgAl2O4''. I have attached the screenshot of the error. Can you please suggest to me how to resolve the error?

Thank you very much.

Best regards Arindam Sannyal

Capture

yuuukuma commented 1 year ago

Dear Arindam Sannyal,

thank you for your post. Could you check if your relative_energies.yaml includes "MgAl2O4"?

Here is an example of mine.

Al2O3: -3.1489629
Mg17Al12: -0.021573085977011353
MgAl2: -0.011912545555555099
MgAl2O4: -3.0959495723809525
MgO: -2.8267036658333335
Arindamsannyal commented 1 year ago

Dear Sir

Thank you very much for your prompt response. Yes, Sir, my relative_energies.yaml file includes the "MgAl2O4" as in the attached figure.

Capture

yuuukuma commented 1 year ago

Okay, then MgAl2O4 should not be energetically stable at 0K in your calculations. In other word, it does not appear in the chemical potential diagram.

Could you artificially reduce the energy of MgAl2O4 by -1.0 eV for example, and run the same command?

I should show an adequate error message.

Arindamsannyal commented 1 year ago

Dear Sir

As you suggested, I have artificially reduced the energy of MgAl2O4 by -1.0 eV. Capture

Now the 'pydefect cv -t MgAl2O4' command gives the AssertionError as follows Capture

Sir, I would like to mention that the energies calculated from my VASP calculations deviate by ~0.3 eV from those shown in the tutorial. Thank you very much.

Best regards Arindam Sannyal

yuuukuma commented 1 year ago

Could you remove H3N and NO2, please?

Arindamsannyal commented 1 year ago

Dear Sir

Removing the H3N and NO2 successfully generates the chemical potential diagram. Thank you very much, Sir.

Best regards Arindam Sannyal