import math


def cell_volume(unit_cell):
    """
    Calculate the unit cell volume from the cell parameters given as a list/tuple of 6 values
    
    """
    a, b, c, alpha, beta, gamma = unit_cell
    alpha, beta, gamma = alpha * math.pi / 180.0, beta * math.pi / 180.0, gamma * math.pi / 180.0
    v = a * b * c * ((1 - math.cos(alpha) ** 2 - math.cos(beta) ** 2 - math.cos(gamma) ** 2) + 2 * math.cos(
        alpha) * math.cos(beta) * math.cos(gamma)) ** 0.5

    return v