Triclinic unit cell to cubic unit cell transformation

I am trying to turn a triclinic unit cell into a cubic cell with the following code:

import pymatgen.core as pmg
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.transformations.advanced_transformations import CubicSupercellTransformation

atoms = pmg.Structure.from_file('POSCAR')

symm_analyzer = SpacegroupAnalyzer(atoms)
transform = CubicSupercellTransformation(max_atoms=3000, min_atoms=150, force_diagonal=True, force_90_degrees=True,
        min_length=15.0, angle_tolerance=0.001)

cubic_supercell = transform.apply_transformation(atoms)"poscar", filename="POSCAR_cubic_supercell")

The code runs but it does not transform the actual unit cell into a cubic unit cell, it actually does nothing to the structure. Any input would be great!


Have you already tried to play around with the different arguments?
Maybe relaxing some of the constraints to see if it returns something?