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

  • AlkaneName
  • AlkaneQ
  • AtomChirality
  • AtomSelector3D
  • AtomSelector
  • BohrModelPlot
  • BondStereo
  • 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
  • RandomAlkane
  • RandomMolecule
  • RingMoleculeQ
  • RingPattern
  • SmilesPlot
  • StereoisomersQ
WolframChemistry`ChemistryFunctions`
MoleculePatternQ
​
MoleculePatternQ
[patt]
returns
True
if patt is a valid
MoleculePattern
object and
False
otherwise.
​
Details and Options

Examples  
(2)
Basic Examples  
(2)
Test whether a molecule pattern is valid:
In[1]:=
MoleculePatternQ
[MoleculePattern[{"C","C"},{Bond[{1,2},"Single"]}]]
Out[1]=
True
Not all patterns are valid:
In[2]:=
MoleculePatternQ
[MoleculePattern[{"C","C"},{Bond[{1,2},"Snigle"]}]]
Out[2]=
False
​
When given invalid input,
MoleculePattern
will return unevaluated, as is common in Wolfram Language functions:
In[1]:=
patt1=MoleculePattern["C^2+"]
Out[1]=
MoleculePattern[C^2+]
In[2]:=
patt2=MoleculePattern["[C+2]"]
Out[2]=
MoleculePattern
Atoms: 1
Bonds: 0

Both the valid and invalid formula have the head
MoleculePattern
:
In[3]:=
Head/@{patt1,patt2}
Out[3]=
{MoleculePattern,MoleculePattern}
Use MoleculePatternQ to distinguish them:
In[4]:=
MoleculePatternQ
/@{patt1,patt2}
Out[4]=
{False,True}
SeeAlso
MoleculeQ
 
▪
MoleculePattern
 
▪
ChemicalFormulaQ
 
▪
PatternReactionQ
RelatedGuides
▪
Wolfram Chemistry Functions
""

© 2025 Wolfram. All rights reserved.

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