Maple Quantum Chemistry Toolbox
The Maple Quantum Chemistry Toolbox from RDMChem, a separate add-on product to Maple,
is a powerful environment for the computation and visualization of the electronic structure ofmolecules. In Maple 2024, this toolbox has significant new features and enhancements thatenable: (1) Computing electronic energies and properties with a new generalization of density
functional theory that captures static correlation, (2) Running the CoupledCluster andNuclearGradient commands on Windows that were previously available only on macOS andLinux, (3) Harnessing AI through a new command, Chat, that when prompted with a word orphrase, can provide invaluable information about molecules and compounds, electronic
structure methods, as well as other scientific words or concepts, (4) Learning or teaching
about the role of chemistry in art through a new curricular set of lessons entitled "TheChemistry of Art," and (5) Experiencing additional enhancements and improvements
throughout the package.
Note that the Maple Quantum Chemistry Toolbox (QCT) is required in order to execute theexamples in this worksheet.

Generalization of Density Functional Theory
A well known limitation of density functional theory (DFT) is its difficulty in predicting theenergies and properties of molecules with static correlation. Static correlation is importantto the accurate prediction of charges, van der Waals forces, barrier heights, and bi- andmultiradicals. Introduced in QCT 2024 is a generalization of DFT that can treat static
correlation. The new command, RDMFunctional adds a universal correction, based on the 1electron reduced density matrix (1-RDM) rather than the density alone, to any DFT
functional.
While the generalized DFT is applicable to a wide range of molecules, below you can see
the command with the dissociation of the diatomic molecule N2. First, load the
QuantumChemistry package> with QuantumChemistry ;AOLabels, ActiveSpaceCI, ActiveSpaceSCF, AtomicData, BondAngles, BondDistances, Charges,
ChargesPlot, Chat, ContractedSchrodinger, CorrelationEnergy, CoupledCluster, DensityFunctional,
DensityPlot3D, Dipole, DipolePlot, Energy, ExcitationEnergies, ExcitationSpectra,
ExcitationSpectraPlot, ExcitedStateEnergies, ExcitedStateSpins, ExcitonDensityPlot,
ExcitonPopulations, ExcitonPopulationsPlot, FullCI, GeometryOptimization, HartreeFock, Interactive,
Isotopes, LiteratureSearch, MOCoefficients, MODiagram, MOEnergies, MOIntegrals,
MOOccupations, MOOccupationsPlot, MOSymmetries, MP2, MolecularData, MolecularDictionary,
MolecularGeometry, NuclearEnergy, NuclearGradient, OscillatorStrengths, Parametric2RDM,
PlotMolecule, Populations, Purify2RDM, QuantumComputing, RDM1, RDM2, RDMFunctional, RTM1,
ReadXYZ, Restore, Save, SaveXYZ, SearchBasisSets, SearchFunctionals, SkeletalStructure,
SolventDatabase, Thermodynamics, TransitionDipolePlot, TransitionDipoles, TransitionOrbitalPlot,TransitionOrbitals, Variational2RDM, VibrationalModeAnimation, VibrationalModes, Video
Select a set of bond distances from the roots of the sixth-order Chebyshev polynomial> bond_distances d map x

x C 2.0, fsolve expand ChebyshevT 8, x;

bond_distances d 1.01921472, 1.16853039, 1.44442977, 1.80490968, 2.19509032, 2.55557023,
2.83146961, 2.98078528
and define a list of molecular geometries with each geometry corresponding to one of thebond distances> molecules d seq
molecules d"N", 0, 0, 0 , "N", 0, 0, R , R in bond_distances ;"N", 0, 0, 0 , "N", 0, 0, 1.01921472 ,0, 0 , "N", 0, 0, 1.44442977 ,2.19509032 ,"N", 0, 0, 0 , "N", 0, 0, 1.16853039 ,"N", 0, 0, 0 , "N", 0, 0, 1.80490968 ,"N", 0, 0, 0 , "N", 0, 0, 2.55557023 ,"N", 0,"N", 0, 0, 0 , "N", 0, 0,"N", 0, 0, 0 , "N", 0, 0, 2.83146961 ,"N", 0, 0, 0 , "N", 0, 0, 2.98078528
The energies for each geometry may be then readily computed from DensityFunctional with
the Energy command in the Quantum Chemistry package,> energies_dft d seq Energy molecule, method = DensityFunctional, basis = "cc-pVDZ", xc= "B3LYP" , molecule in molecules ;energies_dft d L109.50786339, L109.52331040, L109.37588586, L109.17741963, L109.03358249,
L108.95146495, L108.90997138, L108.89291096
and using polynomial interpolation, generate a polynomial in the bond distance R> pes_dft d interp bond_distances, energies_dft, R ;pes_dft dL0.14339035 R7 C 2.20942302 R6 L 14.44738600 R5 C 51.96535307 R4 L 110.97891955 R3
C 140.38786698 R2 L 96.50876625 R L 81.97856683
Similarly, you can use the new RDMFunctional method in the Energy command> energies_rdm d seq Energy molecule, method = RDMFunctional, basis = "cc-pVDZ", xc= "B3LYP" , molecule in molecules ;energies_rdm d L109.50786339, L109.52331040, L109.37588586, L109.18887170,
L109.10062254, L109.06672079, L109.05806429, L109.05565802
and generate a polynomial in R

> pes_rdm d interp bond_distances, energies_rdm, R ;pes_rdm d 0.00403016 R7 C 0.13029220 R6 L 2.19462464 R5 C 12.96198119 R4 L 38.72108443 R3
C 62.54064536 R2 L 51.32917602 R L 92.88749381

The potential energy curves from DensityFunctional (red) and RDMFunctional (blue) can beplotted together> p_dft d plot pes_dft, R = 1.0 ..2.9, axes = boxed, labels = "Bond Distance (Å)","Energy hartree " ,color = red, thickness = 3, labeldirections = horizontal, vertical:p_rdm d plot pes_rdm, R = 1.0 ..2.9, axes = boxed, labels = "Bond Distance (Å)","Energy hartree " , color = blue, thickness = 3 :plots:-display

p_dft, p_rdm ;L109

Energy (hartree)

L109.1

L109.2

L109.3

L109.4

L109.5
1

1.2

1.4

1.6

1.8
2
2.2
Bond Distance (Å)

2.4

2.6

2.8

While the DFT dissociation curve (red) rises too quickly after 1.8 Å due to its incorrect
treatment of static correlation, the RDMFunctional dissociation curve (blue) exhibits thecorrect behavior, leveling off as the bond breaks.

Enhanced Windows Edition
The Quantum Chemistry Toolbox has been updated on Windows to include the commands
CoupledCluster and NuclearGradient that were previously available only on macOS andLinux. The CoupledCluster provides access to the coupled cluster methods, CCSD and
CCSD(T), and NuclearGradient implements analytical gradients which significantly
accelerate geometry optimizations.

Consider the molecule 1,3-difluorobenzene> mol d MolecularGeometry "1,3-difluorobenzene" ;mol d"F", 2.36790000, 1.02540000, L0.00020000 , "F", L2.36810000, 1.02530000, 0.00010000 ,"C", L0.00030000, 1.05310000, 0.00010000 , "C", 1.20790000, 0.35580000, 0.00020000 , "C",
L1.20810000, 0.35540000, L0.00020000 , "C", 1.20820000, L1.03900000, 0.00010000 , "C",
L1.20790000, L1.03940000, L0.00010000 , "C", 0.00030000, L1.73660000, 0 , "H",
L0.00040000, 2.13890000, 0.00010000 , "H", 2.14900000, L1.58160000, 0.00010000 , "H",
L2.14840000, L1.58220000, L0.00010000 , "H", 0.00040000, L2.82270000, 0.00010000> PlotMolecule mol ;On any supported platform including Windows you can use the command CoupledCluster tocompute its ground-state energy and properties with coupled cluster with single and double
excitations (CCSD)> data d CoupledCluster mol ;Similarly, on Windows you can now compute the analytical nuclear gradient for 1,3difluorobenzene in seconds> grad d NuclearGradient mol, method = CoupledCluster ;1

grad d2

3

1

L0.04192547 L0.02497885

L0.00001438

2

0.04183445

L0.02481230

0.00001422

3

L0.00017756 L0.02222527

0.00001213

40.01089222

0.00559782

0.00003886

5

L0.01070347

0.00550302

L0.00005214

6

L0.01006577«

0.02124663«

L6
L7.05557316« # 10
12 # 3 Matrix

which substantially accelerates molecular geometry optimization using theGeometryOptimization command.

Power of AI through New Command Chat
QCT 2024 combines a modern quantum chemistry package with the power of generative AI
through natural language models. With the new command Chat you can ask AI to define amolecule, drug, or compound or to explain a scientific concept, terminology, or method.
(Note that before using Chat, you need to review and agree to the AI Terms of Use.)
For example, you can ask Chat for information about buckeyballs> Chat "Buckminsterfullerene" ;"Buckminsterfullerene, also known as a buckyball, is a specific type of molecular formation that includes
60 carbon atoms arranged in a spherical structure, similar in shape to a soccer ball. It was named after
Richard Buckminster Fuller, a renowned architect known for designing structures similar to the shapeof this molecule.
This particular molecule is a type of fullerene, a category of carbon structures which also includes carbon
nanotubes. Buckminsterfullerenes are significant in scientific research due to their unique physical andchemical properties. They are used in a variety of applications, ranging from conductors andsuperconductors to medical applications.
The buckminsterfullerene was discovered in 1985 by a team of scientists including Harry Kroto, Richard
Smalley, and Robert Curl, for which they were awarded the Nobel Prize in Chemistry in 1996."
or the antibiotic drug penicillin> Chat "penicillin" ;"Penicillin is a group of antibiotics that are used to treat and prevent a wide variety of bacterial infections.
These antibiotics were among the first medications to be effective against many previously serious
diseases, such as tuberculosis and certain types of pneumonia. They are derived from a type of fungi
called Penicillium fungi and are used in both human and veterinary medicine.
Penicillin works by interfering with the ability of bacteria to form cell walls. The cell walls are vital for thebacteria's survival because they keep the contents of the bacteria together and protect the bacteria fromits surroundings. When the cell wall is damaged, the contents of the bacteria leak out and this kills thebacteria.
Penicillin is most effective against gram-positive bacteria, including Streptococcus pneumoniae,
Staphylococcus aureus, and certain types of strep throat and skin infections. However, many types ofbacteria have become resistant to penicillin due to widespread use, which has led to the development ofother types of antibiotics.

It's also important to note that some people can have an allergic reaction to penicillin, which can range froma rash to a severe anaphylactic reaction."
If you want to know more about penicillin, we can just ask for more

> Chat more ;"Penicillin is a group of antibiotics that are commonly used to treat different types of infections caused bybacteria. It was the first antibiotic to be discovered and is one of the most widely used in medicine
today. The medicine works by destroying the wall that surrounds the bacteria, stopping them fromgrowing and multiplying, and ultimately killing them.
Penicillin was discovered in 1928 by a Scottish scientist named Alexander Fleming. He realized that a typeof mold, Penicillium notatum, produced a substance that could kill bacteria like streptococci andstaphylococci. This discovery revolutionized medicine and has saved countless lives since its
introduction.
There are several types of penicillin, including penicillin G, penicillin V, amoxicillin, and ampicillin,
among others. Each is used to treat different kinds of infections, some of which can be life-threatening,
like pneumonia, meningitis, and sepsis.
While penicillin is a very important antibiotic, not everyone can use it. Some people are allergic topenicillin or may experience side effects such as diarrhea, nausea, rash, or yeast infections.
Additionally, overuse of antibiotics like penicillin has led to the development of antibiotic-resistantbacteria, which is a major concern in healthcare today."You can also inquire about any scientific concept or terminology; for example, we can ask
about entanglement> Chat "entanglement" ;"Entanglement is a phenomenon in quantum physics where two or more particles become linked andinstantaneously affect each other’s states or properties, regardless of the distance between them. Whenparticles become entangled, the state of one particle is directly related to the state of the other. Even
when the particles are separated by large distances, a change in one of the particles results in an
immediate change in the other.
This concept is often illustrated through the example of a pair of gloves: if you put a pair of gloves in twoboxes (one in each), and then sent the boxes to opposite sides of the universe, the moment you opened
one box and found a left-handed glove, you would immediately know that the other box must contain aright-handed glove, despite not observing it.

In real quantum entanglement, the particles do not have definite states until they are measured, and themeasurement of one particle immediately and inevitably influences the state of the other particle, nomatter the distance between the particles.
This phenomenon was described by Albert Einstein as "spooky action at a distance" due to its baffling andcounterintuitive nature. It forms one of the core principles of quantum mechanics, with broad
implications for quantum computing and secure communications, among other things."
or even an electronic structure method like density functional theory> Chat "density functional theory" ;"Density Functional Theory (DFT) is a computational technique used in physics and chemistry toinvestigate the electronic structure of many-body systems, particularly atoms, molecules, and thecondensed phases.
This method is based on the principle that the ground state properties of a many-electron system can be
determined through an energy functional of the electron density. In simpler terms, DFT calculates theproperties of a system by examining the behavior of its electron density rather than of its individual
electrons.
The advantage of using DFT in comparison to other methods is its better balance between accuracy andcomputational cost. While not as accurate as methods that treat every electron interaction explicitly, it
is capable of making approximations that are in general accurate enough for many scientificapplications, and much less computer-intensive.
DFT has become a popular method for researchers, especially in the field of quantum chemistry and solidstate physics, to study the electronic properties of matter. It is widely used to study a variety of physicaland chemical phenomena, including the properties of solids, the nature of chemical bonds, and thestructures and reactions of molecules."The command Chat allow you to connect to the power of AI without leaving either Maple or
the Quantum Chemistry package.

Using the Package in the Classroom
The Maple Quantum Chemistry Toolbox includes approximately 30 lessons that can be usedin chemistry and physics courses from advanced high school courses through the graduatelevel. These lessons and associated curricula provide instructors and students with realtime quantum chemistry computations and visualizations that quickly deepen
understanding of molecular concepts. Detailed lesson plans and curricula are provided forIntroductory (General) Chemistry, Physical Chemistry (Quantum Mechanics andThermodynamics), Thermodynamics (Physics), Quantum Mechanics (Physics),
Computational Chemistry, and Quantum Chemistry as well as Advanced Placement (AP) andInternational Baccalaureate (IB) chemistry courses. Topics include atomic structure,chemical bonding, the Maxwell-Boltzmann distribution, heat capacity, enthalpy, entropy,
free energy, particle-in-a-box, vibrational normal modes, infrared spectroscopy, as well as
advanced electronic structure methods. Additional resources and lessons are available atthe Great Quantum Chemistry Dictionary and in the Maple Application Center. Use of the
QCT in the classroom is described in a recent paper in J. Chem. Ed.
QCT 2024 includes a new curricular set of lessons entitled "The Chemistry of Art." Forexample, the following sections provide two short excerpts from lessons in which (1) thevisual effects of color vision deficiency (CVD) are explored through an interactive
embedded component and (2) quantum calculations of the indigo and tyrian purple dyes
are performed to compare their absorption spectra.

Color Vision Deficiency (CVD)
Using Maple, you can simulate the effect of CVD on the perception of a sample color
palette plotted in the RGB color space. Select a CVD type, and then slowly increase theseverity from 0 to 100 and watch as the colorspace is distorted and each color in thepalette changes. You may find it useful to rotate the plots as you increase the severity. If
you personally experience a form of color blindness, you can still describe the effect of
the simulation as the points representing the colors in the gamut contract into a plane.
You should also recall what property is plotted along each axis.

> colors d seq RandomTools:-Generate list float range = 0 ..1, digits = 4, method = uniform ,3, i = 1 ..200:

Explore plots:-display Vector row

ColorTools:-SpatterPlot3d colors, symbol = "box", space= "RGB", labelfont = Helvetica, 16 , orientation = L20, 45,L38 , ColorTools:SpatterPlot3d map ColorTools:-CVDSimulation, colors, cvdtype, severity , symbol = "box",
space = "RGB", labelfont = Helvetica, 16 , orientation = L20, 45,L38, severity = 0..100, parameters = cvdtype = "deuteranomaly", "protanomaly", "tritanomaly" , placement= bottom, size = 1000, 350 ;Quantum Calculations of Indigo and Tyrian Purple Dyes
Consider two related dyes: indigo and tyrian purple:> indigo d"C", L2.82265000, 0.73898000, 0.00005000 , "C", L3.96802000, 1.53537000,

0. , "C", L5.20393000, 0.88612000, L0.00005000 , "C", L5.31138000, L0.51504000,
L0.00005000 , "C", L4.16296000, L1.30350000, L0.00001000 , "C", L2.91836000,
L0.67319000, 0.00003000 , "H", L6.29247000, L0.97833000, L0.00009000 , "H",
L4.21764000, L2.38780000, L0.00001000 , "H", L3.90356000, 2.61878000,
0.00001000 , "H", L6.10933000, 1.48632000, L0.00009000 , "C", L1.55139000,
L1.21054000, 0.00005000 , "C", L0.68036000, 0.00041000, 0.00006000 , "N",
L1.48727000, 1.11979000, 0.00017000 , "O", L1.14282000, L2.37426000, 0.00004000 ,"H", L1.10083000, 2.05448000, L0.00008000 , "C", 0.68036000, L0.00040000,
L0.00006000 , "N", 1.48727000, L1.11979000, L0.00017000 , "C", 2.82264000,
L0.73898000, L0.00005000 , "C", 2.91836000, 0.67319000, L0.00003000 , "C",1.55140000, 1.21054000, L0.00004000 , "H", 1.10081000, L2.05448000, 0.00011000 ,"O", 1.14282000, 2.37426000, L0.00004000 , "C", 3.96802000, L1.53537000, L0. ,"C", 4.16297000, 1.30350000, L0. , "C", 5.31138000, 0.51504000, 0.00004000 , "C",5.20393000, L0.88612000, 0.00005000 , "H", 6.10932000, L1.48633000, 0.00009000 ,"H", 3.90355000, L2.61878000, 0. , "H", 4.21765000, 2.38780000, 0. , "H", 6.29247000,
0.97832000, 0.00007000:

> tyrianpurple d"C", L7.53629000, 2.44628000, 0.02964000 , "C", L6.37087000,

3.18191000, 0.04692000 , "C", L5.15824000, 2.48164000, 0.00715000 , "C",
L5.11665000, 1.07281000, L0.02689000 , "C", L6.29914000, 0.33034000,
L0.01590000 , "C", L7.48107000, 1.04288000, 0.02018000 , "H", L4.16101000,
0.55333000, L0.05401000 , "H", L6.29526000, L0.75397000, L0.03064000 , "H",
L6.39556000, 4.26515000, 0.09313000 , "Br", L3.53176000, 3.45097000, 0.01113000 ,"C", L8.87511000, 0.56228000, 0.04867000 , "C", L9.70911000, 1.82064000,
0.05880000 , "N", L8.84729000, 2.89698000, 0.13866000 , "O", L9.25455000,
L0.59150000, 0.06050000 , "H", L9.17649000, 3.82873000, L0.08865000 , "C",
L11.03865000, 1.75648000, L0.03735000 , "N", L11.90080000, 0.68029000,
L0.11662000 , "C", L13.21148000, 1.13137000, L0.00440000 , "C", L13.26634000,
2.53479000, 0.00535000 , "C", L11.87231000, 3.01505000, L0.02598000 , "H",
L11.57160000, L0.25121000, 0.11179000 , "O", L11.49263000, 4.16874000,
L0.03827000 , "C", L14.37716000, 0.39607000, L0.01880000 , "C", L14.44796000,
3.24766000, 0.04478000 , "C", L15.63061000, 2.50553000, 0.05891000 , "C",
L15.58949000, 1.09670000, 0.02446000 , "Br", L17.21626000, 0.12784000, 0.02504000 ,"H", L14.35292000, L0.68716000, L0.06523000 , "H", L14.45146000, 4.33197000,
0.05995000 , "H", L16.58602000, 3.02527000, 0.08893000> plots:-display Vector row:

PlotMolecule indigo , PlotMolecule tyrianpurple

Figure: Structures of indigo (left) and tyrian purple (right).

;

The only difference between the two structures is that tyrian purple has bromines at the
6 and 6' positions. This does not affect the number of p-electrons or the length of the
conjugated chain, so the particle-in-a-box model would treat these two dyes as being
identical!
For more complex compounds, one must use more sophisticated methods to calculate
the energy levels. Here we use the Quantum Chemistry Toolbox to calculate the groundand excited states of each of these dyes.
After performing DFT and TDDFT calculations for both molecules in the lesson (see thelesson for the explicit calculations), you obtain the following two tables of excitation
spectra with the ExcitationSpectra command:
Indigospectra_indigo_b3lyp := ExcitationSpectra(indigo, method = DensityFunctional, basis ="6-31g", nstates = [3, 3], showtable);
State

1

2

3

4

5

6
and

EnergyWavelength1.03972808

1192.46753\

eV
2.32548387
eV
2.35743686
eV
2.42658941
eV
2.79208571
eV
3.46710287
eV

221 nm533.154406\
26 nm
525.927967\
49 nm
510.940156\
24 nm
444.055843\
58 nm
357.601727\
17 nm

Spin

Oscillator

Triplet0.44895520

Singlet0.28403090

Triplet0.08185276
4.81491290

Triplet# 10

L102.51377265
SingletSinglet# 100.00641236

L10

Tyrian Purple
spectra_tyrianpurple_b3lyp := ExcitationSpectra(tyrianpurple, method =DensityFunctional, basis = "6-31g", nstates = [3, 3], showtable);
State

1

2

3

4

5

6

EnergyWavelength

1.18482603

1046.43377\

eV
1.46300077
eV
2.46467321
eV
2.59177389
eV
2.93685950
eV
2.94297131
eV

112 nm
847.465019\
88 nm
503.045177\
81 nm
478.375824\
95 nm
422.165913\
57 nm
421.289181\
32 nm

Spin

Oscillator

Singlet0.01063373

Triplet0.42879167
5.64622357

Triplet# 10

Singlet0.30183798

Triplet1.77823855

Singlet0.00001806

L7

Looking for the singlet excitations with the largest oscillator strengths, you can predict
transitions at 533 nm and 478 nm for indigo and tyrian purple with the relative ordering
in reasonable agreement with experimental measurements. Their differences inabsorption are responsible for their differences in color!