WhatsNew2021 - Maple Help

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 of molecules.  In Maple 2021, this toolbox has significant new features and enhancements: (1) a new command that provides a treasure trove of information about molecules−a molecular dictionary, (2) a new method for molecules that further enhances the package's suite of electronic structure solvers, (3) a new command for purifying density matrices with applications to the mitigation of errors in quantum computing,  (4) a new optional parameter for the plotting of molecular orbitals that allows for customized colors,  (5) new optional parameters for the generation of molecular integrals that support arbitrary molecular orbitals and active spaces, (6) a new addition to the ≈30 builtin lessons for classroom learning in undergraduate-to-graduate chemistry and physics, (7) updates to the interactive Maplet, and (8) additional enhancements to many methods and commands throughout the package.

Note that the Maple Quantum Chemistry Toolbox (QCT) is required in order to execute the examples in this worksheet.

Molecular Dictionary

A molecular dictionary appears in QCT 2021 with access to online data for more than 50,000 molecules.  The command MolecularDictionary accepts the name of a molecule as a Maple string or CID integer.  For example, we retrieve the entries for the following two molecules: nitrogen ("dinitrogen") gas and the Cys-Ser peptide.  Before we begin we load the QuantumChemistry package,

 > $\mathrm{with}\left(\mathrm{QuantumChemistry}\right);$
 $\left[{\mathrm{AOLabels}}{,}{\mathrm{ActiveSpaceCI}}{,}{\mathrm{ActiveSpaceSCF}}{,}{\mathrm{AtomicData}}{,}{\mathrm{BondAngles}}{,}{\mathrm{BondDistances}}{,}{\mathrm{Charges}}{,}{\mathrm{ChargesPlot}}{,}{\mathrm{ContractedSchrodinger}}{,}{\mathrm{CorrelationEnergy}}{,}{\mathrm{CoupledCluster}}{,}{\mathrm{DensityFunctional}}{,}{\mathrm{DensityPlot3D}}{,}{\mathrm{Dipole}}{,}{\mathrm{DipolePlot}}{,}{\mathrm{Energy}}{,}{\mathrm{ExcitationEnergies}}{,}{\mathrm{ExcitationSpectra}}{,}{\mathrm{ExcitationSpectraPlot}}{,}{\mathrm{ExcitedStateEnergies}}{,}{\mathrm{ExcitedStateSpins}}{,}{\mathrm{FullCI}}{,}{\mathrm{GeometryOptimization}}{,}{\mathrm{HartreeFock}}{,}{\mathrm{Interactive}}{,}{\mathrm{Isotopes}}{,}{\mathrm{MOCoefficients}}{,}{\mathrm{MODiagram}}{,}{\mathrm{MOEnergies}}{,}{\mathrm{MOIntegrals}}{,}{\mathrm{MOOccupations}}{,}{\mathrm{MOOccupationsPlot}}{,}{\mathrm{MOSymmetries}}{,}{\mathrm{MP2}}{,}{\mathrm{MolecularData}}{,}{\mathrm{MolecularDictionary}}{,}{\mathrm{MolecularGeometry}}{,}{\mathrm{NuclearEnergy}}{,}{\mathrm{NuclearGradient}}{,}{\mathrm{OscillatorStrengths}}{,}{\mathrm{Parametric2RDM}}{,}{\mathrm{PlotMolecule}}{,}{\mathrm{Populations}}{,}{\mathrm{Purify2RDM}}{,}{\mathrm{RDM1}}{,}{\mathrm{RDM2}}{,}{\mathrm{RTM1}}{,}{\mathrm{ReadXYZ}}{,}{\mathrm{Restore}}{,}{\mathrm{Save}}{,}{\mathrm{SaveXYZ}}{,}{\mathrm{SearchBasisSets}}{,}{\mathrm{SearchFunctionals}}{,}{\mathrm{SkeletalStructure}}{,}{\mathrm{Thermodynamics}}{,}{\mathrm{TransitionDipolePlot}}{,}{\mathrm{TransitionDipoles}}{,}{\mathrm{TransitionOrbitalPlot}}{,}{\mathrm{TransitionOrbitals}}{,}{\mathrm{Variational2RDM}}{,}{\mathrm{VibrationalModeAnimation}}{,}{\mathrm{VibrationalModes}}{,}{\mathrm{Video}}\right]$ (1.1)

For nitrogen gas we have

 > $\mathrm{MolecularDictionary}\left("nitrogen"\right);$
 Nitrogen: Dinitrogen is an elemental molecule consisting of two trivalently-bonded nitrogen atoms. It has a role as a member of food packaging gas and a food propellant. It is a diatomic nitrogen, a gas molecular entity and an elemental molecule. It is a conjugate base of a diazynium. -ChEBI     Nitrogen: Nitrogen is an element with atomic symbol N, atomic number 7, and atomic weight 14.01. -NCI Thesaurus (NCIt)

while for the Cys-Ser peptide we have

 > $\mathrm{MolecularDictionary}\left("Cys-Ser"\right);$
 Cys-Ser: Cys-Ser is a dipeptide composed of L-cysteine and L-serine joined by a peptide linkage. It has a role as a metabolite. It is a dipeptide, a secondary carboxamide, a primary alcohol, a primary amino compound, a thiol and a carboxylic acid. It derives from a L-cysteine and a L-serine. -ChEBI

Similarly, we can explore many, many other molecules.  What about the molecule ozone that is sometimes generated before a thunderstorm?

 > $\mathrm{MolecularDictionary}\left("ozone"\right);$
 Ozone: Ozone is an elemental molecule with formula O3. An explosive, pale blue gas (b.p. -112###) that has a characteristic, pleasant odour, it is continuously produced in the upper atmosphere by the action of solar ultraviolet radiation on atmospheric oxygen. It is an antimicrobial agent used in the production of bottled water, as well as in the treatment of meat, poultry and other foodstuffs. It has a role as a member of greenhouse gas, a disinfectant, a tracer, an electrophilic reagent, a mutagen, an oxidising agent and an antiseptic drug. It is a member of reactive oxygen species, an elemental molecule, a triatomic oxygen and a gas molecular entity. -ChEBI

Or the molecule ascorbic acid (Vitamin C)?

 > $\mathrm{MolecularDictionary}\left("ascorbic acid"\right);$
 Ascorbic acid: L-ascorbic acid is the L-enantiomer of ascorbic acid and conjugate acid of L-ascorbate. It has a role as a water-soluble vitamin, a vitamin C, a coenzyme, a flour treatment agent, a food antioxidant, a plant metabolite and a cofactor. It is a conjugate acid of a L-ascorbate. It is an enantiomer of a D-ascorbic acid. -ChEBI     Ascorbic acid: Ascorbic Acid is a natural water-soluble vitamin (Vitamin C). Ascorbic acid is a potent reducing and antioxidant agent that functions in fighting bacterial infections, in detoxifying reactions, and in the formation of collagen in fibrous tissue, teeth, bones, connective tissue, skin, and capillaries. Found in citrus and other fruits, and in vegetables, vitamin C cannot be produced or stored by humans and must be obtained in the diet. (NCI04) -NCI Thesaurus (NCIt)

Or that important molecule in coffee?

 > $\mathrm{MolecularDictionary}\left("caffeine"\right);$
 Caffeine: Caffeine is a trimethylxanthine in which the three methyl groups are located at positions 1, 3, and 7. A purine alkaloid that occurs naturally in tea and coffee. It has a role as a central nervous system stimulant, an EC 3.1.4.* (phosphoric diester hydrolase) inhibitor, an adenosine receptor antagonist, an EC 2.7.11.1 (non-specific serine/threonine protein kinase) inhibitor, a ryanodine receptor agonist, a fungal metabolite, an adenosine A2A receptor antagonist, a psychotropic drug, a diuretic, a food additive, an adjuvant, a plant metabolite, an environmental contaminant, a xenobiotic, a human blood serum metabolite, a mouse metabolite and a mutagen. It is a purine alkaloid and a trimethylxanthine. -ChEBI     Caffeine: Caffeine is a methylxanthine alkaloid found in the seeds, nuts, or leaves of a number of plants native to South America and East Asia that is structurally related to adenosine and acts primarily as an adenosine receptor antagonist with psychotropic and anti-inflammatory activities. Upon ingestion, caffeine binds to adenosine receptors in the central nervous system (CNS), which inhibits adenosine binding. This inhibits the adenosine-mediated downregulation of CNS activity; thus, stimulating the activity of the medullary, vagal, vasomotor, and respiratory centers in the brain. This agent also promotes neurotransmitter release that further stimulates the CNS. The anti-inflammatory effects of caffeine are due the nonselective competitive inhibition of phosphodiesterases (PDEs). Inhibition of PDEs raises the intracellular concentration of cyclic AMP (cAMP), activates protein kinase A, and inhibits leukotriene synthesis, which leads to reduced inflammation and innate immunity. -NCI Thesaurus (NCIt)

The database also contains many more technical molecules such as the antiviral drug remdesivir that was recently repurposed to treat Covid-19.

 > $\mathrm{MolecularDictionary}\left("remdesivir"\right);$
 Remdesivir: Remdesivir is a carboxylic ester resulting from the formal condensation of the carboxy group of N-[(S)-{[(2R,3S,4R,5R)-5-(4-aminopyrrolo[2,1-f][1,2,4]triazin-7-yl)-5-cyano-3,4-dihydroxytetrahydrofuran-2-yl]methoxy}(phenoxy)phosphoryl]-L-alanine with the hydroxy group of 2-ethylbutan-1-ol. A broad-spectrum antiviral prodrug with potent in vitro antiviral activity against a diverse panel of RNA viruses such as Ebola virus, MERS-CoV and SARS-CoV. It is currently in Phase III clinical trials for the treatment of Covid-19 in adults. It has a role as an antiviral drug, a prodrug and an anticoronaviral agent. It is a carboxylic ester, a pyrrolotriazine, a nitrile, a phosphoramidate ester, a C-nucleoside and an aromatic amine. It derives from a GS-441524. -ChEBI     Remdesivir: Remdesivir is a prodrug of an adenosine triphosphate (ATP) analog, with potential antiviral activity against a variety of RNA viruses. Upon administration, remdesivir, being a prodrug, is metabolized into its active form GS-441524. As an ATP analog, GS-441524 competes with ATP for incorporation into RNA and inhibits the action of viral RNA-dependent RNA polymerase. This results in the termination of RNA transcription and decreases viral RNA production. -NCI Thesaurus (NCIt)

The new MolecularDictionary command complements the existing commands MolecularGeometry and SkeletalStructure for retrieving molecular geometries and skeletal structures.  For example, here is the skeletal structure for remdesivir

 > $\mathrm{SkeletalStructure}\left("remdesivir"\right);$

and its molecular geometry

 >
 ${\mathrm{remdesivir}}{≔}\left[\left[{"P"}{,}{0.71860000}{,}{0.10970000}{,}{-0.76660000}\right]{,}\left[{"O"}{,}{-2.83790000}{,}{2.01490000}{,}{-0.79800000}\right]{,}\left[{"O"}{,}{-4.60280000}{,}{3.10730000}{,}{2.14720000}\right]{,}\left[{"O"}{,}{-3.33010000}{,}{4.75570000}{,}{0.36760000}\right]{,}\left[{"O"}{,}{-0.07640000}{,}{1.52190000}{,}{-0.93430000}\right]{,}\left[{"O"}{,}{-0.38890000}{,}{-0.77740000}{,}{0.01860000}\right]{,}\left[{"O"}{,}{1.05700000}{,}{-0.46580000}{,}{-2.11880000}\right]{,}\left[{"O"}{,}{5.56710000}{,}{0.78540000}{,}{0.04450000}\right]{,}\left[{"O"}{,}{4.25640000}{,}{-0.39040000}{,}{1.53130000}\right]{,}\left[{"N"}{,}{-3.90140000}{,}{-0.59850000}{,}{-0.58280000}\right]{,}\left[{"N"}{,}{-3.34010000}{,}{-0.39130000}{,}{-1.79850000}\right]{,}\left[{"N"}{,}{1.97840000}{,}{0.37370000}{,}{0.27670000}\right]{,}\left[{"N"}{,}{-6.06950000}{,}{2.93730000}{,}{-1.04000000}\right]{,}\left[{"N"}{,}{-3.45180000}{,}{-2.78050000}{,}{-2.09530000}\right]{,}\left[{"N"}{,}{-4.30780000}{,}{-4.26940000}{,}{-0.51260000}\right]{,}\left[{"C"}{,}{-3.95980000}{,}{1.84290000}{,}{0.10590000}\right]{,}\left[{"C"}{,}{-3.52950000}{,}{2.58210000}{,}{1.38960000}\right]{,}\left[{"C"}{,}{-2.58500000}{,}{3.65710000}{,}{0.88790000}\right]{,}\left[{"C"}{,}{-1.87900000}{,}{2.94460000}{,}{-0.25310000}\right]{,}\left[{"C"}{,}{-4.21790000}{,}{0.35750000}{,}{0.34660000}\right]{,}\left[{"C"}{,}{-0.65550000}{,}{2.15550000}{,}{0.19440000}\right]{,}\left[{"C"}{,}{-5.14180000}{,}{2.45600000}{,}{-0.53610000}\right]{,}\left[{"C"}{,}{-4.76810000}{,}{-0.28070000}{,}{1.43770000}\right]{,}\left[{"C"}{,}{-4.24220000}{,}{-1.83550000}{,}{-0.09990000}\right]{,}\left[{"C"}{,}{-4.78420000}{,}{-1.67020000}{,}{1.15620000}\right]{,}\left[{"C"}{,}{-3.99470000}{,}{-2.99540000}{,}{-0.92270000}\right]{,}\left[{"C"}{,}{3.22850000}{,}{0.90630000}{,}{-0.26190000}\right]{,}\left[{"C"}{,}{-3.14980000}{,}{-1.48650000}{,}{-2.47870000}\right]{,}\left[{"C"}{,}{7.99230000}{,}{0.90260000}{,}{0.02990000}\right]{,}\left[{"C"}{,}{6.73740000}{,}{0.33420000}{,}{0.71240000}\right]{,}\left[{"C"}{,}{8.01980000}{,}{0.61290000}{,}{-1.48750000}\right]{,}\left[{"C"}{,}{9.24690000}{,}{0.42250000}{,}{0.78550000}\right]{,}\left[{"C"}{,}{4.37400000}{,}{0.34540000}{,}{0.55990000}\right]{,}\left[{"C"}{,}{3.21180000}{,}{2.42720000}{,}{-0.19330000}\right]{,}\left[{"C"}{,}{-0.18090000}{,}{-2.02330000}{,}{0.54580000}\right]{,}\left[{"C"}{,}{8.09250000}{,}{-0.86050000}{,}{-1.86400000}\right]{,}\left[{"C"}{,}{10.54730000}{,}{1.00690000}{,}{0.25290000}\right]{,}\left[{"C"}{,}{0.74520000}{,}{-2.88410000}{,}{-0.04300000}\right]{,}\left[{"C"}{,}{-0.89510000}{,}{-2.43210000}{,}{1.67190000}\right]{,}\left[{"C"}{,}{0.95730000}{,}{-4.15390000}{,}{0.49430000}\right]{,}\left[{"C"}{,}{-0.68330000}{,}{-3.70160000}{,}{2.20940000}\right]{,}\left[{"C"}{,}{0.24290000}{,}{-4.56260000}{,}{1.62060000}\right]{,}\left[{"H"}{,}{-2.96420000}{,}{1.90360000}{,}{2.04220000}\right]{,}\left[{"H"}{,}{-1.91910000}{,}{4.04370000}{,}{1.66480000}\right]{,}\left[{"H"}{,}{-1.60480000}{,}{3.62590000}{,}{-1.06620000}\right]{,}\left[{"H"}{,}{-0.92710000}{,}{1.40590000}{,}{0.94310000}\right]{,}\left[{"H"}{,}{0.09090000}{,}{2.82470000}{,}{0.63360000}\right]{,}\left[{"H"}{,}{-4.22020000}{,}{3.62550000}{,}{2.87570000}\right]{,}\left[{"H"}{,}{-5.12360000}{,}{0.19600000}{,}{2.34060000}\right]{,}\left[{"H"}{,}{-2.69180000}{,}{5.39520000}{,}{0.00820000}\right]{,}\left[{"H"}{,}{-5.15100000}{,}{-2.45610000}{,}{1.80150000}\right]{,}\left[{"H"}{,}{1.77080000}{,}{0.79490000}{,}{1.18130000}\right]{,}\left[{"H"}{,}{3.37230000}{,}{0.56210000}{,}{-1.29190000}\right]{,}\left[{"H"}{,}{7.93990000}{,}{1.99660000}{,}{0.12380000}\right]{,}\left[{"H"}{,}{-2.69460000}{,}{-1.38650000}{,}{-3.47770000}\right]{,}\left[{"H"}{,}{6.70450000}{,}{0.67470000}{,}{1.75490000}\right]{,}\left[{"H"}{,}{6.76100000}{,}{-0.76200000}{,}{0.71010000}\right]{,}\left[{"H"}{,}{8.86860000}{,}{1.13460000}{,}{-1.94470000}\right]{,}\left[{"H"}{,}{7.12730000}{,}{1.04590000}{,}{-1.95600000}\right]{,}\left[{"H"}{,}{9.15420000}{,}{0.70950000}{,}{1.84080000}\right]{,}\left[{"H"}{,}{9.31030000}{,}{-0.67170000}{,}{0.76940000}\right]{,}\left[{"H"}{,}{-4.72700000}{,}{-4.45630000}{,}{0.39210000}\right]{,}\left[{"H"}{,}{-4.12310000}{,}{-5.06830000}{,}{-1.10970000}\right]{,}\left[{"H"}{,}{2.37960000}{,}{2.84230000}{,}{-0.77100000}\right]{,}\left[{"H"}{,}{4.13510000}{,}{2.85010000}{,}{-0.60420000}\right]{,}\left[{"H"}{,}{3.12470000}{,}{2.78400000}{,}{0.83960000}\right]{,}\left[{"H"}{,}{7.22460000}{,}{-1.41360000}{,}{-1.49380000}\right]{,}\left[{"H"}{,}{8.99880000}{,}{-1.33170000}{,}{-1.47330000}\right]{,}\left[{"H"}{,}{8.10960000}{,}{-0.96480000}{,}{-2.95390000}\right]{,}\left[{"H"}{,}{10.77610000}{,}{0.63290000}{,}{-0.74910000}\right]{,}\left[{"H"}{,}{11.37950000}{,}{0.72520000}{,}{0.90630000}\right]{,}\left[{"H"}{,}{10.50160000}{,}{2.09980000}{,}{0.21570000}\right]{,}\left[{"H"}{,}{1.31380000}{,}{-2.60450000}{,}{-0.92210000}\right]{,}\left[{"H"}{,}{-1.61490000}{,}{-1.76410000}{,}{2.13670000}\right]{,}\left[{"H"}{,}{1.67730000}{,}{-4.82510000}{,}{0.03530000}\right]{,}\left[{"H"}{,}{-1.23940000}{,}{-4.01950000}{,}{3.08640000}\right]{,}\left[{"H"}{,}{0.40750000}{,}{-5.55130000}{,}{2.03880000}\right]\right]$ (1.2)

which we can plot with the PlotMolecule command

 > $\mathrm{PlotMolecule}\left(\mathrm{remdesivir}\right);$

With the dictionary entry, the skeletal structure, and the ball-and-stick plot we have all of the necessary background information to begin molecular calculations like the ones in the next section.

Computing with Molecules

In the QCT 2021 we implement a new method for the ground and excited states of molecules.  The Schrödinger equation, developed by Erwin Schrödinger in 1925, is the key equation for solving quantum systems in non-relativistic physics.  However, its exact solution scales exponentially with the number of electrons in the quantum system.  To deal with this inefficiency, we solve a projection (or contraction) of the Schrödinger equation onto the space of only two electrons, known as a contracted Schrödinger equation.  This contraction is especially useful for improving computational efficiency for strongly correlated molecules−molecules that deviate significantly from the mean-field (Hartree-Fock) picture of one electron in the field of the remaining electrons−for which many standard methods are often inaccurate.   Let us consider the peptide of the two amino acids L-cysteine and L-serine whose geometry we can import with the MolecularGeometry command

 >
 ${\mathrm{mol}}{≔}\left[\left[{"S"}{,}{-2.29090000}{,}{2.10530000}{,}{-1.07690000}\right]{,}\left[{"O"}{,}{2.52680000}{,}{-1.19180000}{,}{-1.63380000}\right]{,}\left[{"O"}{,}{-1.06460000}{,}{-0.04400000}{,}{1.69560000}\right]{,}\left[{"O"}{,}{2.66940000}{,}{1.27060000}{,}{1.34030000}\right]{,}\left[{"O"}{,}{1.68720000}{,}{1.60900000}{,}{-0.67760000}\right]{,}\left[{"N"}{,}{0.14240000}{,}{-0.64180000}{,}{-0.19310000}\right]{,}\left[{"N"}{,}{-3.00870000}{,}{-1.66870000}{,}{0.29030000}\right]{,}\left[{"C"}{,}{1.44960000}{,}{-0.55430000}{,}{0.41400000}\right]{,}\left[{"C"}{,}{-2.27570000}{,}{-0.56710000}{,}{-0.33790000}\right]{,}\left[{"C"}{,}{-1.02220000}{,}{-0.37450000}{,}{0.51210000}\right]{,}\left[{"C"}{,}{2.44060000}{,}{-1.50010000}{,}{-0.24810000}\right]{,}\left[{"C"}{,}{-3.16790000}{,}{0.67650000}{,}{-0.36510000}\right]{,}\left[{"C"}{,}{1.91400000}{,}{0.88100000}{,}{0.28020000}\right]{,}\left[{"H"}{,}{1.35260000}{,}{-0.79450000}{,}{1.47910000}\right]{,}\left[{"H"}{,}{-2.01660000}{,}{-0.86110000}{,}{-1.36160000}\right]{,}\left[{"H"}{,}{0.09180000}{,}{-0.84710000}{,}{-1.18670000}\right]{,}\left[{"H"}{,}{2.11130000}{,}{-2.53950000}{,}{-0.14810000}\right]{,}\left[{"H"}{,}{3.43800000}{,}{-1.39630000}{,}{0.19140000}\right]{,}\left[{"H"}{,}{-3.48660000}{,}{0.95790000}{,}{0.64500000}\right]{,}\left[{"H"}{,}{-4.06810000}{,}{0.49580000}{,}{-0.96240000}\right]{,}\left[{"H"}{,}{-2.46140000}{,}{-2.52630000}{,}{0.22140000}\right]{,}\left[{"H"}{,}{-3.87150000}{,}{-1.84260000}{,}{-0.22420000}\right]{,}\left[{"H"}{,}{3.16370000}{,}{-1.81370000}{,}{-2.02500000}\right]{,}\left[{"H"}{,}{-3.30210000}{,}{2.97810000}{,}{-0.95790000}\right]{,}\left[{"H"}{,}{2.98800000}{,}{2.19320000}{,}{1.24240000}\right]\right]$ (2.1)

and plot with the PlotMolecule command

 > $\mathrm{PlotMolecule}\left(\mathrm{mol}\right);$

In this example we showcase the use of two active spaces, an active space of 6 electrons in 6 orbitals to account for any potential static (strong) electron correlation and a larger active space to account for additional (dynamic) electron correlation. (This second active space is chosen to be [16,16] to make the calculation quick but much larger second active spaces are possible.)

 >
 ${\mathrm{table}}{}\left({\mathrm{%id}}{=}{36893489156293240732}\right)$ (2.2)

In the table of computed properties we observe that the peptide has a nonzero dipole moment

 > $\mathrm{data_peptide}\left[\mathrm{dipole}\right];$
 $\left[\begin{array}{c}0.957737864\\ -2.37658291\\ -1.59751383\end{array}\right]$ (2.3)

The direction of the dipole moment can be readily visualized with the DipolePlot command

 >

We can also compute the atomic charges which are closely associated with the dipole moment

 >
 $\left[{"S"}{,}{0.10504005}\right]{,}\left[{"O"}{,}{-0.30624021}\right]{,}\left[{"O"}{,}{-0.20852064}\right]{,}\left[{"O"}{,}{-0.28630119}\right]{,}\left[{"O"}{,}{-0.26480265}\right]{,}\left[{"N"}{,}{-0.37476210}\right]{,}\left[{"N"}{,}{-0.39527767}\right]{,}\left[{"C"}{,}{0.04398837}\right]{,}\left[{"C"}{,}{0.03851104}\right]{,}\left[{"C"}{,}{0.26632682}\right]{,}\left[{"C"}{,}{0.00879806}\right]{,}\left[{"C"}{,}{-0.17897052}\right]{,}\left[{"C"}{,}{0.29797645}\right]{,}\left[{"H"}{,}{0.09534526}\right]{,}\left[{"H"}{,}{0.04389074}\right]{,}\left[{"H"}{,}{0.20310443}\right]{,}\left[{"H"}{,}{0.05844607}\right]{,}\left[{"H"}{,}{0.06152166}\right]{,}\left[{"H"}{,}{0.07400052}\right]{,}\left[{"H"}{,}{0.05447756}\right]{,}\left[{"H"}{,}{0.15148599}\right]{,}\left[{"H"}{,}{0.15137748}\right]{,}\left[{"H"}{,}{0.18850391}\right]{,}\left[{"H"}{,}{-0.04234736}\right]{,}\left[{"H"}{,}{0.21442792}\right]$ (2.4)

Only one of the carbons is negatively charged and only two of the carbons are fairly positively charged which we can also see from a ChargesPlot

 >

where the positively charged atoms are shown in red and the negatively charged atoms are shown in blue.

Error Mitigation in Quantum Computing

All of the one- and two-electron properties of molecules are computable from the two-electron reduced density matrix (2-RDM).  The 2-RDM of a molecule obeys a set of stringent constraints that are necessary for it to represent an N-electron wave function−constraints known as N-representability conditions.  A 2-RDM that is computed by an approximate method or measured in the presence of noise as on a quantum computer can violate some of these conditions.  In QCT 2021 we introduce a new algorithm through the command Purify2RDM that purifies the 2-RDM to obey an important set of N-representability conditions.  Purify2RDM uses an advanced type of optimization, known as semidefinite programming, to project the 2-RDM onto the set of approximately N-representable 2-RDMs.  The command is especially useful in molecular simulations on quantum computers where noise generates errors in the measured 2-RDMs.  The correction of errors in quantities measured on a quantum computer is known as error mitigation.  Here we demonstrate the command by using it to purify an approximate 2-RDM of hydrogen fluoride generated from second-order many-body perturbation (MP2) theory.  First, we generate the data from applying the MP2 command to the geometry of hydrogen fluoride where we include the keyword parameter return_rdm="rdm1_and_rdm2" to return the 2-RDM.

 >
 ${\mathrm{hf}}{≔}\left[\left[{"F"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"H"}{,}{0.43580000}{,}{-0.14770000}{,}{-0.81880000}\right]\right]$ (3.1)
 >

Second, we reshape the data stored in a 4-index tensor into a 2-index matrix

 >
 ${{\mathrm{_rtable}}}_{{36893489156339566220}}$ (3.2)

and compute the eigenvalues of the 2-RDM with the Eigenvalues command in the LinearAlgebra package

 >
 ${{\mathrm{_rtable}}}_{{36893489156339501044}}$ (3.3)

Notice that the lowest eigenvalue of the approximate 2-RDM is negative (-0.0143), but because each eigenvalue represents the probability of being in a two-electron quantum state, all of the eigenvalues of the 2-RDM should be non-negative!  Finally, we use the Purify2RDM command to correct this violation as well as more subtle violations of the physical requirements for the 2-RDM

 >
 ${\mathrm{table}}{}\left({\mathrm{%id}}{=}{36893489156985465308}\right)$ (3.4)

To check the correction of the 2-RDM, as before we rearrange the outputted 4-index tensor into a 2-index matrix

 >
 ${{\mathrm{_rtable}}}_{{36893489156321220716}}$ (3.5)

which we diagonalize with the LinearAlgebra:-Eigenvalues command

 >
 ${{\mathrm{_rtable}}}_{{36893489156319912652}}$ (3.6)

All of the eigenvalues, we find, are now non-negative.

3-Dimensional Density Plots

The command DensityPlot3D receives new optional keywords bonds and colors that control the appearance of chemical bonds and the color of the orbital densities.  Consider the diatomic molecule hydrogen fluoride

 >
 ${\mathrm{hf}}{≔}\left[\left[{"F"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"H"}{,}{0.43580000}{,}{-0.14770000}{,}{-0.81880000}\right]\right]$ (4.1)

After performing an electronic structure calculation such as its solution by the new ContractedSchrodinger command

 >
 ${\mathrm{table}}{}\left({\mathrm{%id}}{=}{36893489156957578972}\right)$ (4.2)

we can visualize the orbitals with DensityPlot3D.  In QCT 2020 the density plot always uses green and purple colors for the orbitals

 >

Now we can use the keyword color to change the default colors to any color supported in Maple's ColorTools package.  For example,

 >

Molecular Integrals

The QCT makes advanced features like obtaining the molecular integrals as simple as a single command MOIntegrals.  In QCT 2021 we add two new optional keywords initial_mo and active to the MOIntegrals command that makes generating molecular integrals in any MO basis set with or without an active space as easy as possible.  Let's consider the molecule citric acid whose skeletal structure, geometry, and dictionary entry are

 > $\mathrm{SkeletalStructure}\left("citric acid"\right);$

 >
 ${\mathrm{citricacid}}{≔}\left[\left[{"O"}{,}{0.02960000}{,}{0.20950000}{,}{1.60690000}\right]{,}\left[{"O"}{,}{-0.85580000}{,}{1.79790000}{,}{-1.49620000}\right]{,}\left[{"O"}{,}{-1.35540000}{,}{2.26890000}{,}{0.66220000}\right]{,}\left[{"O"}{,}{-2.39080000}{,}{-2.30460000}{,}{-0.78710000}\right]{,}\left[{"O"}{,}{3.53510000}{,}{-0.40330000}{,}{-0.92730000}\right]{,}\left[{"O"}{,}{-2.55590000}{,}{-0.62650000}{,}{0.73170000}\right]{,}\left[{"O"}{,}{2.54380000}{,}{-1.12450000}{,}{0.98350000}\right]{,}\left[{"C"}{,}{0.10070000}{,}{0.36200000}{,}{0.19410000}\right]{,}\left[{"C"}{,}{-0.49050000}{,}{-0.87910000}{,}{-0.49710000}\right]{,}\left[{"C"}{,}{1.53740000}{,}{0.70960000}{,}{-0.22660000}\right]{,}\left[{"C"}{,}{-0.76500000}{,}{1.57730000}{,}{-0.15870000}\right]{,}\left[{"C"}{,}{-1.90980000}{,}{-1.23050000}{,}{-0.11540000}\right]{,}\left[{"C"}{,}{2.57670000}{,}{-0.35680000}{,}{0.03000000}\right]{,}\left[{"H"}{,}{0.11200000}{,}{-1.75550000}{,}{-0.22860000}\right]{,}\left[{"H"}{,}{-0.45740000}{,}{-0.76140000}{,}{-1.58660000}\right]{,}\left[{"H"}{,}{1.88420000}{,}{1.60800000}{,}{0.30000000}\right]{,}\left[{"H"}{,}{1.55890000}{,}{0.93610000}{,}{-1.30040000}\right]{,}\left[{"H"}{,}{0.46200000}{,}{0.97710000}{,}{2.01860000}\right]{,}\left[{"H"}{,}{-1.42930000}{,}{2.56690000}{,}{-1.70150000}\right]{,}\left[{"H"}{,}{-3.30780000}{,}{-2.52520000}{,}{-0.51720000}\right]{,}\left[{"H"}{,}{4.19140000}{,}{-1.11160000}{,}{-0.75460000}\right]\right]$ (5.1)

and

 > $\mathrm{MolecularDictionary}\left("citric acid"\right);$
 Citric acid: Citric acid is a tricarboxylic acid that is propane-1,2,3-tricarboxylic acid bearing a hydroxy substituent at position 2. It is an important metabolite in the pathway of all aerobic organisms. It has a role as a food acidity regulator, a chelator, an antimicrobial agent and a fundamental metabolite. It is a conjugate acid of a citrate(1-) and a citrate anion. -ChEBI     Citric acid: Anhydrous Citric Acid is a tricarboxylic acid found in citrus fruits. Citric acid is used as an excipient in pharmaceutical preparations due to its antioxidant properties. It maintains stability of active ingredients and is used as a preservative. It is also used as an acidulant to control pH and acts as an anticoagulant by chelating calcium in blood. -NCI Thesaurus (NCIt)

We can generate the molecular orbitals (MOs) in a 26 electrons in 26 orbitals ([26,26]) active space−the 13 highest occupied orbitals (26 electrons) and the 13 lowest unoccupied orbitals−with the active keyword

 >
 ${\mathrm{table}}{}\left({\mathrm{%id}}{=}{36893489156327044828}\right)$ (5.2)

These molecular integrals are in the basis set of the Hartree-Fock MOs.  We can easily use any set of MOs with the keyword initial_mo.  For example, we can run a density functional theory (DFT) calculation and use the DFT MOs

 >
 ${\mathrm{table}}{}\left({\mathrm{%id}}{=}{36893489156942235388}\right)$ (5.3)

The initial_mo keyword is assigned to a list of the MO coefficients and MO symmetries

 >
 ${\mathrm{table}}{}\left({\mathrm{%id}}{=}{36893489156988068348}\right)$ (5.4)

Voila!  We have the MO integrals with respect to the DFT MOs in a [26,26] active space.

Using the Package in the Classroom

The Maple Quantum Chemistry Toolbox includes approximately 30 lessons that can be used in chemistry and physics courses from advanced high school courses through the graduate level. These lessons and associated curricula provide instructors and students with real-time quantum chemistry computations and visualizations that quickly deepen understanding of molecular concepts.  Detailed lesson plans and curricula are provided for Introductory (General) Chemistry, Physical Chemistry (Quantum Mechanics and Thermodynamics), Thermodynamics (Physics), Quantum Mechanics (Physics), Computational Chemistry, and Quantum Chemistry as well as Advanced Placement (AP) and International 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.  Use of the QCT in the classroom is described in a recent paper in J. Chem. Ed.  QCT 2021 includes a new lesson for Physical Chemistry and Undergraduate Quantum Mechanics on Vibrational Motion and the Harmonic Oscillator.   In the following two subsections we show snippets of the lesson

Reduced mass

Here we set the variables A and B to the strings of the atoms in the diatomic molecule (By changing these values, you can use the worksheet to treat other diatomic molecules!)

 >
 ${A}{≔}{"H"}$
 ${B}{≔}{"F"}$ (6.1.1)

We use the AtomicData command in the Quantum Chemistry package to obtain the masses as well as other data

 >
 ${\mathrm{dataA}}{≔}{table}{}\left(\left[{\mathrm{ionizationenergy}}{=}{13.59840000}{}⟦{\mathrm{eV}}⟧{,}{\mathrm{name}}{=}{\mathrm{hydrogen}}{,}{\mathrm{meltingpoint}}{=}{13.81000000}{}⟦{K}⟧{,}{\mathrm{electronegativity}}{=}{2.10000000}{,}{\mathrm{atomicweight}}{=}{1.00794000}{}⟦{\mathrm{amu}}⟧{,}{\mathrm{atomicnumber}}{=}{1}{,}{\mathrm{boilingpoint}}{=}{20.28000000}{}⟦{K}⟧{,}{\mathrm{names}}{=}\left\{{\mathrm{hydrogen}}\right\}{,}{\mathrm{symbol}}{=}{H}\right]\right)$ (6.1.2)
 >
 ${\mathrm{dataB}}{≔}{table}{}\left(\left[{\mathrm{ionizationenergy}}{=}{17.42280000}{}⟦{\mathrm{eV}}⟧{,}{\mathrm{name}}{=}{\mathrm{fluorine}}{,}{\mathrm{electronaffinity}}{=}{3.40119000}{}⟦{\mathrm{eV}}⟧{,}{\mathrm{meltingpoint}}{=}{53.53000000}{}⟦{K}⟧{,}{\mathrm{electronegativity}}{=}{3.98000000}{,}{\mathrm{atomicweight}}{=}{18.99840320}{}⟦{\mathrm{amu}}⟧{,}{\mathrm{atomicnumber}}{=}{9}{,}{\mathrm{boilingpoint}}{=}{85.03000000}{}⟦{K}⟧{,}{\mathrm{names}}{=}\left\{{\mathrm{fluorine}}\right\}{,}{\mathrm{symbol}}{=}{F}\right]\right)$ (6.1.3)

Set the masses

 >
 ${\mathrm{mA}}{≔}{1.00794000}{}⟦{\mathrm{amu}}⟧$ (6.1.4)
 >
 ${\mathrm{mB}}{≔}{18.99840320}{}⟦{\mathrm{amu}}⟧$ (6.1.5)

Compute the reduced mass in amu

 >
 ${\mathrm{μ0}}{≔}{0.95715895}{}⟦{\mathrm{amu}}⟧$ (6.1.6)

Convert the reduced mass from amu to kg

 >
 ${\mathrm{\mu }}{≔}{1.58940092}{}{{10}}^{{-27}}{}⟦{\mathrm{kg}}⟧$ (6.1.7)

Bond length

To compute the equilibrium bond length, we select a set of bond distances from the roots of the sixth-order Chebyshev polynomial that are suitable for interpolation

 >
 ${\mathrm{bonds}}{≔}\left[{0.85681483}{,}{0.90857864}{,}{0.99823619}{,}{1.10176381}{,}{1.19142136}{,}{1.24318516}\right]$ (6.2.1)

We define a list of molecular geometries with each geometry corresponding to one of the bond distances

 >
 ${\mathrm{molecules}}{≔}\left[\left[\left[{"H"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"F"}{,}{0}{,}{0}{,}{0.85681483}\right]\right]{,}\left[\left[{"H"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"F"}{,}{0}{,}{0}{,}{0.90857864}\right]\right]{,}\left[\left[{"H"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"F"}{,}{0}{,}{0}{,}{0.99823619}\right]\right]{,}\left[\left[{"H"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"F"}{,}{0}{,}{0}{,}{1.10176381}\right]\right]{,}\left[\left[{"H"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"F"}{,}{0}{,}{0}{,}{1.19142136}\right]\right]{,}\left[\left[{"H"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"F"}{,}{0}{,}{0}{,}{1.24318516}\right]\right]\right]$ (6.2.2)

The energies for each geometry may be then readily computed with the Energy  command in the Quantum Chemistry package.

 >
 ${\mathrm{energies}}{≔}\left[{-100.01686137}{,}{-100.01964383}{,}{-100.01018182}{,}{-99.98693789}{,}{-99.96201956}{,}{-99.94683591}\right]$ (6.2.3)

We use polynomial interpolation to generate a polynomial in the bond distance R

 >
 ${\mathrm{pes}}{≔}{-}{2.84449888}{}{{R}}^{{5}}{+}{17.02510690}{}{{R}}^{{4}}{-}{41.28045230}{}{{R}}^{{3}}{+}{50.73972465}{}{{R}}^{{2}}{-}{31.33797004}{}{R}{-}{92.31177999}$ (6.2.4)

The potential energy surface (curve) can be plotted

 >

Finally, we differentiate the potential energy curve with respect to R and set the derivative to zero.

 >
 ${\mathrm{eq}}{≔}{-}{14.22249441}{}{{R}}^{{4}}{+}{68.10042762}{}{{R}}^{{3}}{-}{123.84135691}{}{{R}}^{{2}}{+}{101.47944931}{}{R}{-}{31.33797004}{=}{0}$ (6.2.5)

Solving the resulting equation yields the equilibrium bond length

 >
 ${\mathrm{R_eq}}{≔}{0.90161288}$ (6.2.6)