def CalculatePlatt(mol):
    """
    Calculation of Platt number in a molecule
        Parameters:
            mol: RDKit molecule object
        Returns:
            Platt: Platt number
    """
    cc = [x.GetBeginAtom().GetDegree() + x.GetEndAtom().GetDegree() - 2 for x in mol.GetBonds()]
    return sum(cc)