def Hcombustion(atoms, Hf=None, HfH2O=-<NUM_LIT>, HfCO2=-<NUM_LIT>,<EOL>HfSO2=-<NUM_LIT>, HfBr2=<NUM_LIT>, HfI2=<NUM_LIT>, HfHCl=-<NUM_LIT>,<EOL>HfHF=-<NUM_LIT>, HfP4O10=-<NUM_LIT>, HfO2=<NUM_LIT:0>, HfN2=<NUM_LIT:0>):
if not Hf or not atoms:<EOL><INDENT>return None<EOL><DEDENT>nC, nH, nN, nO, nS, nBr, nI, nCl, nF, nP = <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0><EOL>if '<STR_LIT:C>' in atoms and atoms['<STR_LIT:C>'] != <NUM_LIT:0>:<EOL><INDENT>nC = atoms['<STR_LIT:C>']<EOL><DEDENT>else:<EOL><INDENT>return None  <EOL><DEDENT>if '<STR_LIT:H>' in atoms:<EOL><INDENT>nH = atoms['<STR_LIT:H>']<EOL><DEDENT>if '<STR_LIT:N>' in atoms:<EOL><INDENT>nN = atoms['<STR_LIT:N>']<EOL><DEDENT>if '<STR_LIT:O>' in atoms:<EOL><INDENT>nO = atoms['<STR_LIT:O>']<EOL><DEDENT>if '<STR_LIT:S>' in atoms:<EOL><INDENT>nS = atoms['<STR_LIT:S>']<EOL><DEDENT>if '<STR_LIT>' in atoms:<EOL><INDENT>nBr = atoms['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT:I>' in atoms:<EOL><INDENT>nI = atoms['<STR_LIT:I>']<EOL><DEDENT>if '<STR_LIT>' in atoms:<EOL><INDENT>nCl = atoms['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT:F>' in atoms:<EOL><INDENT>nF = atoms['<STR_LIT:F>']<EOL><DEDENT>if '<STR_LIT:P>' in atoms:<EOL><INDENT>nP = atoms['<STR_LIT:P>']<EOL><DEDENT>nO2_req = nC + nS + nH/<NUM_LIT> + <NUM_LIT:5>*nP/<NUM_LIT> - (nCl + nF)/<NUM_LIT> - nO/<NUM_LIT><EOL>nCO2 = nC<EOL>nBr2 = nBr/<NUM_LIT><EOL>nI2 = nI/<NUM_LIT><EOL>nHCl = nCl<EOL>nHF = nF<EOL>nSO2 = nS<EOL>nN2 = nN/<NUM_LIT><EOL>nP4O10 = nP/<NUM_LIT><EOL>nH2O = (nH - nCl - nF)/<NUM_LIT><EOL>Hc = (nBr2*HfBr2 + nI2*HfI2) + (nHCl*HfHCl + nHF*HfHF) + nSO2*HfSO2 +nN2*HfN2 + nP4O10*HfP4O10 + nH2O*HfH2O - nO2_req*HfO2 + nCO2*HfCO2 - Hf<EOL>return Hc<EOL>
Calculates the heat of combustion, in J/mol.
    Value non-hydrocarbons is not correct, but still calculable.

    Parameters
    ----------
    atoms : dict
        Dictionary of atoms and their counts, []
    Hf : float
        Heat of formation of given chemical, [J/mol]
    HfH2O : float, optional
        Heat of formation of water, [J/mol]
    HfCO2 : float, optional
        Heat of formation of carbon dioxide, [J/mol]
    HfSO2 : float, optional
        Heat of formation of sulfur dioxide, [J/mol]
    HfBr2 : float, optional
        Heat of formation of bromine, [J/mol]
    HfI2 : float, optional
        Heat of formation of iodine, [J/mol]
    HfHCl : float, optional
        Heat of formation of chlorine, [J/mol]
    HfHF : float, optional
        Heat of formation of hydrogen fluoride, [J/mol]
    HfP4O10 : float, optional
        Heat of formation of phosphorus pentoxide, [J/mol]
    HfO2 : float, optional
        Heat of formation of oxygen, [J/mol]
    HfN2 : float, optional
        Heat of formation of nitrogen, [J/mol]

    Returns
    -------
    Hc : float
        Heat of combustion of chemical, [J/mol]

    Notes
    -----
    Default heats of formation for chemicals are at 298 K, 1 atm.

    Examples
    --------
    Liquid methanol burning

    >>> Hcombustion({'H': 4, 'C': 1, 'O': 1}, Hf=-239100)
    -726024.0