Automated solver
Introduction
The automated solver is based on the other frequency solvers, but operates in multiple steps trying to identify the most optimal route to evaluate an NMR spectrum under computational constraints. It can be used as a black box solver and should be used per default. Also, it allows the evaluation of the exact spectrum without any approximations by setting the flag calc_exact=True
. The advantage is, that it still exploits local SU(2) symmetry if it gives an improvement in runtime (see below for details).
The setup is the same as for the direct solver. Meaning based on a struqture Hamiltonian input the spectral function is computed from the correlation function , where corresponds to the spin operator including the gyromagnetic factors gamma, , .
Math
As for all of the frequency solvers the resolvent representation (see chapter math) is used. The correlation function is given as
The solver first checks whether the number of spins in the molecule is smaller than some maximum number of spins. If so, it evaluates the spectrum using a direct approach. If not, it performs a partitioning and checks whether the individual partitions are smaller than the specified maximum number of spins. If so, it solves them again using the direct approach. If not, it identifies the groups in the partition and checks if it can solve the partition with a reasonable runtime exploiting local SU(2) symmetry. If also this does not work, it automatically performs a spin-dependent clustering. For each cluster we check additionally if we can gain any accuracy by exploiting the local SU2 symmetry and still have a reasonable runtime.
For details on the partitioning and exploitation of local SU(2) symmetry, check out the documentation of the cluster solver, and for spin-dependent clustering, see the documentation of the spin-dependent cluster solver.
Runtime estimation
When evaluating the spectral function, diagonalizations have to be performed for each block in the Hamiltonian. The difference between using the local SU(2) symmetry or not is just the number and sizes of the identified blocks. While identifying more blocks automatically means smaller block sizes, performing the diagonalization in each block leads to a computational overhead. Since each diagonalization scales roughly with , where is the dimension of the hamiltonian block, a cost factor can be estimated by iterating over all identified blocks and adding up the cost factors. Doing this for approaches with and without local SU(2) symmetry allows us to determine whether it should be exploited or not.
Extra Arguments
eta
: float
Artificial broadening.
The broadening is formally necessary to ensure the convergence of the Fourier integral. In practice it corresponds to the unknown or neglected noise, being intrinsic for the resolution limitation of the spectrometer. Note that the complete spectral function is positive, . However, the spin-resolved spectral functions can be negative.
beta
: float
Inverse temperature.
.
Due to the low energy of nuclear spin excitations the temperature in real measurements is practically infinite, i.e. . For theoretical studies or comparison to very low temperature NMR measurements one can apply finite temperatures.
Note: Currently only the case is implemented.
max_cluster_size
: int
Maximum cluster size.
This has to be set according to restraints imposed by the computational resources available. Note that symmetric groups are viewed as one site, with an effective number of sites corresponding to the spin representation of the group.
tolerance_couplings
: float
Tolerance for the J-coupling when identifying symmetry groups.
When the symmetry groups are identified, the coupling to the outside does not have to be perfectly symmetric, as there might be small deviations in the input parameters. Hence this parameter allows you to define a tolerance for the J-coupling until which spins are assumed to couple symmetric.
tolerance_shifts
: float
Tolerance for the chemical shifts when identifying symmetry groups.
Similarly to the tolerance for the J-couplings the chemical shifts don't have to be perfectly identical. This parameter allows in the same way to define a tolerance up to which they are assumed to be the same.
delta
: float
Small parameter to avoid division by zero, when creating the weight matrix for the clustering.
threshold_matrix_elements
: float
In the final evaluation a lot of matrix elements evaluate to zero and hence do not need to be included, when performing the summation for each frequency. We therefore remove all matrix elements below this threshold beforehand.
calc_exact
: bool
If you set to True, the solver performs an exact calculation, but uses the direct approach, or the one exploiting the local SU2 symmetry depending on a comparison of the estimated runtime of both approaches.
verbose
: int
Verbosity of output.
Specifically when set to one, the partitioning, as well as the identified groups and the clustering is printed. For further debug information it may be set higher.