How does FixSymmetry command work?

Can anybody explain me, how does following command exactly work ?
atoms.set_constraint(FixSymmetry(atoms))

Does it relay set enough constrain on the atoms to preserve the space group given in input CIF file during the optimization (or detected by spglib) ?

Or is there any other method to utilize space group symmetry during molecular crystal structure optimization with known space group ?

The implementation is here: ase/constraints.py · cce025c4dc3ceec0e9b079a368c441c59d9bedb0 · ase / ase · GitLab

During optimisation the structure is changed via methods which the constraint can modify, so the optimiser tries to move an atom or cell vector in some way and the constraint determines the (symmetrised) effect it actually has.

This not quite the same thing as converting the structure to a set of symmetry degrees-of-freedom and directly optimising those: we are looking at a rework in that direction but it will take time and involve some deprecations and/or breakage!

But in my experience it seems to work reasonably well? The main limitation is that spglib only knows about spacegroup symmetry, so non-periodic symmetries of molecules (such as C5) cannot be detected and preserved.