QuantumChemistry
Restore
restore a session previously saved by the package's Save command
Calling Sequence
Parameters
Description
Examples
Restore() Restore(file)
file
-
string; string of the filename ending in .m containing saved session data
The Save command saves to a Maple .m file the remember (cache) tables used by the package to remember previously computed data, and the Restore command restores these tables from a Maple .m file.
The remember (cache) tables are used by the Quantum Chemistry package to retrieve data from calculations without recomputation. For example, after the energy of a molecule is computed by the Energy command with a given method and its options, the same command or other commands with the same options can generate properties or plots without reperforming the electronic structure calculation. The Save and Restore commands allow this useful behavior to be saved and restored between Maple sessions. The created files are compatible across different computers and even different operating systems, allowing the user to switch computers or operating systems. The commands can also be used to switch between different Maple interfaces to the Quantum Chemistry package including the worksheet, document, interactive (Maplet), and command line interfaces.
Because cache tables are cleared when they reach a prescribed size, it is possible that some calculations may need to be recomputed if some of the early cache in a long, memory-intensive session was cleared.
These commands do not save the user's variables in a session; if desired, such variables can be saved using the save command.
The Restore() command without a parameter opens a file dialogue for selecting the .m file.
The Restore(file) command with the string parameter file opens the file named file.m.
The string file requires the file's full path if the file is not located in Maple's current working directory, i.e. on Linux or MacOS the file might be "/home/john/ozone.m" or on Windows 64 bit it might be "C:/Users/John/Documents/ozone.m".
If the string file does not end in .m, the command will automatically append a ".m" to the given string.
The Maple command currentdir can be used to change the current working directory of the Maple session. Changing the current directory to "/home/john/" on Linux or MacOS, for example, would allow us to set file to "ozone.m" without the file's full path.
withQuantumChemistry:
We obtain the molecular geometry of aspirin with the MolecularGeometry command
molecule ≔ MolecularGeometryaspirin;
molecule≔O,1.23330000,0.55400000,0.77920000,O,−0.69520000,−2.71480000,−0.75020000,O,0.79580000,−2.18430000,0.86850000,O,1.78130000,0.81050000,−1.48210000,C,−0.08570000,0.60880000,0.44030000,C,−0.79270000,−0.55150000,0.12440000,C,−0.72880000,1.84640000,0.41330000,C,−2.14260000,−0.47410000,−0.21840000,C,−2.07870000,1.92380000,0.07060000,C,−2.78550000,0.76360000,−0.24530000,C,−0.14090000,−1.85360000,0.14770000,C,2.10940000,0.67150000,−0.31130000,C,3.53050000,0.59960000,0.16350000,H,−0.18510000,2.75450000,0.65930000,H,−2.72470000,−1.36050000,−0.45640000,H,−2.57970000,2.88720000,0.05060000,H,−3.83740000,0.82380000,−0.50900000,H,3.72900000,1.41840000,0.85930000,H,4.20450000,0.69690000,−0.69240000,H,3.71050000,−0.36590000,0.64260000,H,−0.25550000,−3.59160000,−0.73370000
We run a Variational2RDM calculation on the molecule with a [10,10] active space
Variational2RDMmolecule, active=10,10;
We can save the data (cache tables) of this session
SaveFileTools:-JoinPathkerneloptshomedir,aspirin_session.m;
Now we restart the Maple kernel which removes all data
restart;
After loading the Quantum Chemistry package
we can restore the previous Quantum Chemistry session with the Restore command
RestoreFileTools:-JoinPathkerneloptshomedir,aspirin_session.m;
Now we can execute the Variational2RDM command or another command using the same method and options without recomputation (note that the command executes instantly)
See Also
Save
Download Help Document