def delta_E( reactants, products, check_balance=True ):
    """
    Calculate the change in energy for reactants --> products.
    
    Args:
        reactants (list(vasppy.Calculation): A list of vasppy.Calculation objects. The initial state.
        products  (list(vasppy.Calculation): A list of vasppy.Calculation objects. The final state.
        check_balance (bool:optional): Check that the reaction stoichiometry is balanced. Default: True.

    Returns:
        (float) The change in energy.
    """
    if check_balance:
        if delta_stoichiometry( reactants, products ) != {}:
            raise ValueError( "reaction is not balanced: {}".format( delta_stoichiometry( reactants, products) ) )
    return sum( [ r.energy for r in products ] ) - sum( [ r.energy for r in reactants ] )
Calculate the change in energy for reactants --> products.
    
    Args:
        reactants (list(vasppy.Calculation): A list of vasppy.Calculation objects. The initial state.
        products  (list(vasppy.Calculation): A list of vasppy.Calculation objects. The final state.
        check_balance (bool:optional): Check that the reaction stoichiometry is balanced. Default: True.

    Returns:
        (float) The change in energy.