The Wolfram Plugin for ChatGPT
Jason Sonnenberg, Wolfram Technology Conference, Oct. 31, 2023
A concise guide to harnessing the possibilities of the Wolfram plugin for chemistry.

Cell coloring conventions

Overall statements.
Take-home message.
Quote from the literature.
(Note that the arXiv ID shows the publication data, e.g. arxiv.org/2307.05782 was published in July.)
ChatGPT textual or code answer.
Screenshot extracted from the quoted literature.
User prompt​
...
ChatGPT answer URL (ChatGPT September 25 Version)

Chemical Literature

The Future of Chemical Education & Research

Hopes
Overcoming Language Barriers
Personalized Learning
Real-time Feedback
Concerns
Assessment Challenges
Equitable Accessibility
Deterministic vs. Probabalistic Tools
J. Chem. Ed., 2023, 100, 8, 2965.

Shortcomings of ChatGPT

Issues
Hopeless at Math
Makes Stuff Up
J. Chem. Ed., 2023, 100, 8, 3098.

ChatGPT Needs a Chemistry Tutor Too

Final Exam Results
Scored 37% or lower on 27 questions
Independent of question format
May not be able to explain answer
J. Chem. Ed., 2023, 100, 10, 3859.

Wolfram|Alpha

Topical Coverage

Acids & Bases, Atoms, Chemical Reactions, Chemical Solutions, Colligative Properties, Concentration, Conversions, Equilibrium, Gases, Kinetics, Molecules, Quantum Chemistry, Structure & Bonding and Thermodynamics
Input interpretation:
convert 5​mL of 1.50​mM magnesium hydroxide to molecules of magnesium hydroxide
Result:
Step-by-step
4.517×
18
10
molecules
Input interpretation:
Cl
2
(g)
gaseous
chlorine
+
-
OH
(aq)
aqueous
hydroxide
anion
⟶
-
Cl
(aq)
aqueous
chloride
anion
+
-
Cl
O
3
(aq)
aqueous
chlorate
anion
+
H
2
O (l)
liquid
water
balanced equation
Result:
Step-by-step
3
Cl
2
(g)+6
-
OH
(aq) ⟶ 5
-
Cl
(aq)+
-
Cl
O
3
(aq)+3
H
2
O (l)
Input interpretation:
SO
Cl
2
thionyl
chloride
+
2-
S
O
3
sulfite
anion
⟶
S
O
2
sulfur
dioxide
+
-
Cl
chloride
anion
rate of reaction
Result:
Step-by-step
rate-
Δ[SO
Cl
2
]
Δt
-
Δ[
2-
S
O
3
]
Δt

1
2
Δ[S
O
2
]
Δt

1
2
Δ[
-
Cl
]
Δt
(assuming constant volume and no accumulation of intermediates or side products)
Input interpretation:
KI (aq)
aqueous
potassium
iodide
+
Pb
(N
O
3
)
2
(aq)
aqueous
lead(II)
nitrate
⟶
Pb
I
2
(s)
solid
lead
iodide
+
KN
O
3
(aq)
aqueous
potassium
nitrate
equilibrium constant
Result:
Step-by-step
K
c

2
[KN
O
3
]
2
[KI]
[Pb
(N
O
3
)
2
]

Calculators

Computational Inputs:
Assuming dilution equation | Use
ideal dilution equation
instead
Calculate
final concentration | ▾
• initial concentration:
5 mol/L
• initial volume:
0.03 L
• final volume:
1.5 L
Compute
Equation:
Step-by-step solution
c
i
V
i

c
f
V
f
c
f
final concentration
c
i
initial concentration
V
i
initial volume
V
f
final volume
(assuming solutions contain the same chemicals and concentration units)
Result:
More units
Step-by-step solution
final concentration
0.1​M(molar)
= 100​mol/
3
m
(moles per cubic meter)
= 0.1​mol/
3
dm
(moles per cubic decimeter)
Concentration space plot:
possible dilutions
desired concentration
(mole per liter concentration units)
Acids & Bases
Gases
Buffer
pH
Avogadro's law
Dilution
pKa
Boyle's law
Mass density
pOH
Charles's law
Quantum Mechanics
Strong acid-base
titration
Combined gas law
de Broglie wavelength
Colligative Properties
Gay-Lussac's law
Heisenberg
uncertainty principle
Boiling point elevation
Graham's law
Photon energy
Freezing point
depression
Graham's law flux
ratio
Photon wavelength
Osmotic pressure
Ideal gas heat
capacity
Planck distribution
Raoult's law
Ideal gas internal
energy
Reduced mass
van 't Hoff factor
Ideal gas law
Rydberg formula
Conversions
Mean free path
Wien displacement
law
Atoms to moles
Monoatomic ideal
gas entropy
Spectroscopy
Celsius to Fahrenheit
Peng-Robinson
equation of state
Beer-Lambert law
Celsius to Kelvin
Redlich-Kwong
equation of state
Bragg's law
DNA concentration to
mass fraction
van der Waals
equation of state
Thermodynamics
DNA mass to moles
van der Waals
compressibility
factor
Adiabatic process
Grams to moles
Kinetics
First law of thermod
ynamics
Molarity to density
Arrhenius equation
Heat capacity ratio
Percent yield
Arrhenius number
Heat transfer
ppb to ppm
Hill equation
Isobaric process
ppm conversion
Radioactive decay
Isochoric process
Electrochemistry
Liquids
Isothermal process
Nernst equation
Antiknock index
Kinetic energy

Wolfram Language

Chemical Formulas

Chemical Structures

Chemical Conversions

Chemical Reactions

BALANCING REACTIONS

SYNTHESIS—BROMINATION OF ALKENES

Plugin Usage Examples

General Prompts

• It may be helpful to look up the syntax for the chemistry functions that you plan to use before executing code. You don’t need to report what you learn from looking up the syntax.
• When solving chemical equilibrium problems, include an equilibrium table in the output.
• If chemical conversions are required, try Wolfram|Alpha first before writing Wolfram Language code.

Chemical Structure

PHENOL

User prompt​
What is the structure of phenol?

ALLICIN

User prompt​
Display the space filling, ball and stick, tubes and wireframe plots for allicin next to each other. It may be helpful to look up the syntax for the chemistry functions that you plan to use before executing code. You don’t need to report out what you learn from looking up the syntax.

Molecular Properties

NORMAL BOILING POINT


  • Prompt—2022 U.S. National Chemistry Olympiad (Q15)
  • User prompt​
    Which compound has the lowest normal boiling point? A) HF B) HCl C) HBr D) HI

    Elemental Composition

    MULTIPLE CHOICE

    
  • 2022 Chemistry Olympiad question (Q1)
  • User prompt​
    Which potassium salt is 28.9% chlorine by mass? a) KCl, b) KClO, C) KClO2, d)KClO3. Be sure to look up any necessary chemical or elemental data and let Wolfram do any math.

    HYDROGEN IN ATP

    User prompt​
    What is the mass percent of hydrogen in ATP?

    Chemical Conversion

    SULFUR IN PYRITE

    
  • 2022 Chemistry Olympiad question (Q2)
  • User prompt​
    How many sulfur atoms are in 3.00 g of iron pyrite, FeS2? Be sure to look up any necessary chemical or elemental data and let Wolfram do any math.

    MASS TO MOLES WITH UNCERTAINTY

    User prompt​
    Convert 7.23+-0.0001 g sucrose to moles. Remember that Wolfram Alpha understands uncertainty.

    Reaction Balancing

    INORGANIC

    User prompt​
    Balance the chemical reaction Ca(AlO2)2 + HCl -> AlCl3 + CaCl2 + H2O

    ORGANIC

    User prompt​
    Balance the reaction between methane and oxygen to form water and CO2

    Test Bank Generation

    IDEAL GAS LAW

    User prompt​
    I need your help generating multiple versions of homework problems. For each problem, generate three other versions of the question. Keep the same number of significant digits as the original problem and ensure that each digit is different in each problem.
    ​
    At what temperature does 16.3 g of nitrogen gas have a pressure of 1.25atm in a 25.0 L tank?
    ​
    What are the answers for the problems? Be sure to look up any necessary chemical or elemental data along with constants and let Wolfram do any math.

    Code Assistant

    BUILDING MOLECULE PATTERN OBJECTS

    User prompt​
    Read in the usage for MoleculePattern and Bond. Then write code to create an association of five common functional groups where the keys are the group name such as hydroxyl, carbonyl, thiol, etc and the values are the corresponding MoleculePattern for each. When building the molecule pattern objects do not use SMARTS patterns.

    Useful Links