 MolSSI Integral Reference Project
The Boys Function

Basic Theory

This is only a brief overview of the Boys function. For more details, see

The Boys function is defined as and is related to the gamma function  and to the lower incomplete gamma function  The Boys function has the following downward and upward recurrence relations (respectively) It should be noted that under some conditions (small ), upwards recurrence is numerically unstable.

Lastly, values for m=0 and for t=0 can be calculated easily In practice, due to the unbounded nature of , evaluation is usually split into three regimes with the middle regime being interpolated via Taylor series or Chebyschev polynomials.

Accurate Calculation

For very precise computation of the Boys function (for example, for higher precision floating point, or for calculating the values for an interpolation grid), a practical (although slow) method is given derived from the formulation given by Shavitt.

The first step is to approximate the value of the Boys function via the large- approximation: Next, the error associated with this approximation can be estimated by the (finite!) sum making note of the fact that the summation starts at . The summation continues until , at which point the summation will continue to diverge.

Since it guaranteed that the true error is less than this value, it can then determined if the large- approximation is acceptable. If it is not, then the small- (exact) formulation is used: again noting that the summation starts at .

The large- approximation can be (conservatively) skipped if , which also prevents a division by zero in the large- approximation if .

By splitting the calculation this way, there are no pre-calculated thresholds (ie, between large- and small- formulae), which would necessarily depend on the value of and the desired precision of the calculation. The downside is that this procedure is quite slow.

In MIRP, the value of the highest value of is calculated in this fashion, and then downward recurrence is used to obtain the rest.

Functions in MIRP

In MIRP, the Boys function can be calculated via the following functions: