import math


def dGadjust(T,N):
    """Adjust NUPACK's native free energy (with reference to mole fraction units) to be appropriate for molar units, assuming N strands in the complex."""
    R=0.0019872041 # Boltzmann's constant in kcal/mol/K 
    water=55.14    # molar concentration of water at 37 C, ignore temperature dependence, which is about 5%
    K=T+273.15     # Kelvin
    adjust = R*K*math.log(water) # converts from NUPACK mole fraction units to molar units, per association
    return adjust*(N-1)