BondCount

BondCount[mol]

gives the number of bonds in the molecule mol.

BondCount[mol,patt]

gives the number of bonds in the molecule mol matching the bond pattern patt.

Examples

Basic Examples  (2)

Count the bonds in a molecule:

Count the number of double bonds:

Count the number of double bonds involving oxygen:

Count the number of cyclic bonds involving a nitrogen atom:

Introduced in 2019
 (12.0)