BondList

BondList[mol]

gives the list of bonds in the molecule mol.

BondList[mol,patt]

gives the list of bonds in the molecule mol matching the atom pattern patt.

BondList[mol,patt,"prop"]

gives the value for the specified property of the bonds matching patt.

Details and Options

  • Possible values for patt are:
  • "order"a bond with a specified bond order
    Bond[{a1,a2},"order"]a bond with atoms defined by ai
    MoleculePattern[]a molecule pattern with one bond
    patt1|patt2|a bond matching any of the patti
  • The ai may be an atom index or a pattern representing an atom.
  • Possible values for "prop" include:
  • "BondIndex"bond index
    "BondLength"Euclidean distance between the given atoms
    "BondType"bond type
    "ConjugatedBondQ"conjugated bond

Examples

Basic Examples  (3)

Get all the bonds from a molecule:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Get only the carbon-carbon bonds:

In[3]:=
Click for copyable input
Out[3]=

Get only the double bonds:

In[4]:=
Click for copyable input
Out[4]=

Get only the carbon-carbon double bonds:

In[5]:=
Click for copyable input
Out[5]=

Use a pattern to find all bonds between ring atoms and atoms not in a ring:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Give the results to MoleculePlot to visualize the bonds in place:

In[3]:=
Click for copyable input
Out[3]=

Compare bond lengths for different types of carbon bonds:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Introduced in 2019
(12.0)