Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

ChemistryFunctions

Guides

  • Wolfram Chemistry Functions

Symbols

  • AtomSelector3D
  • AtomSelector
  • BohrModelPlot
  • ChemicalFormulaQ
  • ChemicalReactionQ
  • ConstitutionalIsomersQ
  • DiastereomersQ
  • EmbeddedMoleculeQ
  • EmpiricalFormula
  • EmptyMoleculeQ
  • EnantiomersQ
  • EpimersQ
  • FormatMoleculesAsGraphics
  • HydrocarbonQ
  • ImportComputationalChemistryData
  • IonCounts
  • MoleculeDelete
  • MoleculeGridPlot3D
  • MoleculeGridPlot
  • MoleculeJoin
  • MoleculeManipulate3D
  • MoleculeManipulate
  • MoleculeMirrorPlot3D
  • MoleculePatternQ
  • MoleculePlotOptions
  • MoleculeScaffold
  • MoleculeSubstructureMatches
  • PatternReactionQ
  • PeriodicTablePlot
  • RandomMolecule
  • RingMoleculeQ
  • RingPattern
  • SmilesPlot
  • StereoisomersQ
WolframChemistry`ChemistryFunctions`
RingPattern
​
RingPattern
[{
a
1
,
a
2
,…}]
returns a molecule pattern with the
a
i
arranged in a ring.
​
​
RingPattern
[n]
returns a molecule pattern representing an
n
-membered ring.
​
Details and Options

Examples  
(3)
Basic Examples  
(3)
Find the positions of all 5-membered rings in adenosine:
In[1]:=
FindMoleculeSubstructureMolecule["adenosine"],
RingPattern
[5],All
Out[1]=
{16,27,38,49,510,111,212,313,416,518}
Find and highlight 5-membered and 6-membered rings together:
In[2]:=
MoleculePlotMolecule["adenosine"],"5–membered rings"
RingPattern
[5],"6–membered rings"
RingPattern
[6]
Out[2]=
Contents cannot be rendered at this time; please try again later
​
Create a pattern for a 6-membered ring containing at least one oxygen atom:
In[1]:=
MoleculePlotMolecule["O=C([C@@H]1O[C@@H](O[P@](=O)(O[P@@](=O)(OC[C@H]2O[C@H](N3CN=C4C3=NCN=C4N([H])[H])C(=O)C2=O)O[H])O[H])C(=O)C(=O)C1=O)[H]"],​​
RingPattern
[{"O",_,_,_,_,_}]
Out[1]=
Contents cannot be rendered at this time; please try again later
​
Define a ring pattern using a list of atom types:
In[1]:=
patt=
RingPattern
[{"C","C","O",_,"N",_}]
Out[1]=
MoleculePattern
Atoms: 6
Bonds: 6

Search through a list of molecules for the pattern:
In[2]:=
SeedRandom[1234];​​Select
RandomMolecule
[300],MoleculeContainsQ[patt]
Out[2]=
Molecule
Formula:
C
14
Cl
H
15
N
2
O
4
Atoms:
36
Bonds:
38
,Molecule
Formula:
C
15
H
26
N
2
O
3
S
Atoms:
47
Bonds:
49

Visualize the matches:
In[3]:=
MoleculePlot[#,patt]&/@%
Out[3]=
Contents cannot be rendered at this time; please try again later
SeeAlso
MoleculePattern
 
▪
FindMoleculeSubstructure
 
▪
MoleculeContainsQ
RelatedGuides
▪
Wolfram Chemistry Functions
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com