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 forms for patt include:
  • "type"a bond with a specified bond type
    Bond[{a1,a2},"type"]a bond with atoms defined by ai
    MoleculePattern[]a molecule pattern with one bond
  • 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
  • With the default option setting IncludeHydrogensAll, all bonds will be returned by BondList. Use the option value "ExplicitOnly" to exclude bonds to implicit hydrogen atoms.

Examples

open allclose all

Basic Examples  (3)

Get all the bonds from a molecule:

Get only the carbon-carbon bonds:

Get only the double bonds:

Get only the carbon-carbon double bonds:

Use a pattern to find all exocyclic bonds:

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

Compare bond lengths for different types of carbon bonds:

Options  (1)

IncludeHydrogens  (1)

BondList will include all atoms by default:

Use IncludeHydrogensNone to exclude the hydrogens, which make up the majority of atoms:

This is equivalent to using a pattern excluding hydrogen atoms:

Possible Issues  (2)

Aromatic bonds are displayed visually as single or double bonds:

Asking for the number of "Double" bonds does not include aromatic bonds:

Convert the aromatic bonds to single/double using MoleculeModify before taking the count:

Because Molecule will try to fill valences with hydrogen atoms, hydrogen atoms will be included in the count even if they were not in the original molecule expression:

To exclude implicit hydrogen atoms, use IncludeHydrogens"ExplicitOnly":

Alternatively, to stop hydrogen atoms from appearing, use the Molecule option ValenceFillingNone:

The resulting molecule contains a single atom with no bonds:

Neat Examples  (1)

Create a molecule using data retrieved from "PubChem" using an ExternalIdentifier:

Create a Dataset showing the bond types present and their average bond lengths:

Wolfram Research (2019), BondList, Wolfram Language function, https://reference.wolfram.com/language/ref/BondList.html (updated 2020).

Text

Wolfram Research (2019), BondList, Wolfram Language function, https://reference.wolfram.com/language/ref/BondList.html (updated 2020).

CMS

Wolfram Language. 2019. "BondList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/BondList.html.

APA

Wolfram Language. (2019). BondList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BondList.html

BibTeX

@misc{reference.wolfram_2024_bondlist, author="Wolfram Research", title="{BondList}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/BondList.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_bondlist, organization={Wolfram Research}, title={BondList}, year={2020}, url={https://reference.wolfram.com/language/ref/BondList.html}, note=[Accessed: 21-November-2024 ]}