def METHOD_NAME(phi, phi0, kphi):
    """Integrand for the harmonic dihedral restraints. Domain is on [-pi,pi].
    Args:
        phi (float): Angle to be integrated, in radians
        phi0 (float): Equilibrium angle, in radians
        kphi (float): Force constant, in kcal mol-1 rad-2
    Returns:
        float: Value of integrand
    """
    d_phi = abs(phi - phi0)
    d_phi_corrected = min(d_phi, 2*pi-d_phi) # correct for periodic boundaries
    return np.exp(-(kphi*d_phi_corrected**2)/(2*R*T))