def delta_stoichiometry( reactants, products ):
    """
    Calculate the change in stoichiometry 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.

    Returns:
        (Counter): The change in stoichiometry.
    """ 
    totals = Counter()
    for r in reactants:
        totals.update( ( r * -1.0 ).stoichiometry )
    for p in products:
        totals.update( p.stoichiometry )
    to_return = {}
    for c in totals:
        if totals[c] != 0:
            to_return[c] = totals[c]
    return to_return
def delta_stoichiometry ( reactants , products ) : totals = Counter ( ) for r in reactants : totals . update ( ( r * - 1.0 ) . stoichiometry ) for p in products : totals . update ( p . stoichiometry ) to_return = { } for c in totals : if totals [ c ] != 0 : to_return [ c ] = totals [ c ] return to_return
Calculate the change in stoichiometry 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.

    Returns:
        (Counter): The change in stoichiometry.