def my_kinetic_energy(vel, mass):
    """ Calculate total kinetic energy.

    Args:
      vel (np.array): particle velocities, shape (natom, ndim)
      mass (float): particle mass
    Return:
      float: total kinetic energy
    """
    k = 0.0
    for i in vel:
        k += sum(0.5 * mass * i ** 2)

    return k