We will focus on the B–coefficient here. The Virial module has been inspired by a paper by Reid in J. Chem. Educ. which was concerned with obtaining inter–molecular interaction potentials from the knowledge of
the second virial coefficient . Assuming pairwise inter–molecular interaction potentials that depend only
on the distance r between two molecules (such as the LJ potential), one can show that the B coefficient can
be obtained from a simple one–dimensional integration over the potential U(r) as follows:
..... (Equation 7a)
For the LJ potential of Eq. (3) the integration in Eq. (7) can be carried out analytically, with the result expressed in terms of the confluent hypergeometric function
where is the gamma function.
The qualitative behavior of B as a function of T based on the LJ potential is shown in the figure below:
The general shape of this curve is in agreement with the data shown by Reid  for Argon (see Fig. 1 in
Ref. 3 which shows experimental data for Argon and a fit to a Maitland–Smith potential).
In the presence of the quadrupole (Q) term, the potential U in Eq. (7) has additional terms from Q
which can be added by considering an expansion of U(r) at large distances. The potential also becomes
dependent on the relative orientation of the two molecules, which means the integral in (7) has additional
angular–dependent terms. This leads to modifications of the magnitude of B and to the shape of the
curve although the overall shape is qualitatively similar to the one shown in the figure above.
Specifically, the electrostatic energy of interaction of two point quadrupoles, each of magnitude Q is
where the orientation-dependent part is defined
Accordingly, the formula for the virial coefficient in terms of the potential must be modified to include integration over the orientational coordinates, thus
..... (Equation 7b)
This integral cannot be evaluated in a general way in terms of any standard functions. To proceed further, we consider a series expansion that is valid for small values of the quadrupole moment Q. To this end we expand the exponential of the quadrupole contribution,
..... (Equation 7c)
which can be rearranged into the form
..... (Equation 7d)
For any given n the orientational integrals resolve into a simple ratio, and the integral over separation can be expressed in terms of the confluent hypergeometric function. The general form of the result is
and the first few coefficients qn are given in the following table.