Nitrogen gas temperature correction for reaction energy calculation

Hello MP-community,

I am trying to calculate the reaction energy of a nitride formation reaction, such as Ca3PbN (mp-21128).
For all the reagents, I obtained the most stable computed entries from MP using MPRester; and then I applied correction using the following:

 from pymatgen.entries.compatibility import (
    MaterialsProject2020Compatibility,
    MaterialsProjectCompatibility,
)
...

entries=[Ca3N2,Pb,Ca3PbN,N2]
compat = MaterialsProjectCompatibility()
for entry in entries:
        compat.process_entry(entry)
reactants=[Ca3N2,Pb]
products=[Ca3PbN,N2]

After balancing the reaction, there is a significant ratio of N2 gas (cannot be balanced with only Ca3PbN product):

rxn = ComputedReaction(reactants, products)
rxn.normalize_to(Composition("Pb"))
reaction_energy = rxn.calculated_reaction_energy*96.48 # convert eV/atom into kJ/mol
print(f"reaction: {rxn} \nenergy: {reaction_energy} kJ/mol")
reaction: Ca3N2 + Pb -> Ca3PbN + 0.5 N2 
energy: 814.2693836896226 kJ/mol

I am particularly interested in the role of temperature in these reactions, which should contribute significantly because of gas formation.
There are ways to consider the temperature of the gas by changing its chemical potential, however, I could not see if something like this is implemented in pymatgen library.
I also found there is an Equations of State (EOS) method for MP that can estimate effect of temperature through volume, but it seems to be that is is only applicable to solid structures.

If you have done something similar, could you please share how to consider the temperature contribution?
Thank you very much for consideration.

Hi @Artem_Gabov,

Sorry for the late reply – I am the main author of the reaction-network package where we often do what you are describing. When you use GibbsEntrySet, we use experimental chemical potentials of all elements at the temperature of interest, which would include a more accurate N2 energy that accounts for the temperature effects.

We also have corrections (e.g., for CO2) that factor in partial pressure, which can be important for getting accurate energies of any reactions involving uptake or release of CO2.

Hope this gives you some ideas to play with!