A simple method for calculating dispersion coefficients for isolated and condensed-phase species