materialsproject / pymatgen

Python Materials Genomics (pymatgen) is a robust materials analysis code that defines classes for structures and molecules with support for many electronic structure codes. It powers the Materials Project.
https://pymatgen.org
Other
1.52k stars 867 forks source link

fix chempot_diagram #4072

Closed yang-ruoxi closed 2 months ago

yang-ruoxi commented 2 months ago

Summary

A strange behavior was caught for chemical potential diagram where the planes were crossed. Using the in-place assignment expression, the plot shows below:

Screenshot 2024-09-17 at 2 38 07 PM

It it not obvious how it could cause the breakage. I spent sometime debugging but with no luck, it could be something much deeper. For now I suggest we revert it to the original form till we have a real solution. Would much appreciate a quick release due to breakage for MP...

shyuep commented 2 months ago

Can you try reverting the entire commit doing the in place assignment change and see if it solves the problem on your machine?

yang-ruoxi commented 2 months ago

reverting this particular line solved the issue. Would you prefer reverting the entire commit for this PR?

shyuep commented 2 months ago

OK, if it already fixes it. I will merge now. Thanks for the fix.

yang-ruoxi commented 2 months ago

thank you!