Remove one specie from cif files

I have obtained some cif files from materials projects. Now I am considering to remove one type of atom from all these cif files, and the as-generated files are still in the cif format which could be opened by VESTA or Materials studio. Could anyone help me?
I have tried to use RemoveSpeciesTransformation , but the resulted files are not in the cif format.

Hi @Bo_Xiao,

If you’ve tried RemoveSpeciesTransformation, I assume you’ve already installed and are able to use pymatgen. In this case, you can easily convert your Structure object back into a CIF file using your_struct.to(filename='your_filename.cif').

Best,

Matt