AtomList

AtomList[mol]

gives the list of atoms in the molecule 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
    "RingMemberQ"ring member
    "TopologicalStericEffectIndex"topological steric index
    "UnpairedElectronCount"unpaired electron count
    "UnsaturatedAtomQ"unsaturated atom
    "Valence"atomic valence

Examples

open all close all

Basic Examples  (4)

Get all the atoms from a molecule:

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

Get only the carbon atoms:

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

Get only the non-carbon atoms:

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

Get property values for atoms matching a pattern:

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

Feed the results to MoleculePlot to highlight them:

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

Find unsaturated atoms with partial negative charge:

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

Retrieve multiple properties for atoms matching a pattern:

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

Scope  (1)

Introduced in 2019
(12.0)