We develop an orientation sampling algorithm for rigid diatomic molecules, which allows direct generation of rings of images used for path-integral calculation of nuclear quantum effects. The algorithm treats the diatomic molecule as two independent atoms as opposed to one (quantum) rigid rotor. Configurations are generated according to a solvable approximate distribution that is corrected via the acceptance decision of the Monte Carlo trial. Unlike alternative methods that treat the systems as a quantum rotor, this atom-based approach is better suited for generalization to multi-atomic (more than two atoms) and flexible molecules. We have applied this algorithm in combination with some of the latest ab initio potentials of rigid H 2 to compute fully quantum second virial coefficients, for which we observe excellent agreement with both experimental and simulation data from the literature.