fuellib.rdk.mol.has_branch

fuellib.rdk.mol.has_branch(mol)

Check if mol contains any branches.

A branch is identified by an atom bonded to more than two neighbors (degree > 2) after removing explicit hydrogens. If such an atom is not part of a ring, it is a branch point. If it is part of a ring, it is only considered a branch point if at least one of its neighbors lies outside the ring (i.e., a substituent hanging off the ring), since ring atoms themselves commonly have degree > 2 without representing a branch (i.e., fused-ring systems).

Parameters:

mol (Mol) – RDKit Mol object.

Returns:

True if the molecule contains any branches, False otherwise.

Return type:

bool