MPAqueousCompatibility applies hydrate correction to non-hydrate materials

I have a question of the hydrate correction used in MaterialsProjectAqueousCompatibility. I looked at the source code, and it seems any H and O containing compounds are classified as hydrate, i.e., containing H2O in its structure. Here is the code:
Screen Shot 2023-03-08 at 3.44.22 PM

I realized that it would also treat non-hydrate materials as hydrate, such as LiOH. I suppose the correction will treat LiOH as Li2O + H2O, but I am not sure if it physically makes sense. Why is the hydrate correction set up in this way?

Thank you.

1 Like

Hi @johan28 , you are correct that the correction is supposed to be applied to any composition that has H2O in its structure. However, it only applies when there are whole H2O units in the formula. LiOH would not receive this correction because int(0.5)=0.

It is definitely possible that this correction will be erroneously triggered on some materials that contain H2O units but are not really hydrates. However there is really no way to tell from the composition, we would have to do much more sophisticated (and computationally slower) inspection of the Structure to make a more educated guess about when we have a hydrate vs. not.

When developing MaterialsProjectAqueousCompatibility, we decided it was importnant to keep the correction scheme composition-based (rather than structure-based), and we made a judgment call, based on looking at predicted vs. experimental Pourbaix diagrams, that it was better to err on the side of applying the correction whenever we saw H2O in the formula and risking some non-hydrates getting it than to risk missing applying it to hydrated structures.

I hope that makes sense.

Thank you for the clarification! Just to add one more comment that for LiOH that I was looking at , it has composition Li2H2O2 (mp-23856-GGA), and therefore, the hydrate correction will be added.

Thank you for the clarification! Just to add one more comment that for LiOH that I was looking at , it has composition Li2H2O2 (mp-23856-GGA), and therefore, the hydrate correction will be added.

Ah, I see. You bring up a good point. So it might be more robust to this check against the reduced_composition rather than the composition, e.g.

nH2O = int(min(comp.reduced_composition["H"] / 2.0, comp.reduced_composition["O"]))

That way nH2O would be zero for a structure like LiOH. Iā€™m going to open a PR to change this; thank you for reporting this bug!