Efficiency Considerations
Choosing a good basis set
The overall size of basis sets chosen often has a dramatic effect on the overall runtime of a calculation.
Unfortunately, for J-couplings in particular, standard basis sets that do not contain special basis functions to capture the response near the nucleus will produce unacceptably erroneous results.
Thus, basis sets must be chosen carefully for NMR calculations (this statement holds for any code, not just FHI-aims).
For a deeper explanation of available basis sets, see Laasner et al., 2024. In brief:
-
For shieldings, we have found good results with the NAO-VCC-nZ basis sets. Alternatively, the standard FHI-aims-09 (i.e., "tier") basis sets, and in particular the "tight" species defaults can also be used. If J-couplings are to be computed simultaneously, the NAO-J-n basis sets will also give accurate shielding values, but the overall cost of the NAO-J-n species defaults is significantly higher than that of NAO-VCC-nZ or FHI-aims09.
-
For magnetizabilities, accurate results can be obtained with the FHI-aims-09 basis sets.
-
For spin-spin couplings, the choice of basis set is vitally important and the NAO-J-n basis sets are substantially more accurate than other standard choices. In both the NAO-VCC-nZ and NAO-J-n basis set series, the index "n" corresponds to the size of the basis set where n=2 is the most efficient, least precise basis set and n=5 is the least computationally efficient, most precise basis set.
Alternatively, the Gaussian orbital based basis sets of Jensen (pcS and pcJ) are good choices for the elements considered here as well.
One method to increase the efficiency of a calculation is to mix and match basis sets. For instance in the computation of shieldings, the NAO-VCC-5Z is very well converged and produces highly accurate results. By using this basis for all species for which shieldings are being computed but using a less computationally intensive basis set (such as FHIaims 'tight' or 'intermediate') for all other elements can noticeably speed up calculations.
Such mixing and matching can even be done with atoms of the same species. For instance, consider a simple H2O water molecule. Imagine a scenario where we only want the shielding of one of the two hydrogen atoms. In this case, we can use the FHIaims 'tight' basis set for oxygen and one of the hydrogen atoms while using the NAO-VCC-5Z basis set only for the other hydrogen atom.
-
Within the
geometry.in
file, change the species of one of the two hydrogens to any name of your choosing (for instance replace 'H' with 'H_tight'). -
Now in the
control.in
file place the FHI-aims 'tight' basis sets for oxygen and hydrogen and the NAO-VCC-5Z basis set for hydrogen. -
Within each of these basis sets, there is a "species" keyword that indicates the start of the basis set description. Change the FHI-aims "tight" species keyword to match the string in the
geometry.in
file -- in this case replacespecies H
withspecies H_tight
.
Now, the hydrogen for which the shielding is computed will be described well by the NAO-VCC-5Z basis set, but both the other hydrogen and the oxygen will be described by the FHIaims "tight" basis set, saving computational resources without sacrificing substantial accuracy.
Efficiency when computing NMR spectra
As described in the NMR spectra tutorial, for fully accurate spectra, often molecular dynamic simulations are neccessary to "time-average" the results to simulate molecular motions in a material. These molecular dynamics simulations may be the most computationally intensive step of a NMR spectra workflow, so optimizing these calculations is important to save computational resources. The first place to consider efficiency to accuracy tradeoffs is in the basis sets chosen. For large molecules, these calculations are computationally so intensive that FHIaims "light" or "intermediate" basis sets may be the only option. For smaller molecules, more tightly converged basis sets may be possible. That being said, "light" basis sets will usually produce physically reasonable trajectories and "intermediate" basis sets improve noticeably towards the converged result. Thus, it often is reasonable to start molecular dynamics simulations with "light" basis sets and only alter this choice to check whether a higher precision than "light" has a significant impact on the average atomic positions and/or on the eventually desired observable (the NMR spectrum).
Beyond basis sets, various settings of MD runs can be optimized. For systems containing hydrogen atoms, step sizes must be less than 1 fs in length (0.5 fs is a choice for accurate dynamics). This short time step is needed because hydrogen-stretch vibrational frequencies are very high and the motion of hydrogen atoms is therefore very fast. Larger timesteps will lead to incorrect, unphysical trajectories including the artificial destruction of the molecule in question. For structures that do not contain hydrogen, the time step can be larger (inversely proportional to the highest vibrational frequency in the system), giving access to an overall longer trajectory, which may describe important molecular motions better. On the same note, the overall length targetted for a molecular dynamics simulation should change based on the expected timeframe of major molecular motions in a molecule. As a general rule of thumb, the more complicated the molecule, the longer molecular dynamics simulation necessary to well describe molecular motions.