import math


def angle_energy(theta, fc, theta0):
    """
    Calculate the angle energy using the harmonic potential.

    Args:
      theta (float):  angle between atoms [degrees]
      fc (float):  force constant [kcal/mol]
      theta0 (float):  equilibrium angle [degrees]

    Returns:
      e_angle (float):  energy of angle [kcal/mol]
    """

    theta = math.pi/180.0 * theta   # degrees to radians
    theta0 = math.pi/180.0 * theta0   # degrees to radians
    return 0.5 * fc * (theta - theta0)**2