OEGetLongestUnbranchedCarbonsChainΒΆ

unsigned int OEGetLongestUnbranchedCarbonsChain(const OEChem::OEMolBase &mol)

Returns the size of the longest chain of all carbons in a molecule. An unbranched atom is a chain atom with maximum two connections to other heavy chain atoms. A set of unbranched atoms which are connected together form a chain. A molecule may contain multiple chains which are isolated from each other by non-chain atoms (e.g. ring or branched atoms).

See also

Examples

The OEGetLongestUnbranchedCarbonsChain function returns 4 for the molecule below.

../../_images/uchain_AllC.png

The OEGetLongestUnbranchedCarbonsChain function returns 0 for the molecule below. It is because the unbranched chain does not contain all carbons.

../../_images/uchain_carbons_NotAllC.png