The Antoine equation will allow you to calculate the vapor pressure of water at a given temperature, which will allow you to calculate the partial pressure of water at 100% relative humidity. Multiplying this partial pressure by the relative humidity will provide the actual partial pressure of water vapor at the given relative humidity. Assuming that water follows the ideal gas law, the number of moles per cubic meter can be calculated, as shown below.
Antoine equation
$\log_{10}(P)=A-\frac {B}{T+C}$,
where P is the vapor pressure of water, in bar
A=5.20389
B=1733.926
C=-39.485
T is measured in Kelvins
Multiply the calculated pressure by 100,000 to convert to Pa. Then, use the ideal gas equation to calculate the number of moles per cubic meter.
$PV=nRT$
$\frac {PV}{RT}=n$
where R = 8.314 $m^3$-Pa/K-mol
This value of "n" corresponds to 100% relative humidity, so multiply by actual relative humidity to get the true value of moles per cubic meter. If you need grams per cubic meter, multiply moles by 18.02.