# Load the water COSMO-RS species
database = CosmoRSSpeciesDatabase()
water = database.exportSpecies('water')

# Create the parameter set with custom parameters for the gas chemical potential
parameters = CosmoRSParameters(
    r_average=0.5*Ang,
    omega_ring=-0.21*kiloCaloriePerMol,
    eta_gas=-9.15,
    lambda_reg=0.8,
    lambda_ortho=0.816,
    dispersion={
        Hydrogen: -4.10*kiloCaloriePerMol/nm**2,
        Oxygen: -4.20*kiloCaloriePerMol/nm**2,
    }
)

# Calculate the vapor pressure using the different parameters
liquid = CosmoRealSolvent(300*Kelvin, water, parameters)
gas = CosmoRealGas(300*Kelvin, parameters)
mu_liquid = liquid.chemicalPotential(water)
mu_gas = gas.chemicalPotential(water)
vapor_pressure = numpy.exp((mu_liquid - mu_gas) / (300 * Kelvin * boltzmann_constant)) * bar

nlprint(f'The calculated vapor pressure is {vapor_pressure}')
