def rotmol(numpoints, coor, lrot):
    """Rotate a molecule

    :param numpoints:  the number of points in the list
    :type numpoints:  int
    :param coor:  the input coordinates
    :type coor:  [[float, float, float]]
    :param lrot:  the left rotation matrix
    :type lrot:  [[float, float, float]]
    :return:  the rotated coordinates
    :rtype:  [[float, float, float]]
    """
    out = []
    for i in range(numpoints):
        out.append([])
        out[i].append(
            lrot[0][0] * coor[i][0]
            + lrot[1][0] * coor[i][1]
            + lrot[2][0] * coor[i][2]
        )
        out[i].append(
            lrot[0][1] * coor[i][0]
            + lrot[1][1] * coor[i][1]
            + lrot[2][1] * coor[i][2]
        )
        out[i].append(
            lrot[0][2] * coor[i][0]
            + lrot[1][2] * coor[i][1]
            + lrot[2][2] * coor[i][2]
        )
    return out