
Maple 2019 has a new addon package Maple Quantum Chemistry Toolbox from RDMChem for computing the energies and properties of molecules. As a member of the team at RDMChem that developed the package, I would like to tell the story of its origins and provide a brief demonstration of the package.
Thinking about Quantum Chemistry at Harvard
The story of the Maple Quantum Chemistry Toolbox begins with my graduate studies in Chemical Physics at Harvard University in the late 1990s. Even in 1998 programs for computing the energies and properties of molecules were extremely complicated and nonintuitive. Many of the existing programs had begun in the 1970s on computers whose programs would be recorded on punchcards.
Fig. 1: Used Punchcard by Pete Birkinshaw from Manchester, UK CC BY 2.0
Even today some of these programs have remnants of their early versions such as input files that must start on the second column to account for the margin of the now nonexistent punchcards. As a student, I made a bound copy of one of these manuals at a local Kinkos photocopy shop and later found myself in Harvard Yard, thinking that there must be a better way to present quantum chemistry computations. The idea for a Maplelike package for quantum chemistry was born in that moment.
At the same time I was learning about something called the twoelectron reduced density matrix (2RDM). The basic variable in quantum chemistry is the wave function which is the probability amplitude for finding each of the electrons in a molecule. Because electrons are indistinguishable with pairwise interactions, the wave function contains much more information than is needed for computing the energies and electronic properties of molecules. The energies and properties of any molecule with any number of electrons can be expressed as a function of a 2 electron matrix, the 2RDM [13]. A quantum chemistry based on the 2RDM, it was known, would have potentially significant advantages over wave function calculations in terms of accuracy and computational cost, especially for molecules far from the meanfield limit. A 2RDM approach to quantum chemistry became the focus of my Ph.D. thesis.
Representing Many Electrons with Only Two Electrons
The idea of using the 2RDM in quantum chemistry can be attributed to four scientists: two physicists Kodi Husimi and Joseph Mayer, a chemist PerOlov Lowdin, and a mathematician John Coleman [13]. In the early 1940s Husimi first published the idea in a Japanese physics journal, but in the midst of World War II the paper was not widely disseminated in the West. In the summer of 1951 John Coleman, which attending a physics conference at Chalk River, realized that the groundstate energy of any atom or molecule could be expressed as functional of the 2RDM, and similar ideas later occurred to PerOlov Lowdin and Joseph Mayer who published their ideas in Physical Review in 1955. It was soon recognized that computing the groundstate energy of an atom or molecule with the 2RDM was potentially difficult because not every twoelectron density matrix corresponds to an Nelectron density matrix or wave function. The search for the appropriate constraints on the 2RDM, known as Nrepresentability conditions, became known as the Nrepresentability problem [13].
Beginning in the late 1990s and early 2000s, Carmela Valdemoro and Diego Alcoba at the Consejo Superior de Investigaciones Científicas (Madrid, Spain), Hiroshi Nakatsuji, Koji Yasuda, and Maho Nakata at Kyoto University (Kyoto, Japan), Jerome Percus and Bastiaan Braams at the Courant Institute (New York, USA), John Coleman and Robert Erdahl at Queens University (Kingston, Canada), and my research group and I at The University of Chicago (Chicago, USA) began to make significant progress in the computation of the 2RDM without computing the manyelectron wave function [13]. Further contributions were made by Eric Cances and Claude Le Bris at CERMICS, Ecole Nationale des Ponts et Chaussées (MarnelaVallée, France), Paul Ayers at McMaster University (Hamilton, Canada), and Dimitri Van Neck at the University of Ghent (Ghent, Belgium) and their research groups. By 2014 several powerful 2RDM methods had emerged for the computation of molecules. The Army Research Office (ARO) issued a proposal call for a company to develop a modern, builtfromscratch package for quantum chemistry that would contain two newly developed 2RDMbased methods from our group: the parametric 2RDM method [1] and the variational 2RDM method with a fast algorithm for solving the semidefinite program [4,5,6]. The company RDMChem LLC was founded to work with the ARO to develop such a package built around RDMs, and hence, the name of the company RDMChem was selected as a hybrid of the RDM abbreviation for Reduced Density Matrices and the Chem colloquialism for Chemistry. To achieve a really new design for an electronic structure package with access to numeric and symbolic computations as well as advanced visualizations, the team at RDMChem and I developed a partnership with Maplesoft to build something new that became the Maple Quantum Chemistry Package (or Toolbox), which was released with Maple 2019 on Pi Day.
Maple Quantum Chemistry Toolbox
The Maple Quantum Chemistry Toolbox provides a powerful, parallel platform for quantum chemistry calculations that is directly integrated into the Maple 2019 environment. It is optimized for both cuttingedge research as well as chemistry education. The Toolbox can be used from the worksheet, document, or commandline interfaces. Plus there is a Maplet interface for rapid exploration of molecules and their properties. Figure 2 shows the Maplet interface being applied to compute the groundstate energy of 1,3dibromobenzene by density functional theory (DFT) in a 631g basis set.
Fig. 2: Maplet interface to the Quantum Chemistry Toolbox 2019, showing a density functional theory (DFT) calculation
After entering a name into the text box labeled Name, the user can click on: (1) the button Web to import the geometry from an online database containing more than 96 million molecules, (2) the button File to read the geometry from a standard XYZ file, or (3) the button Input to enter the geometry. As soon the geometry is entered, the Maplet displays a 3D picture of the molecule in the window on the right of the options. Dropdown menus allow the user to select the basis set, the electronic structure method, and a boolean for geometry optimization. The user can click on the Compute button to perform the computation. When the quantum computation completes, the total energy appears in the box labeled Total Energy. The dropdown menu Analyze contains a list of data tables, plots, and animations that can be selected and then displayed by clicking the Analyze button. The Maplet interface contains nearly all of the options available in the worksheet interface. The Help Pages of the Toolbox include extensive curricula and lessons that can be used in undergraduate, graduate, and even high school chemistry courses. Next we look at some sample calculations in the worksheet interface.
Reproducing an Early 2RDM Calculation
One of the earliest variational calculations of the 2RDM was performed in 1975 by Garrod, Mihailović, and Rosina [13]. They minimized the electronic ground state of the 4electron atom beryllium as a functional of only two electrons, the 2RDM. They imposed semidefinite constraints on the particleparticle (D), holehole (Q), and particlehole (G) metric matrices. They solved the resulting optimization problem of minimizing the energy as a linear function of the 2RDM subject to the semidefinite constraints, known as a semidefinite program, by a cuttingplane algorithm. Due to limitations of the cuttingplane algorithm and computers circa 1975, the calculation was a difficult one, likely taking a significant amount of computer time and memory.
With the Quantum Chemistry Toolbox we can use the command Variational2RDM to reproduce the calculation on a Windows laptop. First, in a Maple 2019 worksheet we load the commands of the Addon Quantum Chemistry Toolbox:
> 
with(QuantumChemistry);


(1.1) 
Then we define the atom (or molecule) using a Maple list of lists that we assign to the variable atom:
> 
atom := [["Be",0,0,0]];


(1.2) 
We can then perform the variational 2RDM method with the Variational2RDM command to compute the groundstate energy and properties of beryllium in a minimal basis set like the one used by Rosina and his collaborators. By default the method uses the D, Q, and G Nrepresentability conditions and the minimal "sto3g" basis set. The calculation, which completes in seconds, contains a wealth of information in the form of a convenient Maple table that we assign to the variable data.
> 
data := Variational2RDM(atom);


(1.3) 
The table contains the total groundstate energy of the beryllium atom in the atomic unit of energy (hartrees)

(1.4) 
We also have the atomic orbitals (AOs) employed in the calculation

(1.5) 
as well as the Mulliken populations of these orbitals

(1.6) 
We see that 2 electrons are located in the 1s orbital, 1.8 electrons in the 2s orbital, and about 0.2 electrons in the 2p orbitals. By default the calculation also returns the 1RDM

(1.7) 
The eigenvalues of the 1RDM are the natural orbital occupations
> 
LinearAlgebra:Eigenvalues(data[rdm1]);


(1.8) 
We can display the density of the 2slike 2^{nd} natural orbital using the DensityPlot3D command providing the atom, the data, and the orbitalindex keyword
> 
DensityPlot3D(atom,data,orbitalindex=2);

Similarly, using the DensityPlot3D command, we can readily display the 2plike 3^{rd} natural orbital
> 
DensityPlot3D(atom,data,orbitalindex=3);

By using Maple keyword arguments in the Variational2RDM command, we can readily change the basis set, use pointgroup symmetry, add active orbitals with or without selfconsistentfield, change the Nrepresentability conditions, as well as explore many other options. Having reenacted one of the first variational 2RDM calculations ever, let's examine a more complicated molecule.
Explosive TNT
We consider the molecule TNT that is used as an explosive. Using the command MolecularGeometry, we can import the experimental geometry of TNT from the online PubChem database.
> 
mol := MolecularGeometry("TNT");


(1.9) 
The command PlotMolecule generates a 3D ballandstick plot of the molecule
We perform a variational calculation of the 2RDM of TNT in an active space of 10 electrons and 10 orbitals by setting the keyword active to the list [10,10]. The keyword casscf is set to true to optimize the active orbitals during the calculation. The keyword basis is used to set the basis set to a minimal basis set sto3g for illustration.
> 
data := Variational2RDM(mol, active=[10,10], casscf=true, basis="sto3g");


(1.10) 
The groundstate energy of TNT in hartrees is

(1.11) 
Unlike beryllium, the electric dipole moment of TNT in debyes is nonzero

(1.12) 
We can easily visualize the dipole moment relative to the molecule's ballandstick model with the DipolePlot command
> 
DipolePlot(mol,method=Variational2RDM, active=[10,10], casscf=true, basis="sto3g");

The 1RDM is returned by default

(1.13) 
The natural molecularorbital (MO) occupations are the eigenvalues of the 1RDM

(1.14) 
All of the occupations can be viewed at once by converting the Vector to a list
> 
convert(data[mo_occ], list);


(1.15) 
We can visualize these occupations with the MOOccupationsPlot command
> 
MOOccupationsPlot(mol,method=Variational2RDM, active=[10,10], casscf=true, basis="sto3g");

The occupations, we observe, show significant deviations from 0 and 2, indicating that the electrons have substantial correlation beyond the meanfield (HartreeFock) limit. The blue lines indicate the first N/2 spatial orbitals where N is the total number of electrons while the red lines indicate the remaining spatial orbitals. We can visualize the highest "occupied" molecular orbital (58) with the DensityPlot3D command
> 
DensityPlot3D(mol,data, orbitalindex=58);

Similarly, we can visualize the lowest "unoccupied" molecular orbital (59) with the DensityPlot3D command
> 
DensityPlot3D(mol,data, orbitalindex=59);

Comparison of orbitals 58 and 59 reveals an increase in the number of nodes (changes in the phase of the orbitals denoted by green and purple), which reflects an increase in the energy of the orbital.
Looking Ahead
The Maple Quantum Chemistry Toolbox 2019, an new Addon for Maple 2019 from RDMChem, provides a easytouse, researchgrade environment for the computation of the energies and properties of atoms and molecules. In this blog we discussed its origins in graduate research at Harvard, its reproduction of an early 2RDM calculation of beryllium, and its application to the explosive molecule TNT. We have illustrated only some of the many features and electronic structure methods of the Maple Quantum Chemistry package. There is much more chemistry and physics to explore. Enjoy!
Selected References
[1] D. A. Mazziotti, Chem. Rev. 112, 244 (2012). "Twoelectron Reduced Density Matrix as the Basic Variable in ManyElectron Quantum Chemistry and Physics"
[2] ReducedDensityMatrix Mechanics: With Application to ManyElectron Atoms and Molecules (Adv. Chem. Phys.) ; D. A. Mazziotti, Ed.; Wiley: New York, 2007; Vol. 134.
[3] A. J. Coleman and V. I. Yukalov, Reduced Density Matrices: Coulson’s Challenge (SpringerVerlag, New York, 2000).
[4] D. A. Mazziotti, Phys. Rev. Lett. 106, 083001 (2011). "Largescale Semidefinite Programming for Manyelectron Quantum Mechanics"
[5] A. W. Schlimgen, C. W. Heaps, and D. A. Mazziotti, J. Phys. Chem. Lett. 7, 627631 (2016). "Entangled Electrons Foil Synthesis of Elusive LowValent Vanadium Oxo Complex"
[6] J. M. Montgomery and D. A. Mazziotti, J. Phys. Chem. A 122, 49884996 (2018). "Strong Electron Correlation in Nitrogenase Cofactor, FeMoco"
