A symmetric orthogonal transformation applied to molecular geometry optimizations constrained on a hypersphere