materialsproject / reaction-network

Reaction Network is a Python package for predicting likely inorganic chemical reaction pathways using graph theoretical methods. Project led by @mattmcdermott (formerly at Berkeley Lab).
https://materialsproject.github.io/reaction-network/
Other
86 stars 17 forks source link

[BUG] GibbsComputedEntry.from_structure creates unexpected input for phase diagrams when input structure contains Species in its composition #275

Closed amalie-trewartha closed 1 year ago

amalie-trewartha commented 1 year ago

When from_structure is called using a structure object with Species in its composition as input, the resulting GibbsComputedEnergy object will have a composition with Species objects. This will then cause creation of phase diagrams using that entry to fail to identify the correct chemsys. This could be fixed by changing line 273 in gibbs.py to; composition = Composition(structure.composition).element_composition

mattmcdermott commented 1 year ago

@amalie-trewartha Thanks for the catch, Amalie! I was able to recreate the bug and fix it with your suggestion.

mattmcdermott commented 1 year ago

Closed with #276