AtomList

AtomList[mol]

gives the list of atoms in the molecule represented by mol.

AtomList[mol,patt]

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

AtomList[mol,patt,"prop"]

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

Details and Options

  • Possible values for patt are:
  • "sym"an atom with atomic symbol "sym"
    Atom["sym",rules]an atom with properties described by rules
    MoleculePattern["patt"]an atom pattern defined by the SMARTS string "patt"
    patt1|patt2|an atom matching any of the patti
  • Possible values for "prop" include:
  • "AromaticAtomQ"aromatic atom
    "AtomChirality"absolute atomic chirality as determined using the Cahn-Ingold-Prelog priority rules
    "AtomicNumber"atomic number
    "AtomicSymbol"standard atomic symbol
    "AtomIndex"atom index
    "CIPRank"atom rank computed using the Cahn-Ingold-Prelog priority rules
    "CoordinationNumber"number of explicit bonds for an atom
    "Element"element entity
    "FormalCharge"formal charge
    "GasteigerPartialCharge"Gasteiger partial charge
    "GeometricStericEffectIndex"geometric steric index
    "HeavyAtomCoordinationNumber"number of bonds to heavy atoms
    "HydrogenCount"hydrogen count
    "ImplicitHydrogenCount"implicit hydrogen count
    "Isotope"isotope entity
    "MassNumber"mass number
    "MMFFPartialCharge"MMFF partial charge
    "MostAbundantMassNumber"mass number for the most commonly occurring isotope
    "OrbitalHybridization"orbital hybridization
    "PiElectronCount" electron count
    "RingAtomQ"ring membership
    "TopologicalStericEffectIndex"topological steric index
    "UnpairedElectronCount"unpaired electron count
    "UnsaturatedAtomQ"unsaturated atom
    "Valence"atomic valence
  • With the default option setting IncludeHydrogensAll, all atoms will be returned by AtomList. Use the option value "ExplicitOnly" to exclude implicit hydrogens.

Examples

open allclose all

Basic Examples  (2)

Get all the atoms from a molecule:

Get only the carbon atoms:

Get the atom index for the carbon atoms:

Get the atom index, partial charge and coordinates for the carbon atoms:

Get only the non-carbon atoms:

Retrieve multiple properties for atoms matching a pattern:

Scope  (2)

Find the atom index for all carbon atoms in rings:

Feed the results to MoleculePlot to highlight them:

Find unsaturated atoms with partial negative charge:

Highlight the matching atoms:

Options  (2)

IncludeHydrogens  (2)

AtomList will return 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:

Hydrogen atoms can often be omitted when their presence can be inferred by normal valence rules. Use IncludeHydrogens"ExplicitOnly" to include only the atoms listed explicitly:

Possible Issues  (1)

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

To exclude implicit hydrogen atoms, use:

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

The resulting molecule contains a single atom with unpaired electrons:

Neat Examples  (1)

Fnd the hybridization of all non-hydrogen atoms:

Use GroupBy to group the atom indices by their corresponding hybridization:

Use the result to create an annotated 3D plot highlighting orbital hybridization:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_atomlist, organization={Wolfram Research}, title={AtomList}, year={2020}, url={https://reference.wolfram.com/language/ref/AtomList.html}, note=[Accessed: 22-December-2024 ]}